Remove pre 2.0 detached plugins (#27098)

* Remove pre 2.0 detached plugins

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix tests relying on unbundled detached plugins

PluginManagerInstalledGUITest copied matrix-auth.hpi out of the war;
switch to command-launcher, which is still bundled, has no dependents in
the test environment (unlike javax-activation-api, which jaxb and
javax-mail-api depend on), and whose only dependency (script-security)
is already provided as a test dependency.

ClassicPluginStrategyTest's foo4.hpi fixture declared a dependency on
junit, which is no longer bundled; regenerate it against
javax-activation-api, mirroring how ant was swapped for junit in #5338.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Delete test

* Remove local data fixture

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-07-19 21:38:53 -06:00
1 parent f75bc4b1bf
commit 824ff91db0
5 files changed
+12 -296

No files matched your search

@@ -66,13 +66,13 @@ class PluginManagerInstalledGUITest {
session.then(j -> {
InstalledPlugins installedPlugins = new InstalledPlugins(j);
InstalledPlugin matrixAuthPlugin = installedPlugins.get("matrix-auth");
InstalledPlugin commandLauncherPlugin = installedPlugins.get("command-launcher");
InstalledPlugin dependeePlugin = installedPlugins.get("dependee");
InstalledPlugin dependerPlugin = installedPlugins.get("depender");
InstalledPlugin mandatoryDependerPlugin = installedPlugins.get("mandatory-depender");
// As a detached plugin, it is an optional dependency of others built against a newer baseline.
matrixAuthPlugin.assertHasNoDependents();
commandLauncherPlugin.assertHasNoDependents();
// Has a mandatory dependency:
dependeePlugin.assertHasDependents();
// Leaf plugins:
@@ -119,13 +119,13 @@ class PluginManagerInstalledGUITest {
dependerPlugin.assertEnabled();
// You can disable a detached plugin if there is no explicit dependency on it.
matrixAuthPlugin.assertEnabled();
matrixAuthPlugin.assertEnabledStateChangeable();
matrixAuthPlugin.assertUninstallable();
matrixAuthPlugin.clickEnabledWidget();
matrixAuthPlugin.assertNotEnabled();
matrixAuthPlugin.assertEnabledStateChangeable();
matrixAuthPlugin.assertUninstallable();
commandLauncherPlugin.assertEnabled();
commandLauncherPlugin.assertEnabledStateChangeable();
commandLauncherPlugin.assertUninstallable();
commandLauncherPlugin.clickEnabledWidget();
commandLauncherPlugin.assertNotEnabled();
commandLauncherPlugin.assertEnabledStateChangeable();
commandLauncherPlugin.assertUninstallable();
});
}
@@ -307,7 +307,7 @@ class PluginManagerInstalledGUITest {
try {
return super.loadBundledPlugins();
} finally {
copyBundledPlugin(PluginManagerInstalledGUITest.class.getResource("/WEB-INF/detached-plugins/matrix-auth.hpi"), "matrix-auth.jpi"); // cannot use installDetachedPlugin at this point
copyBundledPlugin(PluginManagerInstalledGUITest.class.getResource("/WEB-INF/detached-plugins/command-launcher.hpi"), "command-launcher.jpi"); // cannot use installDetachedPlugin at this point
copyBundledPlugin(PluginManagerInstalledGUITest.class.getResource("/plugins/dependee-0.0.2.hpi"), "dependee.jpi");
copyBundledPlugin(PluginManagerInstalledGUITest.class.getResource("/plugins/depender-0.0.2.hpi"), "depender.jpi");
copyBundledPlugin(PluginManagerInstalledGUITest.class.getResource("/plugins/mandatory-depender-0.0.2.hpi"), "mandatory-depender.jpi");
@@ -66,21 +66,6 @@ class LoadDetachedPluginsTest {
private final LogRecorder logging = new LogRecorder();
@Issue("JENKINS-48365")
@Test
@LocalData
void upgradeFromJenkins1() throws Throwable {
VersionNumber since = new VersionNumber("1.490");
rr.then(r -> {
List<DetachedPlugin> detachedPlugins = DetachedPluginsUtil.getDetachedPlugins(since);
assertThat("Plugins have been detached since the pre-upgrade version",
detachedPlugins.size(), greaterThan(4));
assertThat("Plugins detached between the pre-upgrade version and the current version should be installed",
getInstalledDetachedPlugins(r, detachedPlugins).size(), equalTo(detachedPlugins.size()));
assertNoFailedPlugins(r);
});
}
@Test
@Disabled("Only useful while updating bundled plugins, otherwise new security warnings fail unrelated builds")
@LocalData
@@ -1,34 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors/>
<version>1.490</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>
<securityRealm class="hudson.security.SecurityRealm$None"/>
<disableRememberMe>false</disableRememberMe>
<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
<workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULLNAME}</workspaceDir>
<buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
<jdks/>
<viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
<clouds/>
<quietPeriod>5</quietPeriod>
<scmCheckoutRetryCount>0</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner class="hudson" reference="../../.."/>
<name>All</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
<primaryView>All</primaryView>
<slaveAgentPort>0</slaveAgentPort>
<label></label>
<nodeProperties/>
<globalNodeProperties/>
</hudson>
+2 -237
View File
@@ -273,145 +273,12 @@ THE SOFTWARE.
Detached plugins and their dependencies - detached plugins that used to be bundled plugins
-->
<artifactItem>
<!-- dependency of checks-api, junit, and mailer -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>display-url-api</artifactId>
<version>2.217.va_6b_de84cc74b_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- detached after 1.493 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>534.v1b_36f5864073</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- detached after 1.535 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-auth</artifactId>
<version>3.3</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- detached after 1.553 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>antisamy-markup-formatter</artifactId>
<version>173.v680e3a_b_69ff3</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- detached after 1.561 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>870.v9db_fcfc2f45b_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of command-launcher, junit, matrix-project, and workflow-support -->
<!-- dependency of command-launcher -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1402.1405.vc96e74964250</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- detached after 1.577 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1415.vcb_3245e24402</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of junit, plugin-util-api, and workflow-support -->
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>1413.v2ff1a_5e720fa_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of checks-api, echarts-api, font-awesome-api, and junit -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>plugin-util-api</artifactId>
<version>7.1341.v039f146993d9</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of echarts-api and junit -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>bootstrap5-api</artifactId>
<version>5.3.8-1048.va_c299057e35c</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of junit -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>checks-api</artifactId>
<version>415.vf022234a_931d</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of junit -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>prism-api</artifactId>
<version>1.30.0-741.v034eb_0b_0a_a_fa_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of checks-api and plugin-util-api -->
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>1015.v785e5a_b_b_8b_22</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of echarts-api -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.22.0-439.vb_b_43658d6176</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of junit -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>jackson3-api</artifactId>
<version>3.2.1-92.vd25c2e23c180</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jackson2-api and jackson3-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>jackson-annotations2-api</artifactId>
<version>2.22-19.v10a_a_582ea_26e</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jackson3-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>snakeyaml-engine-api</artifactId>
<version>3.0.1-5.vd98ea_ff3b_92e</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jackson2-api and jackson3-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>woodstox-core-api</artifactId>
<version>7.2.1-6.v3718a_a_11f5c4</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of junit -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>echarts-api</artifactId>
<version>6.0.0-1287.vfd24c22a_3d00</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of trilead-api -->
<groupId>io.jenkins.plugins</groupId>
@@ -420,65 +287,12 @@ THE SOFTWARE.
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jackson2-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>snakeyaml-api</artifactId>
<version>2.5-149.v72471e9c6371</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jackson2-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-xml-bind-api</artifactId>
<version>4.0.9-19.v2b_a_5b_44d9a_1c</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of script-security and workflow-support -->
<!-- dependency of script-security -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>caffeine-api</artifactId>
<version>3.2.4-208.v7e2da_a_7db_82b_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of echarts-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>jquery3-api</artifactId>
<version>3.7.1-687.v68d468e40b_30</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of bootstrap5-api and echarts-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>font-awesome-api</artifactId>
<version>7.2.0-990.vf220b_2a_496f9</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of checks-api, junit, plugin-util-api, workflow-api, and workflow-support -->
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>724.v538c2362b_dfb_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of workflow-api and workflow-support -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scm-api</artifactId>
<version>728.vc30dcf7a_0df5</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of scm-api and workflow-step-api -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>362.va_b_695ef4fdf9</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- detached after 2.16 -->
<groupId>org.jenkins-ci.plugins</groupId>
@@ -549,27 +363,6 @@ THE SOFTWARE.
<version>4.5.14-269.vfa_2321039a_83</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of scm-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>asm-api</artifactId>
<version>9.10.1-216.va_9256d3b_844b_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of bootstrap5-api, checks-api, commons-text-api, echarts-api, font-awesome-api, jquery3-api, and plugin-util-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
<version>3.20.0-109.ve43756e2d2b_4</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of bootstrap5-api, checks-api, echarts-api, font-awesome-api, jquery3-api, and plugin-util-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-text-api</artifactId>
<version>1.15.0-218.va_61573470393</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of trilead-api -->
<groupId>io.jenkins.plugins</groupId>
@@ -577,34 +370,6 @@ THE SOFTWARE.
<version>2.14.0-201.v8eefe5515533</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of junit and matrix-auth -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>ionicons-api</artifactId>
<version>94.vcc3065403257</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jakarta-mail-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-activation-api</artifactId>
<version>2.1.4-1</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of mailer -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-mail-api</artifactId>
<version>2.1.5-1</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of jackson2-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>json-api</artifactId>
<version>20250517-173.v596efb_962a_31</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<!-- dependency of mina-sshd-api-core and sshd -->
<groupId>io.jenkins.plugins.mina-sshd-api</groupId>