You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
My PR addresses the following AIRFLOW-1486 issue and references them in the PR title.
Description
Here are some details about my PR, including screenshots of any UI changes:
Current:
ERROR:root:Could not read logs from s3://airflow-log/my_dag/task1/2017-08-04T16:03:00/1.log
INFO:root:The key my_dag/task1/2017-08-04T16:03:00/1.log now contains 4648 bytes
Expected:
INFO:root:The key my_dag/task1/2017-08-04T16:03:00/1.log now contains 4648 bytes
Tests
My PR adds the following unit tests:
tests.utils.test_logging.TestS3Log
Commits
My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
@skudriashev, thanks for your PR! By analyzing the history of the files in this pull request, we identified @artwr, @criccomini and @allisonwang to be potential reviewers.
@skudriashev Thanks for writing tests for S3 logs! Using moto is a better choice as we don't need to mock the behavior of S3. Could you point out how does this change fix the error?
@allisonwang when S3hook writes log first time - it tries to read existing log first and since it doesn't exist - error is printed, but doesn't make sense. So I fixed that behavior.
Get it. The log doesn't show up in UI but as a debug message. LGTM. Thanks for fixing the issue. I was trying to test S3 log in PR #2464 but moto doesn't work well with current structure. It requires passing mock S3 connection into S3Hook. This test can also be used to test the new S3 log handler.
LGTM, mocking is at least better than nothing so I'll merge this for now and we can follow up with better tests later if we desire. Thanks for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear Airflow maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
Current:
Expected:
Tests
Commits