acceptance-test-harness icon indicating copy to clipboard operation
acceptance-test-harness copied to clipboard

1.116 and later unusable with `runATH`

Open basil opened this issue 2 years ago • 6 comments

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)?

Ubuntu 22.04.1 LTS x86_64

Reproduction steps

Create an essentials.yml file with …

---
ath:
  useLocalSnapshots: false
  athRevision: "acceptance-test-harness-1.117"
  athImage: "jenkins/ath:1.97-pre"
  categories:
    - org.jenkinsci.test.acceptance.junit.SmokeTest
  jdks:
    - 11

… noting that these are the very latest versions of the official Acceptance Test Harness (1.117) and its official Docker image (1.97-pre) at the time of this writing. Then in your Jenkinsfile add runATH metadataFile: metadataPath and run the build.

Expected Results

The build passes.

Actual Results

The build fails with:

[2022-08-01T16:46:14.524Z] [INFO] --- maven-enforcer-plugin:3.1.0:enforce (display-info) @ acceptance-test-harness ---
[2022-08-01T16:46:14.904Z] [WARNING] The artifact org.slf4j:slf4j-log4j12:jar:1.7.36 has been relocated to org.slf4j:slf4j-reload4j:jar:1.7.36
[2022-08-01T16:46:14.904Z] [INFO] Adding ignore: module-info
[2022-08-01T16:46:15.296Z] [WARNING] The artifact org.slf4j:slf4j-log4j12:jar:1.7.36 has been relocated to org.slf4j:slf4j-reload4j:jar:1.7.36
[2022-08-01T16:46:23.044Z] [ERROR] Rule 1: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
[2022-08-01T16:46:23.045Z] 3.8.1 required to no longer download dependencies via HTTP (use HTTPS instead).
[2022-08-01T16:46:23.045Z] [INFO] ------------------------------------------------------------------------
[2022-08-01T16:46:23.045Z] [INFO] BUILD FAILURE
[2022-08-01T16:46:23.045Z] [INFO] ------------------------------------------------------------------------
[2022-08-01T16:46:23.045Z] [INFO] Total time:  51.341 s
[2022-08-01T16:46:23.045Z] [INFO] Finished at: 2022-08-01T16:46:22Z
[2022-08-01T16:46:23.045Z] [INFO] ------------------------------------------------------------------------
[2022-08-01T16:46:23.045Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.1.0:enforce (display-info) on project acceptance-test-harness: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[2022-08-01T16:46:23.045Z] [ERROR] 
[2022-08-01T16:46:23.045Z] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[2022-08-01T16:46:23.045Z] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[2022-08-01T16:46:23.045Z] [ERROR] 
[2022-08-01T16:46:23.045Z] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[2022-08-01T16:46:23.045Z] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
script returned exit code 1

Anything else?

Evaluation

The version of Maven in the latest official Docker image is 3.6.3, but as of #851 (and thefefore https://github.com/jenkinsci/pom/pull/198) Maven 3.8.1 or later is required. As a result, Acceptance Test Harness 1.116 or later is unusable with https://github.com/jenkins-infra/pipeline-library/blob/5d1f824b90a231752fa543c69b5615b1a1a5884f/vars/runATH.groovy.

Suggested solution

As commit 74fc2517ca51c316fa66548dea97ec4364651ef5 updated Maven in the Dockerfile to 3.8.2, which is a sufficiently recent version, I suggest releasing a new official Docker image that contains this change for use with runATH.

basil avatar Aug 01 '22 17:08 basil

Previous versions of the docker image were published manually, I don't have access to an x64 machine currently to build one.

Likely better to just finally automate this when someone gets a chance

timja avatar Aug 01 '22 18:08 timja

If you are not able to address this regression in a timely fashion, should the Enforcer rule be relaxed as a workaround?

basil avatar Aug 01 '22 19:08 basil

Could do, is there a pressing need to update now?

timja avatar Aug 01 '22 19:08 timja

We got lucky because https://github.com/jenkinsci/acceptance-test-harness/pull/711 (which I needed to avoid flakiness in core builds) happened to be present in 1.114, but I am concerned we may not be so lucky the next time, especially if a bug is discovered that requires a new PR to be created and released. In such a theoretical scenario, the person fixing that bug would also have to deal with this bug as well. In general any failed dependency upgrade of an internal dependency is a liability.

basil avatar Aug 01 '22 19:08 basil

If you are

There are many other ATH 'maintainers' who could also assist,

image

@jenkinsci/acceptance-test-harness-developers

timja avatar Aug 02 '22 08:08 timja

I have x86 so could publish - but I do not have the credentials to do so.

jtnord avatar Aug 11 '22 11:08 jtnord

A new docker image has been released, and future ones are released automatically.

NotMyFault avatar Sep 14 '22 16:09 NotMyFault

Many thanks to all who worked on this!

basil avatar Sep 14 '22 16:09 basil