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-42724] - Restore the windows-service/jenkins.xml resource to restore compatibility with windows-slaves 1.2 #2803

Conversation

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Mar 13, 2017

Background:

Windows Slaves plugin 1.0 performs a direct access to the resources bundled into the core.
Hence the file removal was a bad idea though I have not seen the issue in automatic tests and ATH. This change also was a last-minute change in #2765 in order to address suggestions from @daniel-beck, hence I didn't test it properly. Sorry about that.

See JENKINS-42724 and JENKINS-42746.

No autotests, it should be somehow caught by PCT or ATH.

Full diff

Changelog entries

Proposed changelog entries:

  • bug - JENKINS-42724: Restore the deprecated windows-service/jenkins.xml resource to restore the compatibility with Windows Agents Plugin (FKA Windows Slaves Plugin) 1.2 and below
  • ...

Submitter checklist

  • JIRA issue is well described
  • Link to JIRA ticket in description, if appropriate
  • Appropriate autotests or explanation to why this change has no tests
  • For new API and extension points: Link to the reference implementation in open-source (or example in Javadoc)

Desired reviewers

@daniel-beck @jenkinsci/code-reviewers @reviewbybees

Windows Slaves plugin performs a direct access to the resources bundled into the core.
Hence the file removal was a bad idea though I have not seen the issue in automatic tests and ATH.

This change also was a last-minute change in #2765 in order to address suggestions from @daniel-beck, hence I didn't test it properly
@reviewbybees
Copy link

reviewbybees commented Mar 13, 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.

In the case WinSW gets terminated and leaks the process, we want to abort
these runaway JAR processes on startup to prevent "Slave is already connected errors" (JENKINS-28492).
-->
<extensions>

This comment has been minimized.

Copy link
@jglick

jglick Mar 13, 2017

Member

So this is copied from jenkins.xml, and was not in the deleted jenkins-slave.xml, right?

This comment has been minimized.

Copy link
@oleg-nenashev

oleg-nenashev Mar 13, 2017

Author Member

This is copied from https://github.com/jenkinsci/windows-slave-installer-module/blob/master/src/main/resources/org/jenkinsci/modules/windows_slave_installer/jenkins-slave.xml .

I cannot enable the automatic update easily due to the Copy-paste of the old stuff in Windows Slaves plugin, but at least I can pick the new sample for other options

className="winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension"
id="killOnStartup">
<pidfile>%BASE%\jenkins_agent.pid</pidfile>
<stopTimeout>5000</stopTimeout>

This comment has been minimized.

Copy link
@jglick

jglick Mar 13, 2017

Member

Except 5000 rather than 10000?

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 14, 2017

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 14, 2017

Also created a workaround PR to the plugin: jenkinsci/windows-slaves-plugin#6 . With that change we may avoid the out-of-order release

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 15, 2017

Should I merge it to formally close the regression? Likely yes, because there will be more people updating to 2.50+ without updating to Windows Slaves 1.3.1+

@daniel-beck
Copy link
Member

daniel-beck commented Mar 15, 2017

Isn't that just a matter of upgrading the bundled version?

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 15, 2017

Isn't that just a matter of upgrading the bundled version?

Well, maybe. I doubt there are any other usages of this file. And Windows Slaves Changelog does not contain potential fatal flaws. Only minor changes since the decoupling

@daniel-beck
Copy link
Member

daniel-beck commented Mar 16, 2017

In that case I would favor that variant.

@oleg-nenashev oleg-nenashev changed the title [JENKINS-42724] - Restore the jenkins-slave.xml file [JENKINS-42724] - Update Windows Slaves Plugin requirement to 1.3.1 Mar 17, 2017
@oleg-nenashev oleg-nenashev dismissed stale reviews from abayer and jglick Mar 17, 2017

The implementation has been reworked

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 17, 2017

@reviewbybees @daniel-beck I need another review iteration since I have changed the implementation after the release of 1.3.1 and feedback from @daniel-beck

Copy link
Member

daniel-beck left a comment

Assuming this fixes the issue for people who had an older version installed, i.e. it automatically is upgraded.

Also, should be squashed.

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 17, 2017

Assuming this fixes the issue for people who had an older version installed, i.e. it automatically is upgraded.

Will check it, but I have some concerns about that

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 18, 2017

@daniel-beck Checked, it does not work OOTB. So I will restore the resource file

@oleg-nenashev oleg-nenashev force-pushed the oleg-nenashev:bug/JENKINS-42724-missing-jenkins-slave-xml branch from 41994c6 to 6428c94 Mar 19, 2017
@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 19, 2017

@daniel-beck fixed

@daniel-beck
Copy link
Member

daniel-beck commented Mar 19, 2017

As discussed, 👍 conditional on followup investigation, as #2489 etc. indicate raising the bundled version should upgrade every older, installed plugin.

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 19, 2017

Note: I've just got an issue during the upgrade from 1.642. The restart should have fixed the issue, but still a potential case.

As discussed with @daniel-beck , we agreed not to bump the dependency now since the detached plugin needs to be bumped accordingly in https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/ClassicPluginStrategy.java#L413...L427 . And @daniel-beck thinks it is not trivial in this case

@oleg-nenashev oleg-nenashev changed the title [JENKINS-42724] - Update Windows Slaves Plugin requirement to 1.3.1 [JENKINS-42724] - Restore the deprecated windows-service/jenkins.xml resource to restore the compatibility with Windows Agents Plugin (FKA Windows Slaves Plugin) 1.2 Mar 19, 2017
@oleg-nenashev oleg-nenashev changed the title [JENKINS-42724] - Restore the deprecated windows-service/jenkins.xml resource to restore the compatibility with Windows Agents Plugin (FKA Windows Slaves Plugin) 1.2 [JENKINS-42724] - Restore the windows-service/jenkins.xml resource to restore compatibility with windows-slaves 1.2 Mar 19, 2017
@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Mar 19, 2017

Merging to get it in the release

@oleg-nenashev oleg-nenashev merged commit 4ac7c08 into jenkinsci:master Mar 19, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/jenkins/pr-head This commit has test failures
Details
Jenkins This pull request looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.