-
Notifications
You must be signed in to change notification settings - Fork 98
Change NODE_NAME for the built-in node based on its self label #168
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
Conversation
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.
Does
Lines 804 to 805 in e53cdd6
// Switches the label to a self-label, so if the executable is killed and restarted via ExecutorPickle, it will run on the same node: | |
label = computer.getName(); |
src/test/java/org/jenkinsci/plugins/workflow/EnvWorkflowTest.java
Outdated
Show resolved
Hide resolved
That's the "agent" branch, |
@@ -71,6 +71,7 @@ | |||
<java.level>8</java.level> | |||
<useBeta>true</useBeta> | |||
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | |||
<hpi.compatibleSinceVersion>2.40</hpi.compatibleSinceVersion> |
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.
Not strictly correct but the best we can do to encourage admins to read the changelog and understand the impact of upgrading.
While there's no dedicated system property for this plugin's behavior, the same jenkins.model.Jenkins.nodeNameAndSelfLabelOverride
would change the behavior here.
What's not possible: To get the new behavior as it is in 2.307+ while retaining the existing behavior in this plugin only.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jglick do you think your comments fully addressed? |
Other than #168 (comment) yes. |
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.
Co-authored-by: Jesse Glick <[email protected]>
@car-roll FYI I updated https://github.com/jenkinsci/workflow-durable-task-step-plugin/releases/tag/workflow-durable-task-step-2.40 in response to https://groups.google.com/g/jenkinsci-users/c/R7AUrb6nq5k/m/j_Omo1f3BQAJ; feel free to update/revert. |
This implements the same terminology cleanup as jenkinsci/jenkins#5425 did in core for for
NODE_NAME
variable which is set here independently of core.This is independent of #167 but without that PR, this one will timeout on 2.307+ (unchanged from before).
This is not expected to result in a behavior difference on Jenkins 2.306 and earlier.
On Jenkins 2.307 and later, this PR will change the behavior and make it consistent with core's (freestyle jobs etc.). This can easily be tested by using the script console to provide a custom name and label for the built-in node:
Changelog suggestion:
NODE_NAME
environment variable value set for the built-in node insidenode
blocks now matches the behavior of other job types: On Jenkins 2.306 and earlier, the behavior is unchanged (master
). On Jenkins 2.307 and later, the variable will bebuilt-in
ormaster
, depending on whether the instance was upgraded from a previous release or newly installed, and whether the migration was applied. See https://www.jenkins.io/redirect/built-in-node-migration/