Skip to content
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

Merged
merged 7 commits into from
Jul 7, 2022

Conversation

jglick
Copy link
Member

@jglick jglick commented Jun 3, 2022

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.

}
if (t instanceof MissingContextVariableException) {
Class<?> type = ((MissingContextVariableException) t).getType();
// See ExecutorStepDynamicContext for four explicitly advertised types, & DefaultStepContext for two implicitly derived ones.
Copy link
Member Author

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.

}
}

@Symbol("agent")
Copy link
Member

@jtnord jtnord Jun 6, 2022

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)

Copy link
Member Author

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

Copy link
Member

@jtnord jtnord left a 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.

@jglick jglick requested a review from jtnord June 6, 2022 22:32
@jglick jglick marked this pull request as ready for review June 6, 2022 23:25
@jglick jglick requested a review from dduportal June 6, 2022 23:25
@jglick jglick marked this pull request as draft June 6, 2022 23:28
@jglick jglick marked this pull request as ready for review July 7, 2022 18:48
@jglick jglick enabled auto-merge July 7, 2022 19:04
@jglick jglick merged commit 2334ddc into jenkinsci:master Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants