Conversation
run() terminated the single catalog writer by queueing `workers` sentinels on write_queue in the "no producers" branch, then computed writers_total = max(1, len(gov_workers_tasks)) -- which is 1 when there are no gov items. The writer breaks on the first sentinel it sees, so it exited before the trailing phases ran. VACINACAO items are deliberately deferred to a serial phase that pushes onto write_queue after the concurrent drain, and the retry pass does the same. With neither of those consumers alive, their entries had no reader: the parquet was uploaded to S3 but no catalog row was written and no SyncOutcome was emitted, so the artifact stayed invisible to PySUS. Once the bounded queue (maxsize=workers*2) filled, the put blocked forever and the run hung with no timeout. The branch was also a copy-paste of the one above it, which correctly sends sentinels to raw_queue to stop the processors. Sent the writer's single shutdown sentinel at the end of run(), right before awaiting the writer, and set writers_total to 1 to match the one consumer that actually exists. Test added for a VACINACAO-only run: it asserts every deferred item is reported as uploaded and reaches the catalog. It fails with 0 uploaded against the previous code.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #368 +/- ##
=======================================
Coverage ? 97.20%
=======================================
Files ? 180
Lines ? 23310
Branches ? 0
=======================================
Hits ? 22658
Misses ? 652
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
fix(sync): keep the catalog writer alive for the VACINACAO phase
run() terminated the single catalog writer by queueing
workerssentinels on write_queue in the "no producers" branch, then computed
writers_total = max(1, len(gov_workers_tasks)) -- which is 1 when there
are no gov items. The writer breaks on the first sentinel it sees, so it
exited before the trailing phases ran.
VACINACAO items are deliberately deferred to a serial phase that pushes
onto write_queue after the concurrent drain, and the retry pass does the
same. With neither of those consumers alive, their entries had no reader:
the parquet was uploaded to S3 but no catalog row was written and no
SyncOutcome was emitted, so the artifact stayed invisible to PySUS. Once
the bounded queue (maxsize=workers*2) filled, the put blocked forever and
the run hung with no timeout.
The branch was also a copy-paste of the one above it, which correctly
sends sentinels to raw_queue to stop the processors.
Sent the writer's single shutdown sentinel at the end of run(), right
before awaiting the writer, and set writers_total to 1 to match the one
consumer that actually exists.
Test added for a VACINACAO-only run: it asserts every deferred item is
reported as uploaded and reaches the catalog. It fails with 0 uploaded
against the previous code.
This is a re-submission of #351, which was closed without review. The
workflow runs on that PR sat in
action_requiredfor three days and thenexpired unapproved, so CI never went green.
The fix is unchanged; the branch was rebased onto the current
main, wherethe suite passes (1779 passed, 6 skipped) and black/isort/flake8 are clean.