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-44112] - Enable WorkDir in JNLPLauncher #2945

Conversation

oleg-nenashev
Copy link
Member

@oleg-nenashev oleg-nenashev commented Jul 24, 2017

See JENKINS-44112. Since Jenkins 2.57 we can enable Remoting Work Directories.

  • Enable Work Directories by default in new agents with JNLP launcher for both Java Web Start and Manual start options
  • Make new Remoting WorkDir options configurable via UI
  • Disable work directories for existing JNLP Agents
  • TBD: Enable work directories in child classes? Likely no. https://github.com/search?q=org%3Ajenkinsci+%22extends+JNLPLauncher%22&type=Code
  • TBD: Check if the UI change is reflected in clild launcher types properly. Maybe use @DataBoundSetter to get it supported in child classes automagically?
    • ON: All JNLPLauncher implementations use the default constructor, We are safe
  • Polish UI
  • Add autotests

UI samples

Config:
screen shot 2017-07-24 at 17 30 57

Main page:
screen shot 2017-07-24 at 17 33 08

Proposed changelog entries

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@reviewbybees
@batmat since it collides with #2775

@oleg-nenashev oleg-nenashev added needs-more-reviews Complex change, which would benefit from more eyes work-in-progress The PR is under active development, not ready to the final review labels Jul 24, 2017
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, couple of nits.

@@ -86,6 +122,20 @@ public void launch(SlaveComputer computer, TaskListener listener) {
*/
public static /*almost final*/ Descriptor<ComputerLauncher> DESCRIPTOR;

/**
* gets
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix comment here?

@Issue("JENKINS-44112")
public void testNoWorkDirMigration() throws Exception {
Computer computer = j.jenkins.getComputer("Foo");
Assert.assertThat(computer, instanceOf(SlaveComputer.class));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: static import for consistency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

}

StringBuilder bldr = new StringBuilder();
bldr.append("-workDir \"");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to work with windows? I am not 100% sure but I feel like that backslash is for the start of a file in windows rather than a special character announcement

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. Windows also needs escaping

@@ -0,0 +1,4 @@
<div>
If defined, Remoting will fail the startup if the target work directory is missing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Remoting will fail at startup" I think rather than "Remoting will fail the startup"

@alexanderrtaylor
Copy link
Contributor

LGTM as well with a few small nitpicky things

@oleg-nenashev oleg-nenashev removed the work-in-progress The PR is under active development, not ready to the final review label Jul 28, 2017
@ghost
Copy link

ghost commented Jul 28, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@oleg-nenashev
Copy link
Member Author

@reviewbybees @rysteboe @alexanderrtaylor Ready for the final review

Copy link
Contributor

@alexanderrtaylor alexanderrtaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry wrong place from before
🐝

@oleg-nenashev
Copy link
Member Author

@reviewbybees done. I kindly ask @jenkinsci/code-reviewers to take a look, because I would like to get this change integrated into the weekly to have it in the next LTS baseline

@oleg-nenashev oleg-nenashev merged commit 9dc2cdb into jenkinsci:master Jul 29, 2017
@oleg-nenashev oleg-nenashev deleted the feature/JENKINS-44112-jnlp-launcher-workdir branch July 29, 2017 18:32
@oleg-nenashev oleg-nenashev removed the needs-more-reviews Complex change, which would benefit from more eyes label Jul 29, 2017
@oleg-nenashev
Copy link
Member Author

Merged the change in order to have it in the weekly.
I commit to address any fallout it causes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants