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

Modernize to Jenkins 2.440.3 #114

Merged

Conversation

sghill-rewrite
Copy link
Contributor

Hi!

This PR aims to move this plugin to the recommended Jenkins baseline version.

If there are additional requirements for accepting PRs - such as additional lag time before adopting a baseline - feel free to reply in the comments.

Testing done

Ran mvn clean verify.

I found a new SpotBugs rule started failing, so I added a SuppressFBWarnings annotation to retain backwards compatibility. It would also be possible to make the public fields private, but I opted to suppress to avoid breaking changes.

Submitter checklist

Preview Give feedback

Refs: sghill-rewrite/campaigns#4

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.jenkins.ModernizePlugin?organizationId=SmVua2lucyBDSQ%3D%3D

@sghill-rewrite sghill-rewrite requested a review from a team as a code owner August 6, 2024 15:49
@hypery2k
Copy link
Contributor

hypery2k commented Aug 6, 2024

thanks for the contribution. Did the spotbugs need special permissions?

The action is failing: https://github.com/jenkinsci/log-parser-plugin/actions/runs/10269784917/job/28416024894?pr=114#step:6:14

@sghill
Copy link
Contributor

sghill commented Aug 6, 2024

@hypery2k I don't think so, I added this because mvn verify failed on the spotbugs:check task the Jenkins tooling includes:

[INFO] --- spotbugs:4.8.3.1:check (spotbugs) @ log-parser ---
[INFO] BugInstance size is 3
[INFO] Error size is 0
[INFO] Total bugs: 3
[ERROR] Medium: Primitive field hudson.plugins.logparser.LogParserPublisher.failBuildOnError is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. [hudson.plugins.logparser.LogParserPublisher] At LogParserPublisher.java:[line 62] PA_PUBLIC_PRIMITIVE_ATTRIBUTE
[ERROR] Medium: Primitive field hudson.plugins.logparser.LogParserPublisher.showGraphs is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. [hudson.plugins.logparser.LogParserPublisher] At LogParserPublisher.java:[line 63] PA_PUBLIC_PRIMITIVE_ATTRIBUTE
[ERROR] Medium: Primitive field hudson.plugins.logparser.LogParserPublisher.unstableOnWarning is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. [hudson.plugins.logparser.LogParserPublisher] At LogParserPublisher.java:[line 61] PA_PUBLIC_PRIMITIVE_ATTRIBUTE

It looks like that's a custom action that was added. Is it needed if spotbugs is already wired into the lifecycle?

@hypery2k hypery2k merged commit 9d5d3d2 into jenkinsci:develop Aug 7, 2024
14 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants