Improve transactional integrity in db utils#63663
Improve transactional integrity in db utils#63663Gautam-Bharadwaj wants to merge 6 commits intoapache:mainfrom
Conversation
|
@Gautam-Bharadwaj This PR has a few issues that need to be addressed before it can be reviewed — please see our Pull Request quality criteria. Issues found:
What to do next:
There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. |
46bdd7d to
010b25a
Compare
|
@potiuk Thanks for the feedback Jarek! I've rebased the branch onto latest main and added regression tests in |
|
Why do you think this should happen? I completely do not understand why you would like to do it this way. |
|
Converted to Draft, but I fail to see why you would like to not commit this message if session is provided from outside - that makes very little sense because the idea is that those methods actually commit the change - even if it means that they commit other things that were changed before. Do you have a good reason for that change or is it just generic thinking that it should be like that ? Is there a problem you are trying to solve ? Because it's far from refactoring. This is changing semantics of those methods. Did you evaluate what effects it has on all the places where those methods are used? |
|
@potiuk The primary goal here is to make these utility functions atomic and transaction-safe when called within a larger session (like Currently, Importantly, this change is largely backwards compatible for standalone callers. Because these functions are decorated with The only difference is when a |
015ea92 to
9b0b4cf
Compare
9b0b4cf to
2403e43
Compare
|
This pull request has been automatically marked as stale because the author has not responded to a request for more information. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Refactored
merge_connandadd_default_pool_if_not_existsto remove direct calls tosession.commit(). These utility functions should remain atomic and leave transaction management to the caller to avoid partial state commits in case of downstream failures.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.