Drop the lost-lease note on resolution, and check the built archives - #17
Merged
Conversation
The reaper records that a task's outcome was never observed. When the worker holding that lease came back and reported success, the note stayed on the row, so anything reading result.errors was handed an exception nobody raised on a task that worked. A failure resolving the same way already dropped it, so one row meant two different things depending on how it ended. Both resolutions now write the errors the execution started with. A task that is still LOST keeps the note, because it is the only thing on the row that says why the result reads as failed. Also documents what it takes to reach a caller-visible FAILED to SUCCESSFUL transition and how to stop seeing it: the lease has to lapse with attempts spent, so raising LOCK_TIMEOUT until a merely slow worker is never reclaimed removes it, at the cost of noticing a dead one later.
check_release.py read pyproject, the changelog and the README, all of which describe the tree rather than what the build produced. A packaging rule that stops shipping a migration leaves a distribution that imports and passes its tests, then fails on somebody's upgrade against a column that is not there. --dist opens the wheel and the sdist and checks that each carries every migration in the source tree, along with the licence and the package modules. The release workflow runs it after the build. The checks are now functions taking a repository path, so they have tests of their own. One of those applies the gate to this tree on every run, which catches a version bumped in one file and not the other on the commit that does it rather than at tag time.
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.
Two fixes and the release for them.
The reaper's note outlived what it described
The reaper records that a task's outcome was never observed. When the worker
holding that lease came back and reported success, the note stayed on the row,
so anything reading
result.errorswas handed an exception nobody raised on atask that worked. A failure resolving the same way already dropped it, so one
row meant two different things depending on how it ended.
Both resolutions now write the errors the execution started with. A task that
is still LOST keeps the note, because it is the only thing on the row that says
why the result reads as
FAILED.The release gate could not see the archive
check_release.pyreadpyproject.toml, the changelog and the README, all ofwhich describe the source tree rather than what the build produced. A packaging
rule that stops shipping a migration leaves a distribution that imports and
passes its tests, then fails on somebody's upgrade against a column that is not
there.
--distopens the wheel and the sdist and checks that each carries everymigration in the tree, the licence and the package modules. The release workflow
runs it after
python -m build. The checks are now functions taking arepository path, so they have tests of their own, and one of those applies the
gate to this tree on every run.
Documentation
production.mdnow says what it takes to reach a caller-visibleFAILEDtoSUCCESSFULtransition and how to stop seeing it: the lease has to lapse withattempts spent, so raising
LOCK_TIMEOUTuntil a merely slow worker is neverreclaimed removes it, at the cost of noticing a dead one later.
Checked
252 tests on SQLite and on PostgreSQL 16, and again under
USE_TZ = Falseon anon-UTC clock. Multi-process runs on both databases with hard worker kills and
SIGSTOPpauses: every task terminal, one completion signal each, and no rawterminal row rewritten.