Coder Social home page Coder Social logo

jenkinsci / bom Goto Github PK

View Code? Open in Web Editor NEW
45.0 8.0 49.0 2.89 MB

Define plugin dependencies via BOM

Home Page: https://jenkins.io/doc/developer/plugin-development/dependency-management/#jenkins-plugin-bom

Shell 35.57% Groovy 22.14% Java 42.30%
jenkins developer-tools

bom's Introduction

Bill of Materials for Jenkins plugins

This repository implements a Maven BOM which can be used in a plugin POM to more easily manage dependencies on other common plugins. This is important because version management is a common annoyance. See JENKINS-47498 for the background.

A secondary purpose of this repository is to regularly perform plugin compatibility testing (PCT) against new or forthcoming releases of core and plugins.

If you are interested in a Bill of Materials for Jenkins core components, see this page.

Usage

After selecting your plugin’s LTS baseline:

<jenkins.version>2.426.3</jenkins.version>

just import the latest BOM from that line:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.jenkins.tools.bom</groupId>
            <artifactId>bom-2.426.x</artifactId>
            <version>…</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

Now you can declare dependencies on many plugins without needing to specify a version:

<dependency>
    <groupId>org.jenkins-ci.plugins.workflow</groupId>
    <artifactId>workflow-cps</artifactId>
    <scope>test</scope>
</dependency>

You can always override a version managed by the BOM if you wish, but if you find the need to use a newer version, first try just updating the version in the BOM and cutting a new release of it.

When starting to use the BOM in an existing plugin, you may find that many existing dependencies do not need to be expressed at all and can be deleted, if they were added solely to satisfy the RequireUpperBoundDeps Enforcer rule or similar. Maven will automatically add transitive dependencies to your classpath, so you should only need to declare an explicit dependency on another plugin when:

  • You compile against it. (Use test scope if it is only used in tests.)
  • It is required to be present and not otherwise loaded transitively. (For example, workflow-basic-steps and workflow-durable-task-step are commonly required for tests which run Pipeline builds.)

The command

mvn dependency:analyze

can offer clues about unused plugin dependencies, though you must evaluate each carefully since it only understands Java binary dependencies (what is required for compilation, more or less).

A BOM tutorial video is available in the Jenkins developer documentation.

Depending on bom-weekly

The bom-weekly line is a special artifact that follows the weekly release of Jenkins core. You would only depend on it when you are actively tracking the weekly release line.

Some examples of when you would use it:

  • You run tests in your plugin against the weekly version of Jenkins
  • You depend on the Jenkins core weekly line and update it regularly, (example)

You would not use it:

  • When you are temporarily depending on the weekly line but do not plan to update it on every release
    • This would cause dependabot build failures when a plugin is updated only on the weekly line (if you depend on it)

Depending on older versions

Sometimes a plugin maintainer may prefer to require an older version of Jenkins as its minimum version. Refer to choosing a Jenkins version for more details.

When an older Jenkins version is used, then the matching older version of the plugin bill of materials should be used.

BOM Line Version Comment
bom-2.346.x 1763.v092b_8980a_f5e Last LTS to support Java 8
bom-2.361.x 2102.v854b_fec19c92 First LTS to require Java 11
bom-2.375.x 2198.v39c76fc308ca
bom-2.387.x 2543.vfb_1a_5fb_9496d
bom-2.401.x 2745.vc7b_fe4c876fa_
bom-2.414.x 2982.vdce2153031a_0

The latest versions of all BOM lines are available from the Jenkins artifact repository.

Development

For people potentially working on the BOM itself, not just consuming it.

Updating a plugin

You can try just incrementing plugin versions in bom/pom.xml. If CI passes, great! Dependabot will try doing this as well.

In cases where two or more plugins must be updated as a unit (JENKINS-49651), file a PR changing the versions of both.

When to add a new plugin

Though the primary purpose of this repository is to manage the set of versions of dependencies used by dependents, a secondary purpose is to provide plugin compatibility testing (PCT). For example, risky changes to core or plugins are often run through this test suite to find potential problems.

For this reason, it can be desirable to add plugins to the managed set even when they have no dependents. The more critical a plugin is, the more it would benefit from plugin compatibility testing and thus inclusion in the managed set. While different people have different definitions as to what constitutes "critical", some common definitions are:

  • In the default list of suggested plugins
  • In the list of the top 100 (or 250) plugins
  • In the list of plugins with more than 10,000 (or 1,000) users

Since any PCT issues with a plugin that is in the managed set must be dealt with in a timely manner, it is key that all plugins in the managed set have active maintainers that are able to cut releases when needed.

A good candidate for inclusion in the managed set is a critical plugin with an active maintainer, regardless of whether or not it has dependents.

A plugin that is not critical could be tolerated in the managed set, as long as it poses a low maintenance burden and has an active maintainer.

A critical plugin without a maintainer poses a dilemma: while inclusion in the managed set provides desirable compatibility testing, it also results in friction when changes need to be made for PCT purposes and nobody is around to release them. Ideally, this dilemma would be resolved by someone adopting the plugin. In the worst case, such plugins can be excluded from the managed set.

How to add a new plugin

Insert a new dependency in sorted order to bom-weekly/pom.xml. Make sure it is used (perhaps transitively) in sample-plugin/pom.xml. Ideally also update the sample plugin’s tests to actually exercise it, as a sanity check.

Avoid adding transitive dependencies to sample-plugin/pom.xml. It is supposed to look as much as possible like a real plugin, and a real plugin should only declare its direct dependencies and not its transitive dependencies.

You should also add a <classifier>tests</classifier> entry, for a plugin which specifies <no-test-jar>false</no-test-jar>. You should introduce a POM property so that the version is not repeated.

The build will enforce that all transitive plugin dependencies are also managed. If the build fails due to an unmanaged transitive plugin dependency, add it to bom-weekly/pom.xml.

PCT

The CI build can run the Plugin Compatibility Tester (PCT) on the particular combination of plugins being managed by the BOM. This catches mutual incompatibilities between plugins (as revealed by their JenkinsRule tests) and the specified Jenkins LTS version.

If there is a PCT failure, fix it in the plugin with the failing test, and when that fix is released, try updating the BOM again.

To reproduce a PCT failure locally, use something like

PLUGINS=structs,mailer TEST=InjectedTest bash local-test.sh

optionally also passing either

LINE=2.426.x

or

DOCKERIZED=true

to reproduce image-specific failures.

You can also pass

PCT_OPTS=--local-checkout-dir=/path/to/plugin

to check a local patch without waiting for incrementals deployment, if you have switched the version in bom-weekly/pom.xml to a *-SNAPSHOT.

To minimize cloud resources, PCT is not run at all by default on pull requests, only some basic sanity checks. Add the label full-test to run PCT in a PR. If you lack triage permission and so cannot add this label, then you may instead

echo 'TODO delete me' > full-test
git add full-test
git commit -m 'Run full tests'

while keeping the PR in draft until tests pass and this file can be deleted.

Similarly, the weekly-test label (or marker file) can be used to run tests on weekly releases in isolation.

To further minimize build time, tests are run only on Linux, against Java 11, and without Docker support. It is unusual but possible for cross-component incompatibilities to only be visible in more specialized environments (such as Windows).

LTS lines

A separate BOM artifact is available for the latest weekly, current LTS line and a few historical lines. BOMs should only specify plugin version overrides compared to the next-newer BOM. sample-plugin will use the weekly line by default, and get a new POM profile for the others. To get ahead of problems, prepare the draft PR for a line as soon as its baseline is announced.

The CI build (or just mvn test -P2.nnn.x) will fail if some managed plugins are too new for the LTS line. This script is a handy way to find the most recently released plugin version compatible with a given line, according to the jenkins-infra/update-center2.

The developer documentation recommends the last releases of each of the previous two LTS baselines. BOMs for the current LTS release and two prior LTS releases are typically retained. BOMs older than the two prior LTS releases will generally be retired in order to better manage evaluation costs and maintenance efforts.

Releasing

You can cut a release using JEP-229. To save resources, master is built only on demand, so use Re-run checks in https://github.com/jenkinsci/bom/commits/master if you wish to start. If that build passes, a release should be published automatically when PRs matching certain label patterns are merged. For the common case that only lots of dependencies PRs have been merged, the release can be triggered manually from the Actions tab after a master build has succeeded.

Incrementals

This repository is integrated with “Incrementals” JEP-305:

  • Individual BOM builds, including from pull requests, are deployed and may be imported on an experimental basis by plugins. (The plugin’s POM must use the gitHubRepo property as shown in workflow-step-api-plugin #58.)
  • Pull requests to the BOM may specify incremental versions of plugins, including unmerged PRs. (These should be resolved to formal release versions before the PR is merged.)

Together these behaviors should make it easier to verify compatibility of code changes still under review.

GitHub tooling

This repository uses Dependabot to be notified automatically of available updates, mainly to plugins. (It is not currently possible for Jenkins core updates to be tracked this way.)

Release Drafter is also used to prepare changelogs for the releases page.

bom's People

Contributors

alecharp avatar basil avatar bitwiseman avatar cathychan avatar chriskilding avatar daniel-beck avatar dduportal avatar dependabot-preview[bot] avatar dependabot[bot] avatar dwnusbaum avatar github-actions[bot] avatar jetersen avatar jglick avatar jonesbusy avatar kevin-cb avatar krisstern avatar lemeurherve avatar markewaite avatar notmyfault avatar olblak avatar oleg-nenashev avatar pierrebtz avatar renovate[bot] avatar res0nance avatar rsandell avatar strangelookingnerd avatar timja avatar uhafner avatar vlatombe avatar yaroslavafenkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bom's Issues

test failures are ignored (if all tests failed?)

Jenkins and plugins versions report

The OSS BOM is broken when running the PCT for various scenarious.

e.g. https://ci.jenkins.io/job/Tools/job/bom/job/PR-893/1/testReport/ has not tests for script-security using the weekly the failure is that the guava method is DOA (so there is a linkage error in running the test so it is not failed)
pct-script-security-weekly -> https://ci.jenkins.io/job/Tools/job/bom/job/PR-893/1/pipeline-console/

[2022-02-20T19:30:30.052Z] [INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-cli) @ script-security ---
[2022-02-20T19:30:33.047Z] [INFO] 
[2022-02-20T19:30:33.047Z] [INFO] -------------------------------------------------------
[2022-02-20T19:30:33.047Z] [INFO]  T E S T S
[2022-02-20T19:30:33.047Z] [INFO] -------------------------------------------------------
[2022-02-20T19:30:33.047Z] [INFO] 
[2022-02-20T19:30:33.047Z] [INFO] Results:
[2022-02-20T19:30:33.047Z] [INFO] 
[2022-02-20T19:30:33.047Z] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[2022-02-20T19:30:33.047Z] [INFO] 
[2022-02-20T19:30:33.047Z] [INFO] ------------------------------------------------------------------------
[2022-02-20T19:30:33.047Z] [INFO] BUILD FAILURE
[2022-02-20T19:30:33.047Z] [INFO] ------------------------------------------------------------------------
[2022-02-20T19:30:33.047Z] [INFO] Total time:  14.613 s
[2022-02-20T19:30:33.047Z] [INFO] Finished at: 2022-02-20T19:30:32Z
[2022-02-20T19:30:33.047Z] [INFO] ------------------------------------------------------------------------

the stage in BO is marked as failing, but overall the build is marked as passing - causing changes to be merged when the plugins tests are DOA.

Also occurs with bitbucket-branch-source probably various others.

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

ci.jenkins.io

Reproduction steps

https://ci.jenkins.io/job/Tools/job/bom/job/PR-893/1/pipeline-console/

Expected Results

The CI status of the PCT tests is accurate and if a plugins test blow up so spectacurlay that they are not run that the PCT fails the tests and the build is marked unstable.

Actual Results

the build is marked stable, resulting in incorrect merges of plugins.

Anything else?

N/A

`JobPropertyStepTest` had been ignored for one reason but is now failing for another reason

Jenkins and plugins versions report

Pipeline: Multibranch 696.v52535c46f4c9

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

Ubuntu 20.04.3 LTS x86_64

Reproduction steps

  • Remove any exclusions for JobPropertyStepTest, if any remain in the source tree.
  • Run: PLUGINS=workflow-multibranch TEST=org.jenkinsci.plugins.workflow.multibranch.JobPropertyStepTest#configRoundTripParameters bash local-test.sh

Expected Results

The test passes.

Actual Results

This regression went noticed because these test results were being ignored for a different reason (jenkinsci/workflow-multibranch-plugin#128). That PR was merged, but the test results were never un-ignored, so this new regression slipped by unnoticed.

This test now fails with:

java.lang.AssertionError: expected:<1> but was:<3>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:647)
	at org.junit.Assert.assertEquals(Assert.java:633)
	at org.jenkinsci.plugins.workflow.multibranch.JobPropertyStepTest.configRoundTripParameters(JobPropertyStepTest.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:601)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.lang.Thread.run(Thread.java:829)

Anything else?

No response

`jenkins.plugins.http_request.HttpRequestStepRoundTripTest#configRoundTripGroup1` tends to time out

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 LTS x86_64

Reproduction steps

Remove the exclusion for jenkins.plugins.http_request.HttpRequestStepRoundTripTest in excludes.txt added in #1355, then run the test suite a few times.

Expected Results

The tests should reliably pass.

Actual Results

jenkins.plugins.http_request.HttpRequestStepRoundTripTest#configRoundTripGroup1 tends to time out with the thread dump showing many threads doing work in HtmlUnit.

Anything else?

Should debug this further to find the root cause and then re-enable the test.

`org.jenkinsci.plugins.pipeline.modeldefinition.TriggersTest` tends to run out of memory

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 LTS x86_64

Reproduction steps

Remove the exclusion for org.jenkinsci.plugins.pipeline.modeldefinition.TriggersTest in excludes.txt added in #1359, then run the test suite a few times.

Expected Results

The tests should reliably pass.

Actual Results

org.jenkinsci.plugins.pipeline.modeldefinition.TriggersTest tends to run out of memory and crash with exit code 137.

Anything else?

No response

`org.jenkinsci.plugins.durabletask.BourneShellScriptTest` is too unstable

In this repository, we set surefire.rerunFailingTestsCount=4 to run failing tests up to 4 times, and we also have a retry(2) block in the Jenkinsfile. A test that manages to fail despite all of this is too flaky to be included in the suite. We recently excluded org.jenkinsci.plugins.durabletask.BourneShellScriptTest from the suite because it was causing too many problems for unrelated PRs. We should try re-enabling that test in a new PR and investigate how to get it to pass reliably again.

Use `surefire.excludesFile`

Currently the BOM PCT runs every test and then deletes test results from known failures, which is wasteful. Better to switch to -Dsurefire.excludesFile with entries like InjectedTest.class or pkg/SomeTest.class.

Commit a687bdb was pointless

What feature do you want to see added?

a687bdb did not stop #1635 from being filed as intended. Moreover it was not necessary to begin with as demonstrated by #1642.

Upstream changes

No response

Purpose of this repository is unclear

Describe your use-case which is not covered by existing documentation.

From the readme:

This repository implements a Maven BOM which can be used in a plugin POM to more easily manage dependencies on other common plugins.

Looking through the bom-weekly, I see plugins like custom-folder-icon (0.2% installs, no dependent plugins), dark-theme (~2% installs, no dependents), file-parameters (<1% installs, no dependents).

I do not understand how this aligns with the stated purpose of this repository. Why are plugin included that are neither popular, nor used as dependencies from other plugins?

While the documentation explains how to add new plugins, it does not explain which plugins are an appropriate choice to include, or what criteria they should fulfill (if any).

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

Plugin PCT runs should use current BOM version, not the BOM version defined by the plugin

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 20.04.3 LTS x86_64

Reproduction steps

Run e.g. PLUGINS=mailer bash local-test.sh.

Expected Results

The PCT run should use the versions of all plugins defined in this repository.

Actual Results

Mailer defines its BOM version as 1075.v14bef33e5d7b, and the PCT run will use that BOM version when building up the test classpath, though the Jenkins WAR will be the "megawar" with the plugin versions defined in this repository.

Anything else?

No response

Version mismatch for `org.jenkins-ci.main:jenkins-test-harness` dependency in BOM versions above 1461.vb_3c6de28f2b_a_

Jenkins and plugins versions report

N/A

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

N/A (problem occurs when compiling a plugin with Maven)

Reproduction steps

BOM versions newer than 1461.vb_3c6de28f2b_a_ (such as 1500.ve4d05cd32975) seem to have a mismatch between the version of org.jenkins-ci.main:jenkins-test-harness that they specify, and the one that is transitively brought in through the io.jenkins.configuration-as-code:test-harness dependency. This makes mvn validate fail.

This can be seen in the PR jenkinsci/aws-secrets-manager-credentials-provider-plugin#223

To reproduce:

  1. Take a clean checkout of a plugin that uses BOM 1461.vb_3c6de28f2b_a_
  2. Ensure that it builds (or at least passes validation)
  3. Upgrade the BOM version to something newer (such as 1500.ve4d05cd32975)
  4. Run mvn validate again and see the error

Expected Results

The BOM upgrade should 'just work' without a dependency error.

Actual Results

The Maven Enforcer plugin fails with:

Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for org.jenkins-ci.main:jenkins-test-harness:1736.vc72c458c5103 [test] paths to dependency are:
+-io.jenkins.plugins:aws-secrets-manager-credentials-provider:1.999999-SNAPSHOT
  +-org.jenkins-ci.main:jenkins-test-harness:1736.vc72c458c5103 [test]
and
+-io.jenkins.plugins:aws-secrets-manager-credentials-provider:1.999999-SNAPSHOT
  +-io.jenkins.configuration-as-code:test-harness:1512.vb_79d418d5fc8 [test]
    +-org.jenkins-ci.main:jenkins-test-harness:1736.vc72c458c5103 [test] (managed) <-- org.jenkins-ci.main:jenkins-test-harness:1802.v9de0d87365d2 [test]
]

Anything else?

I also tried bumping the plugin's major/minor version of Jenkins as far as 3.3.19.x (and likewise the BOM), but this did not make a difference.

Weekly updates stopped working

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 20.04.4 LTS x86_64
Jenkins 2.344

Reproduction steps

Release a weekly, then wait a few days for Updatecli to propose an update.

Expected Results

A PR is proposed for the update, such as #1023.

Actual Results

#1023 was the last such PR that was proposed (for 2.344). For the past month, no additional PRs have been proposed for 2.345, 2.346, or 2.347.

Anything else?

This is correlated with (but not necessarily caused by) the introduction of #1063 CC @jetersen

Not obvious when `bom-weekly` is to be used

Describe your use-case which is not covered by existing documentation.

In jenkinsci/workflow-job-plugin#261, a question was raised regarding whether bom-weekly should be used when jenkins.version is a weekly version in a plugin's pom.xml. The answer is surprisingly subtle:

You should only use the weekly bom if you are tracking every weekly release as a plugin could be updated to a newer weekly version than you require currently.

This answer makes perfect sense in retrospect, but it was non-obvious to at least three people in two separate situations that I am aware of. As a result, I think this is a good candidate to add to the documentation in order to prevent additional people from being confused in the future.

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

jenkinsci/workflow-job-plugin#261

`WorkflowRunRestartTest` had been ignored for one reason but is now failing for another reason

Reproduction steps

  • Remove any exclusions for WorkflowRunRestartTest, if any remain in the source tree.
  • Run: PLUGINS=workflow-job TEST=org.jenkinsci.plugins.workflow.job.WorkflowRunRestartTest#interruptedWhileStartingPerformanceOptimized,org.jenkinsci.plugins.workflow.job.WorkflowRunRestartTest#interruptedWhileStartingMaxSurvivability bash local-test.sh

Results

This regression went noticed because these test results were being ignored for a different reason (jenkinsci/workflow-job-plugin#158). That PR was closed because the underlying problem was fixed, but the test results were never un-ignored, so this new regression slipped by unnoticed.

These two tests now fail with:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: -1: unable to resolve class org.jenkinsci.plugins.workflow.libs.Library
 @ line -1, column -1.
1 error

        at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:958)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:554)
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
        at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
        at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:584)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
        at groovy.lang.GroovyShell$evaluate.call(Unknown Source)

Pipeline: Declarative tests are too unstable

In this repository, we set surefire.rerunFailingTestsCount=4 to run failing tests up to 4 times, and we also have a retry(2) block in the Jenkinsfile. A test that manages to fail despite all of this is too flaky to be included in the suite. We recently excluded org.jenkinsci.plugins.pipeline.modeldefinition.BasicModelDefTest and org.jenkinsci.plugins.pipeline.modeldefinition.MatrixTest from the suite because they were causing too many problems for unrelated PRs. We should try re-enabling those tests in a new PR and investigate how to get them to pass reliably again.

Parent pom update fails from 4.51 to later releases

Jenkins and plugins versions report

As documented in #1635

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

Linux on the controller

Reproduction steps

  1. Attempt to build #1635
  2. Confirm that the build fails

Expected Results

Passing build so that the sample-plugin can be upgraded to parent pom 4.53

Actual Results

CI job fails

Anything else?

I'm not able to resolve the issue. I placed a build / pluginManagement section in the bom-2.346.x/pom.xml file with the maven hpi plugin version set to 3.37 but that did not change the behavior.

Consider running PCT matrix for all lines on GitHub Action?

I been toying with the idea to generate github actions manifest to run PCT testing for each plugin. Potentially run the matrix for each line.
One the goal would be reduce the load on ci.jenkins.io and two Jenkins pipeline could default in the future to mvn verify if the PCT matrix would run faster and on all lines here on GitHub WDYT?
Another benefit would be would could take advantage of caching of maven dependencies and potential caching of WAR if we can find a good way to only update a single/few plugin.

So I had something like this in mind.

graph TD
    A[GitHub Actions] 
    A --> B(MVN Verify)
    B --> C[Prepare WAR 2.319.x]
    B --> D[Prepare WAR 2.332.x]
    B --> E[Prepare WAR 2.346.x]
    B --> F[Prepare WAR Weekly]
    C --> G[Plugin 1]
    C --> H[Plugin 2]
    C --> I[Plugin 3]
    D --> G1[Plugin 1]
    D --> H1[Plugin 2]
    D --> I1[Plugin 3]
    E --> G2[Plugin 1]
    E --> H2[Plugin 2]
    E --> I2[Plugin 3]
    F --> G3[Plugin 1]
    F --> H3[Plugin 2]
    F --> I3[Plugin 3]

cc @jglick @timja @basil

Use JEP-229

It is annoying to have to do reincrementalify sample-plugin after every release, and easily forgotten (2b7c488 was delayed by a week). See also https://issues.jenkins.io/browse/JENKINS-58641. Better to use JEP-229 to release on workflow_dispatch (I do not think we want automatic releases from this component).

Build passes even after PCT fails to run on a plugin

https://github.com/jenkinsci/bom/pull/893/checks?check_run_id=5266351579 did not run any tests. https://ci.jenkins.io/job/Tools/job/bom/job/PR-893/1/execution/node/5973/log/ “passed” yet

…
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-cli) on project script-security: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test failed: java.lang.NoClassDefFoundError: com/google/common/io/NullOutputStream: com.google.common.io.NullOutputStream -> [Help 1]
 [ERROR] 
 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR] 
 [ERROR] For more information about the errors and possible solutions, please read the following articles:
 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
 succeeded artifactIds: [maven-hpi-plugin, maven-hpi-plugin]
 executed classname tests: []
 [INFO] -------------------------------------------------------
 [INFO] Solving test names
 [INFO] -------------------------------------------------------
 [WARNING] No test reports found!
 org.jenkins.tools.test.exception.PomExecutionException: [mvn, --show-version, --batch-mode, -ntp, --settings=/home/jenkins/workspace/Tools_bom_PR-893@tmp/settings-azure.xml, --define=failIfNoTests=false, --define=forkCount=.75C, --define=jth.jenkins-war.path=/home/jenkins/workspace/Tools_bom_PR-893/megawar.war, --define=surefire.excludesFile=/home/jenkins/workspace/Tools_bom_PR-893/excludes.txt, --define=surefire.rerunFailingTestsCount=4, --define=types=failsafe,surefire, --define=forkCount=.75C, hpi:resolve-test-dependencies, hpi:test-hpl, surefire:test, -Djenkins.version=2.335, -Denforcer.skip=true, failsafe:integration-test] failed in /home/jenkins/workspace/Tools_bom_PR-893/pct-work/script-security
 	at org.jenkins.tools.test.maven.ExternalMavenRunner.run(ExternalMavenRunner.java:105)
 	at org.jenkins.tools.test.PluginCompatTester.testPluginAgainst(PluginCompatTester.java:569)
 	at org.jenkins.tools.test.PluginCompatTester.testPlugins(PluginCompatTester.java:312)
 	at org.jenkins.tools.test.PluginCompatTesterCli.main(PluginCompatTesterCli.java:178)
 Plugin slack not in included plugins => test skipped !
…
 + grep -q -F -e '<status>INTERNAL_ERROR</status>' pct-report.xml
 + grep -q -F -e '<status>TEST_FAILURES</status>' pct-report.xml
 + rm -fv 'pct-work/*/target/surefire-reports/TEST-InjectedTest.xml' 'pct-work/*/*/target/surefire-reports/TEST-InjectedTest.xml'

2.380 update failed

Jenkins and plugins versions report

Jenkins 2.380

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

Ubuntu 22.04.1 LTS x86_64

Reproduction steps

With the update to 2.380 as in #1611 run PLUGINS=matrix-auth TEST=org.jenkinsci.plugins.matrixauth.ReadOnlyTest bash local-test.sh.

Expected Results

The test passes in less than 30 seconds.

Actual Results

The test passes in more than 30 seconds, or times out on CI builds that have a 180-second timeout.

Anything else?

Analysis in #1611 (comment).

2.289.x and 2.303.x BOMs include Git Server 1.9 which relies on the detached SSHD Module in the Jenkins Core

Jenkins Core to 2.303.1 LTS excluded the SSHD Module and converted it to a plugin. It impacted the Git Server plugin that it is transiently loaded by the Pipeline: Global Libraries plugin. jenkinsci/git-server-plugin#24 fixes it in 1.10, but apparently 1.9 is bundled in Jenkinsfile Runner Vanilla Package

FTR https://www.jenkins.io/doc/upgrade-guide/2.289/#sshd-module-unbundling

Causes jenkinsci/jenkinsfile-runner#560

2.289.x

Need to get started on the new LTS line.

Do not forgot to add to RPU first.

Switch sample plugin to an IT

It would be better to use the Invoker plugin to demonstrate that a plugin can properly consume the BOM than to use the current submodule hack.

Retire 2.222.x BOM line

README.md states:

The UC currently maintains releases for the past 400 days so it is reasonable to retire BOMs for lines older than that.

2.222.4 was released on May 24, 2020, which was 430 days ago. Therefore it is reasonable to retire the 2.222.x BOM line.

Keep pinned dependencies in `2.nnn.x/pom.xml` up to date

Currently only bom-weekly is managed by Dependabot. For example, #1006 updated the version of credentials in bom-weekly to one which includes a recent security fix (among other changes); but bom-2.303.x and bom-2.332.x both continue to specify an older version, despite the availability of versions 2.6.1.1 and 1087.1089.v2f1b_9a_b_040e4, respectively. (Not sure offhand what line 1074.1076.v39c30cecb_0e2 exists for.)

We deliberately decline to mention these POMs in .github/dependabot.yml because then we would constantly be rejecting suggestions to update pinned versions to plugin releases which in fact require a new core (see #266), so to do this automatically we would need to use updatecli or something else customizable (e.g., checking the public update center for updates for a given LTS line).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.