fix: passing failures (the network) are retried, in the app and by the farm #43
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!43
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:fix/retries"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
One dropped connection failed a whole job. The forge's runner log has shown "connection reset by peer" through Cloudflare today, so these happen. The app tried a git clone or fetch, a tool's download and
pip installonce each. Then it sent/fail, which did two things:failed_agents, so the job was never offered to that PC again. A job aimed at one tester (tester-<login>) then had nobody left to run it.error, which comes at the third PC.What changed
The app (
agent/):NetworkRetry.RunAsynctries a network step again after a failure, waiting 5, 20 and 60 s, and says why and which try ("git fetch of main failed: …; trying again in 20 s (try 3 of 4)"). It's used for:mainand the PR;linux_tools.py env --install, Windows' tool downloads andpip install. A tool already fetched and checked is kept, so a new try picks up where the last one failed.InfraException.Passing)./failsends"passing": true, and the app's log says the farm will offer the job again.The farm (
coordinator/):failed_agents, and without counting towarderror. The same PC may take it again. This happens at most 3 times per job (MAX_PASSING_FAILS, columnjobs.passing_fails, migration 0011); after that a passing fail counts like any other.docs/protocol.mddescribes"passing".Testing
test_a_passing_fail_is_tried_again_by_the_same_pccovers three passing fails that requeue for the same PC, the fourth counting, and a fail that isn't passing counting at once.Deploy: the coordinator needs migration 0011. It only adds a column, and I'll back up the database first.