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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Stapler from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e #7033

Merged
merged 1 commit into from Aug 26, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 25, 2022

Problem

jenkinsci/stapler#370, released in 1709.ve4c10835694b_ and adopted here in #6694, broke compatibility with PowerMock. While the majority of plugins have been migrated away from PowerMock, some remain, most notably Blue Ocean. While the long-term solution is to remove PowerMock from all plugins, we are not quite there yet, and in the meantime such plugins can't be tested against recent versions of Jenkins core.

Solution

jenkinsci/stapler#402, released in 1733.v981fdd98007e, restores the status quo. This enables gradual PowerMock removal to continue throughout the plugin ecosystem without forcing the issue.

I plan to backport jenkinsci/stapler#402 to LTS.

Implementation

Upgrade Stapler from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e.

Testing done

Before this change, mvn clean verify -DfailIfNoTests=false -Denforcer.skip -Dskip.npm -Dspotbugs.skip -Djenkins.version=2.365 -Dtest=io.jenkins.blueocean.blueocean_github_pipeline.GithubOrgFolderPermissionsTest fails with

[ERROR] io.jenkins.blueocean.blueocean_github_pipeline.GithubOrgFolderPermissionsTest.canCreateWhenHavePermissionsOnDefaultOrg  Time elapsed: 0.004 s  <<< ERROR!
java.lang.ExceptionInInitializerError
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:315)
        at javassist.runtime.Desc.getClassObject(Desc.java:72)
        at javassist.runtime.Desc.getClassType(Desc.java:181)
        at javassist.runtime.Desc.getType(Desc.java:151)
        at javassist.runtime.Desc.getType(Desc.java:107)
        at io.jenkins.blueocean.rest.impl.pipeline.PipelineBaseTest.<init>(PipelineBaseTest.java:74)
        at io.jenkins.blueocean.blueocean_github_pipeline.GithubMockBase.<init>(GithubMockBase.java:54)
        at io.jenkins.blueocean.blueocean_github_pipeline.GithubOrgFolderPermissionsTest.<init>(GithubOrgFolderPermissionsTest.java:33)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.createTestInstance(PowerMockJUnit44RunnerDelegateImpl.java:197)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.createTest(PowerMockJUnit44RunnerDelegateImpl.java:182)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:204)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:160)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:134)
        at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
        at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:136)
        at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:117)
        at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:57)
        at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
        at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)

After this change, the test passes.

Proposed changelog entries

Developer: Temporarily restore compatibility with PowerMock-based tests (regression in 2.358). Support for PowerMock will be completely removed on or after June 1, 2023.

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change) and are in the imperative mood. Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadoc, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO") if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content-Security-Policy directives (see documentation on jenkins.io).
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).
Release notes

Sourced from stapler's releases.

1733.v981fdd98007e

馃悰 Bug fixes

馃摝 Dependency updates

Commits

Updates stapler-groovy from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e

Release notes

Sourced from stapler-groovy's releases.

1733.v981fdd98007e

馃悰 Bug fixes

馃摝 Dependency updates

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps `stapler.version` from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e.

Updates `stapler` from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e
- [Release notes](https://github.com/jenkinsci/stapler/releases)
- [Changelog](https://github.com/jenkinsci/stapler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/stapler/commits)

Updates `stapler-groovy` from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e
- [Release notes](https://github.com/jenkinsci/stapler/releases)
- [Changelog](https://github.com/jenkinsci/stapler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jenkinsci/stapler/commits)

---
updated-dependencies:
- dependency-name: org.kohsuke.stapler:stapler
  dependency-type: direct:production
- dependency-name: org.kohsuke.stapler:stapler-groovy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Aug 25, 2022
@basil basil added the developer Changes which impact plugin developers label Aug 25, 2022
@basil basil changed the title Bump stapler.version from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e Upgrade Stapler from 1730.v43d2c7b_11a_27 to 1733.v981fdd98007e Aug 25, 2022
@basil basil requested a review from jglick August 25, 2022 16:20
@basil basil merged commit ff413bc into master Aug 26, 2022
@basil basil deleted the dependabot/maven/stapler.version-1733.v981fdd98007e branch August 26, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file developer Changes which impact plugin developers java Pull requests that update Java code
Projects
None yet
2 participants