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

Cache Hook when initializing CloudFormationCreateStackSensor #14638

Merged
merged 1 commit into from
Mar 7, 2021

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Mar 6, 2021

  • CloudFormationCreateStackSensor created AWSCloudFormationHook in its init method
  • This commit delays creation of hook until it is needed

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

- `CloudFormationCreateStackSensor` created `AWSCloudFormationHook` in its init method
- This commit delays creation of hook until it is needed
@kaxil kaxil requested a review from eladkal March 6, 2021 00:45
@boring-cyborg boring-cyborg bot added the provider:amazon-aws AWS/Amazon - related issues label Mar 6, 2021
@github-actions
Copy link

github-actions bot commented Mar 6, 2021

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 Mar 6, 2021
try:
from functools import cached_property
except ImportError:
from cached_property import cached_property
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we need both imports?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is an issue then we probably should fix all other operators that use from cached_propert, WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, see #14606

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, like Elad mentioned #14606 removed the dep for Python 3.8 users. this just build on top of that

@kaxil kaxil merged commit b896aee into apache:master Mar 7, 2021
@kaxil kaxil deleted the hook-creation-delayed-aws-cf branch March 7, 2021 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants