Repository navigation
test(feature-mixins): assert the stale-record exception contract - #27
Merged
Merged
Conversation
|
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.



Description
Adds the shared contract for the optimistic-lock stale-record exception, so every backend can assert the same behavior.
StaleRecordErrorinstead of a bareDatabaseError.model,primary_key,expected_versionandoperation.StaleRecordErrorremains catchable throughDatabaseError, so existing handlers keep working.IntegrityErrorand is not aStaleRecordError.rhosocial/python-activerecord#131.Adds: N/A (no tracking issue).
Type of change
feat: A new featuredocs: Documentation only changes (if related to the new feature)perf: A code change that improves performance (if part of the feature)test: Adding missing tests or correcting existing tests (for the new feature)chore: Changes to the build process or auxiliary tools and libraries suchs as documentation generation (if related to the new feature)ci: Changes to our CI configuration files and scripts (if related to the new feature)build: Changes that affect the build system or external dependencies (if related to the new feature)revert: Reverts a previous commitBreaking Change
(If Yes, please describe the impact and migration path below):
N/A
Applicable
rhosocial-activerecordVersion Range:rhosocial-activerecord>=1.0.0.dev30,<2.0.0Related Repositories/Packages
rhosocial/python-activerecordbranchfeature/stale-record-erroraddsStaleRecordError.Testing
Test Plan:
The core workflow dispatched on
feature/stale-record-errorpassed Python 3.8–3.15 including free-threaded variants.Checklist
README.md, etc.).changelog.d/<issue_number>.<type>.md).Additional Notes
This repository has no self-test workflow. The shared tests are validated by the companion core CI run. The changelog fragment is intentionally added after the PR number and CI result are known.