Skip to content

MockUpdateCenter regularly has corrupted plugin downloads #1297

@jtnord

Description

@jtnord

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows 11

Reproduction steps

with a m2 repository with several required plugins already available (from regular maven builds pulling dependencies) installed.

  • mvn -P lts test

Expected Results

tests install the required plugins for the test as determined by @WithPlugins or other code

Actual Results

tests fails, resolved HPIs are corrupted.

master1740766363|2023-07-26 19:51:58.975+0000 [id=136]  INFO    h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading jackson2-api
master1740766363|2023-07-26 19:51:59.067+0000 [id=136]  SEVERE  h.model.UpdateCenter$DownloadJob#run: Failed to install jackson2-api
master1740766363|java.io.IOException: Downloaded file C:\workarea\source\github\jenkinsci\acceptance-test-harness\target\jenkinshome8417413392245346575\plugins\jackson2-api.jpi.tmp does not match expected SHA-256, expected 'QceK1GpM4/xAs1O/TNQlqhjSpNv+gmYkxig05LGf2q0=', actual 'yMow6XWcRzp7+NIfKfPykb4AMPGDv9FzrbBrjFVbbYI='
master1740766363|       at hudson.model.UpdateCenter.throwVerificationFailure(UpdateCenter.java:2042)
master1740766363|       at hudson.model.UpdateCenter.verifyChecksums(UpdateCenter.java:2077)
master1740766363|       at hudson.model.UpdateCenter$InstallationJob.replace(UpdateCenter.java:2275)
master1740766363|       at hudson.model.UpdateCenter$UpdateCenterConfiguration.install(UpdateCenter.java:1341)
master1740766363|       at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1879)
master1740766363|       at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2188)
master1740766363|       at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1850)
master1740766363|       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
master1740766363|       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
master1740766363|       at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:121)
master1740766363|       at java.base/java.lang.Thread.run(Thread.java:829)
master1740766363|2023-07-26 19:51:59.067+0000 [id=136]  INFO    h.model.UpdateCenter$DownloadJob#run: Starting the installation of commons-lang3-api on behalf of anonymous

Anything else?

I verified that the plugin in c/Users/jnord/.m2/repository/org/jenkins-ci/plugins/jackson2-api/2.15.2-350.v0c2f3f8fc595 has an incorrect hash according to https://updates.jenkins.io/download/plugins/jackson2-api/#2.15.2-350.v0c2f3f8fc595

removing plugins and reruning the tests move the tests forward (there are generally several plugins that become corrupted).

Given that the tests pass in CI and on many other users machines I am guessing that there is some buggy file handling code that is triggered on windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions