[JENKINS-49707] AgentErrorCondition
improvements
#249
Merged
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.
Make
retry(count: …, conditions: [agent()])
handle more cases:Unable to create live FilePath…
which is observed sometimes before an agent is even used for the first time. ([JENKINS-49707] Evaluateretry
conditions to improve the stability of the builds jenkins-infra/helpdesk#2984 (comment))node
block was cancelled. While this could be something that happened due to manual administrator intervention, typically it is a side effect of the cloud killing things off.KubernetesAgentErrorCondition
([JENKINS-49707] Allownode
blocks from deleted pods to be retried kubernetes-plugin#1190) already handles this because when a pod is removed, the cloud tried to clean up by removing the agent from the controller’s list of nodes (already handled) and cancelling any outstanding queue items associated with it, but the order is tricky to predict. Note that aborting the overall build is something different.