-
Notifications
You must be signed in to change notification settings - Fork 272
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
Fix serverAuthenticationToken being required for configuration via CasC #124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e8a5f7b
to
22fd288
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is up to plugin maintainers, but from what I see it breaks binary compatibility while it could be avoided
Should be fixed in CasC jenkinsci/configuration-as-code-plugin#1025 |
@Smasherr jenkinsci/configuration-as-code-plugin#1025 has been merged. But now Any reason to prefer |
@oleg-nenashev Please review the latest state of this PR. Would you also be so kind to answer this?
|
Bump: any feedback? |
CheckForNull is normally preferred as it has better integration into static code analysis frameworks like spotbugs AFAIK |
Co-Authored-By: Tim Jacomb <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @henryju?
The build is failing because it's untrusted I assume: |
@dbmeneses can you please take over this PR? |
Bump: merge it please |
@Smasherr can you please resolve the conflicts? |
probably no harm in cherry-picking that into this PR as well |
@henryju / @dbmeneses could we get this reviewed / merged please? We have users asking about this often |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/test/resources/hudson/plugins/sonar/casc/configuration-as-code.yaml
Outdated
Show resolved
Hide resolved
protected String stringInLogExpected() { | ||
return "credentialsId = test-id"; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we forgot to link to our contribution guidelines for this project. Sorry about that.
Could you please reformat this code so it follows our code style (config for Eclipse and IntelliJ available here)? From the looks of it, I think only the indentation should be corrected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we forgot to link to our contribution guidelines for this project. Sorry about that.
Could you please reformat this code so it follows our code style (config for Eclipse and IntelliJ available here)? From the looks of it, I think only the indentation should be corrected.
Checkstyle? 🙂
I looked again and seems fine to me. I'm just concerned about the use of |
See the discussion here, about The jenkins project tends to prefer |
We are not using Spotbugs but SonarQube ;) From CasC point of view, does it make a difference if we switch to |
Needs a code change in JCasC and a release, Oleg didn't seem terribly keen on Nullable but probably no big deal.. |
Hey guys, nice to see finally some actions here. I've been on vacation and can do the requested changes to this PR tomorrow. |
…code.yaml Co-Authored-By: Tim Jacomb <[email protected]>
@wouter-admiraal-sonarsource Hi, does it look better to you now? |
Perfect, thanks. I'll run the QA one more time from #132, and we'll finally merge. Thank you for your patience and contribution 👍 ! |
@wouter-admiraal-sonarsource You're welcome! Would you be so kind and to do a release with this change anytime soon? |
Status? |
Any news on this topic? Would be very cool if this would be merged soon as we spot issues at this point on our automated Jenkins master setup. |
This was merged in #132. Thank you all for your help 👍 |
@wouter-admiraal-sonarsource good news, thanks! Now it would be great to have this in a release any time soon :-) |
I would like to add that it not only fails when serverAuthenticationToken is missing, it fails if any possible config parameter is missing, so for a working JCasC you need to include everything even though values are empty. Most other plugins have defaults and do not fail when config parameters are empty.
The same is the case for the sonarRunnerInstallation config, you also need to include everything there, even if empty.
|
This fix avoids the following error message
io.jenkins.plugins.casc.ConfiguratorException: serverAuthenticationToken is required to configure class hudson.plugins.sonar.SonarInstallation
when using a YAML configuration without
serverAuthenticationToken