Skip to content
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

Merged

Conversation

pavelhlushchanka
Copy link
Contributor

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 of DEFAULT_UI_TIMEZONE here. Basically to format UTC timestamp with respect to specified UI timezone. However i found only the code that resolves DEFAULT_TIMEZONE. So i used it for now. Also i'm making event_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 for DEFAULT_UI_TIMEZONE and timestamps are formatted with respect to specified ui timezone?

@boring-cyborg
Copy link

boring-cyborg bot commented Apr 3, 2021

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)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@pavelhlushchanka
Copy link
Contributor Author

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.

@pavelhlushchanka pavelhlushchanka marked this pull request as ready for review April 5, 2021 14:44
@xinbinhuang xinbinhuang self-requested a review April 14, 2021 15:20
@eladkal eladkal requested a review from feluelle April 27, 2021 14:11
Copy link
Member

@feluelle feluelle left a 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.

@github-actions
Copy link

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.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label May 14, 2021
@pavelhlushchanka
Copy link
Contributor Author

@feluelle thanks for the review. I decided to not include timezone for the sake of being consistent with the default timestamp format

@feluelle feluelle merged commit 1467046 into apache:master May 14, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented May 14, 2021

Awesome work, congrats on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logging area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:amazon-aws AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants