fix(141): handle after_flush_postexec when creating version objects#142
Merged
AbdealiLoKo merged 5 commits intomainfrom Nov 18, 2025
Merged
fix(141): handle after_flush_postexec when creating version objects#142AbdealiLoKo merged 5 commits intomainfrom
AbdealiLoKo merged 5 commits intomainfrom
Conversation
Pull Request Test Coverage Report for Build 10322605094Details
💛 - Coveralls |
c58761e to
2cc9de3
Compare
AbdealiLoKo
reviewed
Aug 9, 2024
| article2.id = article.id | ||
| # we were earlier updating ID which didn't seem right, so changed this to name since | ||
| # id is used by us for identity in operation | ||
| article2.name = article.name |
Contributor
There was a problem hiding this comment.
Actually updating ID seems to be the reason this testcase was written
If you see the skipif - it is trying to update the "identity" and seeing how that works
Contributor
Author
There was a problem hiding this comment.
so that skipif was added by us only, when we were extending package support to mssql db, i changed it because changing ID won't be right in real sense and i tried it out as well
.
say i change the ID of article2 to article now if i try to collect version objects of article2 i'll get version object of article1
.
i missed removing the skipif, i'll remove the skipif since we no longer update the identity so this should not fail with mssql.
cdb8abc to
596301c
Compare
aditya051293
approved these changes
Apr 2, 2025
when creating version objects if a user has created after_flush_postexec hook, which keeps calling `after_flush` untill it exhausts 100 attempts or session is no longer dirty, this is picked up by mapper as after_update which within same transaction adds a update operation type, so we have a check if target is already in UoW we continue with operation type that it is in untill transaction is completed. We also updated a existing testcase named `test_replace_deleted_object_with_update` as it was updating the pk of article object, but the pk being identity of object is used by operations to track target, so changing a non identity column to validate partial flush does not impact other objects
cb06e49 to
0c80366
Compare
Latest poetry recommends "poetry.group.dev.dependencies" So, use that.
py3.7 support ended 2 years ago. So, drop support for it and up our lowest version to py3.9
Use ruff format and ruff check instead of using black
- Update image containers to ubuntu 22.04 - Update action versions to latest versions
AbdealiLoKo
approved these changes
Nov 18, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
when creating version objects if a person has created after_flush_postexec hook, which keeps calling
after_flushuntill it exhausts 100 attempts or session is no longer dirty, this is picked up by mapper as after_update which within same transaction adds a update operation type, so we have a check if target is already in UoW we continue with operation type that it is in untill transaction is completed.