On 19/03/2019 17.26, Julien HENRY wrote:
My tests are green when executed with Jenkins 2.164.1! That's already great news, thanks for your help.

But with the oldest Jenkins version we are supporting (2.89.4), all pipeline related tests are failing. I wonder if this could be an issue with the update center.

Quite likely, see[1] to check for which LTS lines we still distribute update centers. 2.89 is the latest we have dropped the UC for to this day. The infra falls back to UC for latest weekly and it is not able to satisfy plugin dependencies given the ancient core.

You might want to setup and maintain you own UC for releases you support to prevent this from happening (as upstream UCs are rotated (a)periodically) if you have not already.

[1] https://updates.jenkins-ci.org/

@WithPlugins("workflow-aggregator")

In logs, I can see:

*16:27:41* INFO: workflow-aggregator is not installed

[...]

*16:27:41* Mar 19, 2019 4:27:41 PM 
org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1 installPlugins
*16:27:41* INFO: Installing plugins for test: [workflow-aggregator, sonar, 
filesystem_scm, plain-credentials]

[...]

*16:28:27* master57755|INFO: Adding dependent install of 
pipeline-model-definition for plugin workflow-aggregator

[...]

*16:28:27* master57755|INFO: Adding dependent install of 
workflow-cps-global-lib for plugin pipeline-model-definition

[...]

*16:28:35* master57755|INFO: Starting the installation of Pipeline: Shared 
Groovy Libraries on behalf of anonymous
*16:28:35* Mar 19, 2019 4:28:35 PM 
org.jenkinsci.test.acceptance.update_center.MockUpdateCenter 
lambda$ensureRunning$3
*16:28:35* INFO: serving 
/home/ssjenka/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-cps-global-lib/2.13/workflow-cps-global-lib-2.13.hpi
*16:28:36* master57755|Mar 19, 2019 4:28:35 PM 
hudson.model.UpdateCenter$UpdateCenterConfiguration download
*16:28:36* master57755|INFO: Downloading Pipeline: Shared Groovy Libraries
*16:28:36* master57755|Mar 19, 2019 4:28:35 PM hudson.PluginManager dynamicLoad
*16:28:36* master57755|INFO: Attempting to dynamic load 
/home/ssjenka/cix/workspace/sonar-scanner-jenkins-qa/4adbdb2c/its/target/jenkins1486774028372987495home/plugins/workflow-cps-global-lib.jpi
*16:28:36* master57755|Mar 19, 2019 4:28:36 PM 
hudson.model.UpdateCenter$DownloadJob run
*16:28:36* master57755|SEVERE: Failed to install Pipeline: Shared Groovy 
Libraries
*16:28:36* master57755|java.io.IOException: Failed to dynamically deploy this 
plugin
*16:28:36* master57755| at 
hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1893)
*16:28:36* master57755| at 
hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
*16:28:36* master57755| at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
*16:28:36* master57755| at 
java.util.concurrent.FutureTask.run(FutureTask.java:266)
*16:28:36* master57755| at 
hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
*16:28:36* master57755| at java.lang.Thread.run(Thread.java:748)
*16:28:36* master57755|Caused by: java.io.IOException: Failed to install 
workflow-cps-global-lib plugin
*16:28:36* master57755| at 
hudson.PluginManager.dynamicLoad(PluginManager.java:882)
*16:28:36* master57755| at 
hudson.PluginManager.dynamicLoad(PluginManager.java:821)
*16:28:36* master57755| at 
hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1889)
*16:28:36* master57755| ... 5 more
*16:28:36* master57755|Caused by: java.io.IOException: Pipeline: Shared Groovy 
Libraries v2.13 failed to load.
*16:28:36* master57755| - You must update Jenkins from v2.89.4 to v2.107.3 or 
later to run this plugin.
*16:28:36* master57755| at 
hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626)
*16:28:36* master57755| at 
hudson.PluginManager.dynamicLoad(PluginManager.java:872)
*16:28:36* master57755| ... 7 more


Do you know why is workflow-cps-global-lib plugin 2.13 selected to be installed if it is not compatible with Jenkins 2.89.4? Shouldn't it always select the latest compatible version?



Julien Henry | SonarSource

Developer

https://sonarsource.com <https://sonarsource.com/>


Le mar. 19 mars 2019 à 14:01, Julien HENRY <[email protected] <mailto:[email protected]>> a écrit :

    You got it right :)

    I have tested removing the sha1 only and it works fine, I will open
    a PR.

    Julien Henry | SonarSource

    Developer

    https://sonarsource.com <https://sonarsource.com/>


    Le mar. 19 mars 2019 à 10:05, Oliver Gondža <[email protected]
    <mailto:[email protected]>> a écrit :

        Hey, let me see if I understand that.

        Your ATH version is new enough to correctly spoof the checksum
        so it
        works (for latest Jenkins versions, at least). Where it does not
        work is
        older versions of Jenkins, from before the sha512 was
        introduced, since
        the other checksums are not modified.

        Provided this is correct, I would be more than welcome to
        propose a fix
        to add them in the spirit of[1]. BTW, I might not be remembering
        this
        correctly, but older versions of Jenkins was accepting metadata
        with no
        checksum at all[2] so removing the sha1 _might_ work equally well.

        Hope that helps!

        [1]
        
https://github.com/jenkinsci/acceptance-test-harness/commit/240e438e2a3ab719a7301ab112de470fd503572e#diff-e5a5651006d379f437e8f02dfa5866deR133
        [2]
        
https://github.com/jenkinsci/acceptance-test-harness/commit/240e438e2a3ab719a7301ab112de470fd503572e#diff-e5a5651006d379f437e8f02dfa5866deL129

        On 19/03/2019 09.31, Julien HENRY wrote:
         > Hi Olivier,
         >
         > New question today. Tests are passing locally on my box. But
        I have some
         > errors when trying to run them on our CI.
         >
         > The error is:
         >
         > *16:14:32* master60888|INFO: Starting the installation of
        SonarQube Scanner on behalf of anonymous
         > *16:14:32* Mar 18, 2019 4:14:31 PM
        org.jenkinsci.test.acceptance.update_center.MockUpdateCenter
        lambda$ensureRunning$3
         > *16:14:32* INFO: serving
        
/home/ssjenka/cix/workspace/sonar-scanner-jenkins-qa/4bfcaa4d/its/sonar-2.9.0.2184.hpi
         > *16:14:32* master60888|Mar 18, 2019 4:14:31 PM
        hudson.model.UpdateCenter$UpdateCenterConfiguration download
         > *16:14:32* master60888|INFO: Downloading SonarQube Scanner
         > *16:14:32* master60888|Mar 18, 2019 4:14:32 PM
        hudson.model.UpdateCenter$DownloadJob run
         > *16:14:32* master60888|SEVERE: Failed to install SonarQube
        Scanner
         > *16:14:32* master60888|java.io <http://java.io>.IOException:
        Downloaded file
        
/home/ssjenka/cix/workspace/sonar-scanner-jenkins-qa/4bfcaa4d/its/target/jenkins5732199865628847180home/plugins/sonar.jpi.tmp
        does not match expected SHA-1, expected
        'Eus1cNBamti/4FOVkn3XRwCvvKc=', actual
        'yfMPBYKO2mBfTUzsaVdgGB3l0KI='
         > *16:14:32* master60888|       at
        hudson.model.UpdateCenter.verifyChecksums(UpdateCenter.java:1810)
         > *16:14:32* master60888|       at
        hudson.model.UpdateCenter.access$1100(UpdateCenter.java:149)
         > *16:14:32* master60888|       at
        
hudson.model.UpdateCenter$InstallationJob.replace(UpdateCenter.java:1963)
         > *16:14:32* master60888|       at
        
hudson.model.UpdateCenter$UpdateCenterConfiguration.install(UpdateCenter.java:1194)
         > *16:14:32* master60888|       at
        hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1680)
         > *16:14:32* master60888|       at
        hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1874)
         > *16:14:32* master60888|       at
        hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
         > *16:14:32* master60888|       at
        java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
         > *16:14:32* master60888|       at
        java.util.concurrent.FutureTask.run(FutureTask.java:266)
         > *16:14:32* master60888|       at
        
hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112)
         > *16:14:32* master60888|       at
        java.lang.Thread.run(Thread.java:748)
         > *16:14:32* master60888|
         > *16:14:32* master60888|Mar 18, 2019 4:14:32 PM
        hudson.model.UpdateCenter$DownloadJob run
         >
         >
         > I'm "installing" our plugin under test using:
         > export LOCAL_JARS=$PWD/sonar-$CURRENT_VERSION.hpi
         >
         > and I have checked earlier logs and the MockUpdateCenter
        seems to work fine:
         >
         > *16:13:38* INFO: Installing plugins for test: [sonar,
        filesystem_scm, plain-credentials]
         > *16:13:38*
        
Downloadinghttps://updates.jenkins-ci.org/update-center.json?version=2.107.3
<http://updates.jenkins-ci.org/update-center.json?version=2.107.3> to /tmp/update-center-2.107.3.jsonp
         > *16:13:40* Overriding sonar 2.8.1 with local build of 2.9.0.2184
         >
         > [...]
         >
         > *16:13:40* Mar 18, 2019 4:13:40 PM
        org.jenkinsci.test.acceptance.update_center.MockUpdateCenter
        updating
         > *16:13:40* INFO: for sonar updating version from 2.8.1 to
        2.9.0.2184
         > *16:13:40* Mar 18, 2019 4:13:40 PM
        org.jenkinsci.test.acceptance.update_center.MockUpdateCenter
        updating
         > *16:13:40* INFO: for sonar updating gav from
        org.jenkins-ci.plugins:sonar:2.8.1 to
        org.jenkins-ci.plugins:sonar:2.9.0.2184
         >
         >
         > I have looked at the code and I found that MockUpdateCenter
        is only
         > replacing the sha512:
         >
        
https://github.com/jenkinsci/acceptance-test-harness/blob/9551635b62f9a6456d1fae8d2c02dfd0f4cfe2c8/src/main/java/org/jenkinsci/test/acceptance/update_center/MockUpdateCenter.java#L135
         >
         > Then I discovered that support of sha512 was only added
        "recently":
         >
        
https://github.com/jenkinsci/jenkins/commit/6dc32977fc6772a2e18452672d69b8b93ea3e832
         >
         > In our ITs we are testing a matrix including the older
        supported Jenkins
         > version and the more recent LTS. What about changing the
         > MockUpdateCenter to also support overriding sha1 to support
        older
         > Jenkins versions?
         >
         > ++
         >
         > Julien Henry | SonarSource
         >
         > Developer
         >
         > https://sonarsource.com <https://sonarsource.com/>
         >
         >
         > Le lun. 18 mars 2019 à 08:05, Oliver Gondža
        <[email protected] <mailto:[email protected]>
         > <mailto:[email protected] <mailto:[email protected]>>> a écrit :
         >
         >     On 17/03/2019 21.49, Julien HENRY wrote:
         >
         >      > I'm really surprised some existing acceptance tests
        but ours are
         >      > depending on installing the SonarScanner. Would it be
        possible to
         >     submit
         >      > a PR removing the file, and see what happen? Is the
        full test suite
         >      > executed on PRs?
         >
         >     Extra cere must be taken to make sure this is not going
        to cause a
         >     problem somewhere, but yes, why not.
         >
         >     Thanks for the 2 PRs. One was merged right away, the
        other one needs
         >     some polishing but looks good as well.
         >
         >     --
         >     oliver
         >


-- oliver



--
oliver

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/496fe81a-c34f-b9ad-78f9-c4fcfcf87f6a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to