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-70301] Do not report implied dependencies for WMI Windows Agents plugin #7568

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Jan 5, 2023

Do not report implied dependencies for WMI Windows Agents plugin

JENKINS-70301 notes that the WMI Windows Agents plugin (id:windows-slaves) was split from core in 1.547 and is now deprecated. Because it is deprecated, users want to remove it. They cannot remove it if they have plugins installed that depend on a Jenkins version prior to 1.547.

Only two plugins in the jenkinsci GitHub organization actually depend on any classes from the WMI Windows Agent plugin.

  • cli-extras-plugin - never released, no tags, no install history
  • multi-slave-config - already requires windows-slaves plugin explicitly and already requires a Jenkins core version newer than 1.547. 1340 installations, last released 8 years ago

Rather than require updates of all the plugins that require a Jenkins version less than 1.547, this removes the windows-slaves plugin from the split plugins list. Users will not be warned that their plugin might have a dependency on windows-slaves because the analysis has confirmed that there is only 1 delivered plugin with that dependency, and it is an explicitly declared dependency with a newer Jenkins minimum version than the version from which the WMI Windows Agents plugin was split from Jenkins core.

A google sheet lists the plugins that have an implied dependency on the WMI Windows Agents plugin.

No new automated tests because this is a one-time operation that has been tested interactively. Plugin compatibility test evaluation:

Testing done

  • Installed suggested plugins from wizard and confirmed WMI Windows Agents plugin is not installed
  • Installed slave-setup plugin (has implied WMI Windows Agents plugin dependency) and confirmed that WMI Windows Agents plugin is not installed
  • Installed multi-slave-setup plugin (has explicit WMI Windows Agents plugin dependency) and confirmed that WMI Windows Agents plugin was installed as a dependency
  • Remove multi-slave-setup plugin and WMI Windows Agents plugin and confirmed that Jenkins reported no errors or issues
  • Installed five plugins with old base versions and confirmed that WMI Windows Agents plugin was not installed. The five plugins included backup-plugin, cloudbees-credentials-plugin, unity3d-plugin, groovy-label-assignment-plugin, and maven-deployment-linker plugin.
  • Performed a backup with the backup plugin and confirmed that it was well behaved
  • Removed the windows-slaves plugin as a bundled plugin so that it is not included in the war file. Confirmed the result war file loaded the five plugins tested earlier and was well behaved before and after those five plugins were uninstalled

Proposed changelog entries

  • Do not report implied dependencies for WMI Windows Agents plugin.

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples).
    • Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.
  • Run plugin compatibility tester with an incremental build

Desired reviewers

@jglick or @bcrow

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

https://issues.jenkins.io/browse/JENKINS-70301 notes that the WMI Windows
Agents plugin (id:windows-slaves) was split from core in 1.547 and is
now deprecated.  Because it is deprecated, users want to remove it.
They cannot remove it if they have plugins installed that depend on a
Jenkins version prior to 1.547.

Only two plugins actually depend of any classes from the WMI Windows
Agent plugin.

* cli-extras-plugin - never released, no tags, no install history
* multi-slave-config - already requires windows-slaves plugin explicitly
  and already requires a Jenkins core version newer than 1.547. 1340
  installations, last released 8 years ago

Rather than require updates of all the plugins that require a Jenkins
version less than 1.547, this removes the windows-slaves plugin from the
split plugins list.  Users will not be warned that their plugin might
have a dependency on windows-slaves because the analysis has confirmed
that there is only 1 delivered plugin with that dependency, and it is
an explicitly declared dependency with a newer Jenkins minimum version
than the version from which the WMI Windows Agents plugion was split.

Testing done

* Installed suggested plugins from wizard and confirmed WMI Windows
  Agents plugin is not installed

* Installed slave-setup plugin (has implied WMI Windows Agents plugin
  dependency) and confirmed that WMI Windows Agents plugin is not installed

* Installed multi-slave-setup plugin (has explicit WMI Windows Agents
  plugin dependency) and confirmed that WMI Windows Agents plugin was
  installed as a dependency

* Remove multi-slave-setup plugin and WMI Windows Agents plugin and
  confirmed that Jenkins reported no errors or issues

* Installed five plugins with old base versions and confirmed
  that WMI Windows Agents plugin was not installed.  The five plugins
  included backup-plugin, cloudbees-credentials-plugin, unity3d-plugin,
  groovy-label-assignment-plugin, and maven-deployment-linker plugin.

* Performed a backup with the backup plugin and confirmed that it was
  well behaved

https://docs.google.com/spreadsheets/d/1KDIJIu41rIRlj6PjzyhAY9vazKmd3PVwqM3_-32Lt-o/edit?usp=sharing
lists the plugins that have an implied dependency on the WMI Windows
Agents plugin.
@MarkEWaite MarkEWaite added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jan 5, 2023
Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

This change seems fine, but I am afraid it is not a one-time operation as you write in the PR description. Users have complained about this type of problem in other contexts and with other detached plugins, so a general solution would be desirable. However I will not insist on that for this PR.

I am not yet approving this PR because I think it is missing a change to stop bundling windows-slaves in the WAR file in war/pom.xml. It does not make sense to bundle a plugin that is not used, so I think we should stop bundling it in the WAR file. Once that fix is made I would be ready to approve this PR.

Since detached plugin shenanigans are a frequent source of PCT failures, I think it would be prudent to run PCT on this before integrating, but I will not insist on it.

No need to bundle a detached plugin that has no consumers of its API
that are based on a Jenkins version before the plugin was split from core.

jenkinsci#7568 (review)
detected that the bundling was left in by the original commit.
Comment on lines -308 to -314
<artifactItem>
<!-- detached after 1.547 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>windows-slaves</artifactId>
<version>1.8.1</version>
<type>hpi</type>
</artifactItem>
Copy link
Member

Choose a reason for hiding this comment

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

It is helpful to run LoadDetachedPluginsTest#noUpdateSiteWarnings when updating this list, but unfortunately that test has to be @Ignored by default to avoid failing unrelated builds when new security warnings are introduced. As a courtesy I ran that test for you, but it would be helpful to keep this in mind for future changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. As practice for myself, I removed the @Ignore on that test method and ran it to confirm that it passes.

@MarkEWaite MarkEWaite changed the title Do not report implied dependencies for WMI Windows Agents plugin [JENKINS-70301] Do not report implied dependencies for WMI Windows Agents plugin Jan 6, 2023
@MarkEWaite
Copy link
Contributor Author

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

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

/label ready-for-merge

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jan 6, 2023
@MarkEWaite MarkEWaite merged commit f0cbe38 into jenkinsci:master Jan 7, 2023
@MarkEWaite MarkEWaite deleted the remove-windows-slaves-from-split-plugins branch January 7, 2023 15:53
MarkEWaite added a commit to MarkEWaite/slave-setup-plugin that referenced this pull request Jan 8, 2023
The plugin groupId was changed in the pom file after the release of 1.10.
That change caused the release of 1.11 and 1.12 to fail.  The last
release available from the Jenkins update center is 1.10.

There have been significant changes in the master branch of the plugin
since the release of 1.10.  Rather than risk breaking compatibility for
existing users of the 1.10 release, I've removed the incorrect change of
groupId and accepted that this plugin cannot be released without testing
those changes.

I'm not a user of the plugin.  I'm not willing to perform that testing.
If someone else wants to adopt the plugin, perform the additional testing,
and release a new version, this change is a necessary but not sufficient
step towards that release.

Compare the current code to the 1.10 tag for the details of the changes
made since the 1.10 release.

https://issues.jenkins.io/browse/JENKINS-70301 describes the
relationship between this plugin and the WMI Windows Agents plugin.
Users that want to remove the WMI Windows Agents plugin will
also need to remove this plugin or they will need to wait until
jenkinsci/jenkins#7568 is available in Jenkins
core 2.386 or newer.
NotMyFault pushed a commit to NotMyFault/jenkins that referenced this pull request Jan 17, 2023
…ents plugin (jenkinsci#7568)

* Hide split of windows-slaves from other plugins

https://issues.jenkins.io/browse/JENKINS-70301 notes that the WMI Windows
Agents plugin (id:windows-slaves) was split from core in 1.547 and is
now deprecated.  Because it is deprecated, users want to remove it.
They cannot remove it if they have plugins installed that depend on a
Jenkins version prior to 1.547.

Only two plugins actually depend of any classes from the WMI Windows
Agent plugin.

* cli-extras-plugin - never released, no tags, no install history
* multi-slave-config - already requires windows-slaves plugin explicitly
  and already requires a Jenkins core version newer than 1.547. 1340
  installations, last released 8 years ago

Rather than require updates of all the plugins that require a Jenkins
version less than 1.547, this removes the windows-slaves plugin from the
split plugins list.  Users will not be warned that their plugin might
have a dependency on windows-slaves because the analysis has confirmed
that there is only 1 delivered plugin with that dependency, and it is
an explicitly declared dependency with a newer Jenkins minimum version
than the version from which the WMI Windows Agents plugion was split.

Testing done

* Installed suggested plugins from wizard and confirmed WMI Windows
  Agents plugin is not installed

* Installed slave-setup plugin (has implied WMI Windows Agents plugin
  dependency) and confirmed that WMI Windows Agents plugin is not installed

* Installed multi-slave-setup plugin (has explicit WMI Windows Agents
  plugin dependency) and confirmed that WMI Windows Agents plugin was
  installed as a dependency

* Remove multi-slave-setup plugin and WMI Windows Agents plugin and
  confirmed that Jenkins reported no errors or issues

* Installed five plugins with old base versions and confirmed
  that WMI Windows Agents plugin was not installed.  The five plugins
  included backup-plugin, cloudbees-credentials-plugin, unity3d-plugin,
  groovy-label-assignment-plugin, and maven-deployment-linker plugin.

* Performed a backup with the backup plugin and confirmed that it was
  well behaved

https://docs.google.com/spreadsheets/d/1KDIJIu41rIRlj6PjzyhAY9vazKmd3PVwqM3_-32Lt-o/edit?usp=sharing
lists the plugins that have an implied dependency on the WMI Windows
Agents plugin.

* Remove windows-slaves from war file

No need to bundle a detached plugin that has no consumers of its API
that are based on a Jenkins version before the plugin was split from core.

jenkinsci#7568 (review)
detected that the bundling was left in by the original commit.

(cherry picked from commit f0cbe38)
NotMyFault pushed a commit to NotMyFault/jenkins that referenced this pull request Jan 17, 2023
…ents plugin (jenkinsci#7568)

* Hide split of windows-slaves from other plugins

https://issues.jenkins.io/browse/JENKINS-70301 notes that the WMI Windows
Agents plugin (id:windows-slaves) was split from core in 1.547 and is
now deprecated.  Because it is deprecated, users want to remove it.
They cannot remove it if they have plugins installed that depend on a
Jenkins version prior to 1.547.

Only two plugins actually depend of any classes from the WMI Windows
Agent plugin.

* cli-extras-plugin - never released, no tags, no install history
* multi-slave-config - already requires windows-slaves plugin explicitly
  and already requires a Jenkins core version newer than 1.547. 1340
  installations, last released 8 years ago

Rather than require updates of all the plugins that require a Jenkins
version less than 1.547, this removes the windows-slaves plugin from the
split plugins list.  Users will not be warned that their plugin might
have a dependency on windows-slaves because the analysis has confirmed
that there is only 1 delivered plugin with that dependency, and it is
an explicitly declared dependency with a newer Jenkins minimum version
than the version from which the WMI Windows Agents plugion was split.

Testing done

* Installed suggested plugins from wizard and confirmed WMI Windows
  Agents plugin is not installed

* Installed slave-setup plugin (has implied WMI Windows Agents plugin
  dependency) and confirmed that WMI Windows Agents plugin is not installed

* Installed multi-slave-setup plugin (has explicit WMI Windows Agents
  plugin dependency) and confirmed that WMI Windows Agents plugin was
  installed as a dependency

* Remove multi-slave-setup plugin and WMI Windows Agents plugin and
  confirmed that Jenkins reported no errors or issues

* Installed five plugins with old base versions and confirmed
  that WMI Windows Agents plugin was not installed.  The five plugins
  included backup-plugin, cloudbees-credentials-plugin, unity3d-plugin,
  groovy-label-assignment-plugin, and maven-deployment-linker plugin.

* Performed a backup with the backup plugin and confirmed that it was
  well behaved

https://docs.google.com/spreadsheets/d/1KDIJIu41rIRlj6PjzyhAY9vazKmd3PVwqM3_-32Lt-o/edit?usp=sharing
lists the plugins that have an implied dependency on the WMI Windows
Agents plugin.

* Remove windows-slaves from war file

No need to bundle a detached plugin that has no consumers of its API
that are based on a Jenkins version before the plugin was split from core.

jenkinsci#7568 (review)
detected that the bundling was left in by the original commit.

(cherry picked from commit f0cbe38)
NotMyFault pushed a commit to NotMyFault/jenkins that referenced this pull request Jan 17, 2023
…ents plugin (jenkinsci#7568)

* Hide split of windows-slaves from other plugins

https://issues.jenkins.io/browse/JENKINS-70301 notes that the WMI Windows
Agents plugin (id:windows-slaves) was split from core in 1.547 and is
now deprecated.  Because it is deprecated, users want to remove it.
They cannot remove it if they have plugins installed that depend on a
Jenkins version prior to 1.547.

Only two plugins actually depend of any classes from the WMI Windows
Agent plugin.

* cli-extras-plugin - never released, no tags, no install history
* multi-slave-config - already requires windows-slaves plugin explicitly
  and already requires a Jenkins core version newer than 1.547. 1340
  installations, last released 8 years ago

Rather than require updates of all the plugins that require a Jenkins
version less than 1.547, this removes the windows-slaves plugin from the
split plugins list.  Users will not be warned that their plugin might
have a dependency on windows-slaves because the analysis has confirmed
that there is only 1 delivered plugin with that dependency, and it is
an explicitly declared dependency with a newer Jenkins minimum version
than the version from which the WMI Windows Agents plugion was split.

Testing done

* Installed suggested plugins from wizard and confirmed WMI Windows
  Agents plugin is not installed

* Installed slave-setup plugin (has implied WMI Windows Agents plugin
  dependency) and confirmed that WMI Windows Agents plugin is not installed

* Installed multi-slave-setup plugin (has explicit WMI Windows Agents
  plugin dependency) and confirmed that WMI Windows Agents plugin was
  installed as a dependency

* Remove multi-slave-setup plugin and WMI Windows Agents plugin and
  confirmed that Jenkins reported no errors or issues

* Installed five plugins with old base versions and confirmed
  that WMI Windows Agents plugin was not installed.  The five plugins
  included backup-plugin, cloudbees-credentials-plugin, unity3d-plugin,
  groovy-label-assignment-plugin, and maven-deployment-linker plugin.

* Performed a backup with the backup plugin and confirmed that it was
  well behaved

https://docs.google.com/spreadsheets/d/1KDIJIu41rIRlj6PjzyhAY9vazKmd3PVwqM3_-32Lt-o/edit?usp=sharing
lists the plugins that have an implied dependency on the WMI Windows
Agents plugin.

* Remove windows-slaves from war file

No need to bundle a detached plugin that has no consumers of its API
that are based on a Jenkins version before the plugin was split from core.

jenkinsci#7568 (review)
detected that the bundling was left in by the original commit.

(cherry picked from commit f0cbe38)
MarkEWaite added a commit to MarkEWaite/update-center2 that referenced this pull request Aug 9, 2024
We suspend distribution of plugins that depend on a service that no
longer exists or is end of life like:

* jenkins-infra#732
* jenkins-infra#708
* jenkins-infra#676
* jenkins-infra#587

This is a similar case to services that are end of life.  Windows is
not end of life, but the services required for this plugin have been end
of life since at least March 2023. The plugin was deprecated as noted in
https://github.com/jenkinsci/windows-slaves-plugin?tab=readme-ov-file#notice-of-deprecation
almost two years ago in November 2022.
jenkinsci/windows-slaves-plugin@cdafd13

The plugin installation statistics
https://stats.jenkins.io/pluginversions/windows-slaves.html show that
there are still almost 80,000 installations of the plugin, but only 22%
of those installations are on 2.426.3 or newer.  Most installations of
the plugin are not upgrading their Jenkins controller version.

Users with the plugin already installed will not be affected by
distribution being suspended.  Users with configuration as code
definitions that include the plugin will need to remove it from their
configuration as code definition.  They will receive an error message
when they attempt to download the plugin version.

Implied dependencies on the plugin were removed from Jenkins 2.386

* jenkinsci/jenkins#7568

The plugin was removed from the setup wizard in Jenkins 2.379

* jenkinsci/jenkins#7414

Fix jenkins-infra/helpdesk#4221
daniel-beck pushed a commit to jenkins-infra/update-center2 that referenced this pull request Aug 22, 2024
We suspend distribution of plugins that depend on a service that no
longer exists or is end of life like:

* #732
* #708
* #676
* #587

This is a similar case to services that are end of life.  Windows is
not end of life, but the services required for this plugin have been end
of life since at least March 2023. The plugin was deprecated as noted in
https://github.com/jenkinsci/windows-slaves-plugin?tab=readme-ov-file#notice-of-deprecation
almost two years ago in November 2022.
jenkinsci/windows-slaves-plugin@cdafd13

The plugin installation statistics
https://stats.jenkins.io/pluginversions/windows-slaves.html show that
there are still almost 80,000 installations of the plugin, but only 22%
of those installations are on 2.426.3 or newer.  Most installations of
the plugin are not upgrading their Jenkins controller version.

Users with the plugin already installed will not be affected by
distribution being suspended.  Users with configuration as code
definitions that include the plugin will need to remove it from their
configuration as code definition.  They will receive an error message
when they attempt to download the plugin version.

Implied dependencies on the plugin were removed from Jenkins 2.386

* jenkinsci/jenkins#7568

The plugin was removed from the setup wizard in Jenkins 2.379

* jenkinsci/jenkins#7414

Fix jenkins-infra/helpdesk#4221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants