Repository navigation
feat(errors): classify PostgreSQL driver errors by taxonomy - #69
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/v1.0.0.dev17 #69 +/- ##
========================================================
+ Coverage 78.07% 78.13% +0.06%
========================================================
Files 360 360
Lines 19340 19399 +59
Branches 3172 3183 +11
========================================================
+ Hits 15099 15158 +59
+ Misses 3109 3098 -11
- Partials 1132 1143 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Additional fix included in this branch (discovered by the four-language introspection porting wave on live servers):
so Fix: join Tests added in
Verified against the remote scenario matrix: 44 passed (2 live tests × all PostgreSQL scenarios) plus 4 offline shape tests. A |
|
* feat(errors): classify PostgreSQL driver errors by taxonomy * fix(execute): align PostgreSQL execute error phases * fix(execute): align PostgreSQL execute_many and test parity * ci: pin core and testsuite feature/error-taxonomy branches * fix(postgres): roll back COPY client errors in explicit transactions * docs(changelog): add fragment for the error taxonomy PR (#69) * ci: mark feature-branch pip installs as reviewed (#69) * fix(postgres): read indisvalid from pg_index in the unused-indexes listing Includes the two forms the class-body sweep could not see: consumers that read the removed dunders now call the accessor, and runtime assignments that used to declare a table name or schema dynamically now install the classmethod an override would declare.



Description
This PR aligns python-activerecord-postgres with the new semantic error taxonomy and execute-phase contract:
execute_manynow shares the mapper, auto-commits, and preserves framework errors; retry checkstransient.Adds # (no issue)
Type of change
feat: A new featuretest: Adding missing tests or correcting existing tests (for the new feature)docs: Documentation only changes (if related to the new feature)perf: A code change that improves performance (if part of the 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
Impact on End-Users:
No backward-incompatible changes: concrete error classes keep their names, and every error remains a
DatabaseError. Behavioural change: auto-commit failures now raiseTransactionErrorinstead of being logged and ignored, and transient connection retries now actually run.Impact on Backend Developers (Custom Implementations):
No signature changes. Custom
_handle_errorimplementations should raise taxonomy errors; the core pipeline adds a defensive fallback when a handler returns.Related Repositories/Packages
python-activerecordPR #139.python-activerecord-testsuitePR (taxonomy contract).feature/error-taxonomyfor both core and testsuite, and will be restored to release branches after the merge.Testing
Test Plan:
Local contract suites: 78 passed; COPY regression 4 passed. Feature-branch CI run 42976461108: success.
Reproduction:
PYTHONPATH=src:tests pytest tests -k 'test_execute_error_contract or test_driver_error_mapping or test_error_taxonomy_contract'Checklist
README.md, etc.).changelog.d/<issue_number>.<type>.md).Additional Notes
changelog.d/<PR>.added.mdonce the PR number exists, because the checker requires the fragment number to equal the PR number.feature/error-taxonomy; restore release pins after this PR and the core PR merge.