Repository navigation
Add guarded stored-value decoding and safe schedule display - #134
Merged
Merged
Conversation
Add field-by-field stored-value decoding and StoredValueUnreadable. Propagate database-raised errors unchanged without read savepoints. Apply one decoding policy across drivers, including rejection of non-text text-column values and maximum boundary counts. Return pk N from str(schedule) when its name cannot be read as text. Keep this fallback out of stored fields. Add reader tests and psycopg2 and mysqlclient CI jobs. This change does not integrate the reader into dispatch, pruning or write operations.
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.
What and why:
Add a private reader that decodes stored values by field, plus public
django_ox.exceptions.StoredValueUnreadable. Database-raised errors propagate unchanged; reads take no savepoints.Use one decoding policy across drivers. Reject non-text values in text columns, PostgreSQL infinity and MySQL zero dates. Also reject a maximum
boundary_generation.Make
str(schedule)returnpk Nwhen the name cannot be read as text, including deferred names. The fallback does not alter stored data.Worker, pruning and write-API integration are outside this change. Existing dispatch behaviour is unchanged here. No migration is required.
Tests: reader tests added in
tests/test_stored_read.py(217 passed with the command and monitoring docs tests on SQLite); ruff and format are clean. Two new CI jobs run the reader's tests on psycopg2 and mysqlclient. They have not run on GitHub before, so this pull request is their first run.Changelog: not user-visible yet; the user-facing entry arrives with the changes that use the reader.