-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
FIX: DbApiHook.insert_rows unnecessarily restarting connections #40615
Merged
potiuk
merged 13 commits into
apache:main
from
dabla:fix/sql-hook-connection-placeholder
Jul 5, 2024
Merged
FIX: DbApiHook.insert_rows unnecessarily restarting connections #40615
potiuk
merged 13 commits into
apache:main
from
dabla:fix/sql-hook-connection-placeholder
Jul 5, 2024
Conversation
This file contains 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
…operty to avoid get_connection gets unnecessarily called
2 tasks
potiuk
reviewed
Jul 5, 2024
Some tests to fix, but it looks good :) |
…y to keep code DRY and thus avoid code duplication
Some compatibility tests are failing but I don't understand why. Never mind found it ;) |
AH. ... one small static check to fix! |
potiuk
approved these changes
Jul 5, 2024
52 tasks
ephraimbuddy
added
the
changelog:skip
Changes that should be skipped from the changelog (CI, tests, etc..)
label
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
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.
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.