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

MockUpdateCenter regularly has corrupted plugin downloads #1297

Open
jtnord opened this issue Jul 27, 2023 · 1 comment
Open

MockUpdateCenter regularly has corrupted plugin downloads #1297

jtnord opened this issue Jul 27, 2023 · 1 comment
Labels

Comments

@jtnord
Copy link
Member

jtnord commented Jul 27, 2023

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.

@jtnord jtnord added the bug label Jul 27, 2023
@jtnord
Copy link
Member Author

jtnord commented Jul 27, 2023

ahh.....

incrementals is not behaving as expected.

compare https://repo.jenkins-ci.org/ui/repos/tree/General/releases/org/jenkins-ci/plugins/jackson2-api/2.15.2-350.v0c2f3f8fc595/jackson2-api-2.15.2-350.v0c2f3f8fc595.hpi vs https://repo.jenkins-ci.org/ui/repos/tree/General/incrementals/org/jenkins-ci/plugins/jackson2-api/2.15.2-350.v0c2f3f8fc595/jackson2-api-2.15.2-350.v0c2f3f8fc595.hpi

the shas are different c8ca30e9759c473a7bf8d21f29f3f291be0030f183bfd173adb06b8c555b6d82 (incremental repo) vs 41c78ad46a4ce3fc40b353bf4cd425aa18d2a4dbfe826624c62834e4b19fdaad (non incremental)

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

No branches or pull requests

1 participant