-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-49707] Defining AgentErrorCondition
#231
Conversation
} | ||
if (t instanceof MissingContextVariableException) { | ||
Class<?> type = ((MissingContextVariableException) t).getType(); | ||
// See ExecutorStepDynamicContext for four explicitly advertised types, & DefaultStepContext for two implicitly derived ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment really belongs in #180, and perhaps this whole MissingContextVariableException
clause might be active only in that mode, but seems harmless enough to include this logic here.
…nkinsci/workflow-basic-steps-plugin#203 since we have no restart tests here
src/main/java/org/jenkinsci/plugins/workflow/support/steps/AgentErrorCondition.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
@Symbol("agent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noting collision with (a probably very rarely installed plugin - only alpha releases afaict)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be OK. https://javadoc.jenkins.io/component/symbol-annotation/org/jenkinsci/Symbol.html
symbol names are meant to be only unique within a specific extension point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK, unclear if the code should (or should not) be looking at supressed exceptions in addition to the causes.
JENKINS-49707
Extracted from #180, containing just the logic needed to retry
node
blocks (on nonspecific agents) in the face of errors encountered while the controller is still running. The larger changes in #180 would be needed to handle errors spanning a controller restart, such as an agent which fails to reconnect because it has been lost forever after a backup & restore into another cluster.Downstream of jenkinsci/workflow-api-plugin#217.