fix: let cron retry the failure shapes minato has - #49
Merged
Conversation
The guard caught exit:{noproc, _}, which is what a missing pgo pool did. minato
does not exit: a pool process that is not there answers {error, {no_pool, _}}
and shigoto_db turns that into an error, and a pool that exists but cannot reach
the database raises too. Neither was caught, so a cron process starting before
its database crashed instead of coming back in a second, and the catch up went
with it.
All three shapes are caught now. The exit clause stays: a pool that is not
started at all still exits from the checkout call.
🟠 Code Coverage — 57.4%1015 of 1769 lines covered. 🟡 ELP Lint — 1 warning1 diagnostic found. See job logs for details. ℹ️ 11 OTP CVEs auto-ignored (already fixed in running version)These CVEs are patched in the installed OTP version but NVD data
|
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.
The guard on
shigoto_cron's leader lock caughtexit:{noproc, _}— what a missing pgo pool did. minato doesn't exit: a pool process that isn't there answers{error, {no_pool, _}}, whichshigoto_dbturns into anerror, and a pool that exists but can't reach the database raises too.So after the swap, a cron process starting before its database crashed instead of coming back in a second — and the catch-up went with it. All three shapes are caught now; the
exitclause stays, since a checkout against a pool that was never started still exits.Supersedes #24, which added this guard for pgo's shape and was 17 commits behind a tree that no longer has pgo in it.
Local: core 27, eunit 82, fmt clean.