Skip to content

Conversation

@dabla
Copy link
Contributor

@dabla dabla commented Jul 5, 2024

This PR will fix unnecessary invocations of the get_connection method from the placeholder property.
To achieve this I changed it to cached_property, so on the next invocation the cached result is returned.
I also fixed the warning message within the placeholder property and of course added unit test for both changes.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

…operty to avoid get_connection gets unnecessarily called
@potiuk
Copy link
Member

potiuk commented Jul 5, 2024

Some tests to fix, but it looks good :)

@dabla
Copy link
Contributor Author

dabla commented Jul 5, 2024

Some tests to fix, but it looks good :)

Some compatibility tests are failing but I don't understand why. Never mind found it ;)

@potiuk
Copy link
Member

potiuk commented Jul 5, 2024

AH. ... one small static check to fix!

@potiuk potiuk merged commit 3f0979c into apache:main Jul 5, 2024
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jul 23, 2024
@ephraimbuddy ephraimbuddy added this to the Airflow 2.10.0 milestone Jul 23, 2024
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
…he#40615)


---------

Co-authored-by: David Blain <david.blain@infrabel.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:common-sql

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants