-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read timestamp from Cloudwatch events #15173
read timestamp from Cloudwatch events #15173
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
|
I've checked the default formatting of the timestamp in logs. Basically timestamp is formatted based on UTC regardless what timezones are specified in the config. So I decided to have a consistent behaviour here. Also I applied the same default formatting template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
You could also explicitly add UTC to the string or use well-known ISO-8601 format.
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease. |
@feluelle thanks for the review. I decided to not include timezone for the sake of being consistent with the default timestamp format |
Awesome work, congrats on your first merged pull request! |
Related: #15144. That's my first pr. Here is the main idea of the feature. The handler reads the timestamp of Cloudwatch events. So timestamp can be seen on the
Log
page of the task. Also I wanted to add a support ofDEFAULT_UI_TIMEZONE
here. Basically to format UTC timestamp with respect to specified UI timezone. However i found only the code that resolvesDEFAULT_TIMEZONE
. So i used it for now. Also i'm makingevent_dt
as naive right before formatting in order to remove timezone information in logs.So my main question is is it fine to use
DEFAULT_TIMEZONE
for formatting of the timestamps? Or there should be similar resolver forDEFAULT_UI_TIMEZONE
and timestamps are formatted with respect to specified ui timezone?