JENKINS-55920: add CasC support to GitHubPluginConfig. - #205
Conversation
ed81fa2 to
4bed1b8
Compare
|
Thank you!
…On Fri, Feb 1, 2019, 20:39 Daniel Garzon ***@***.*** wrote:
@oleg-nenashev <https://github.com/oleg-nenashev> here you go:
https://issues.jenkins-ci.org/browse/JENKINS-55920
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#205 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC3IoKVyEKZJfDr7oW5Y16LC938QsnEJks5vJJfpgaJpZM4ae8P3>
.
|
oleg-nenashev
left a comment
There was a problem hiding this comment.
Binary compat issue needs to be fixed before the merge
9390573 to
da5d737
Compare
|
@oleg-nenashev I tested the hpi and keeping the old setter does not work, as it is picked up by |
|
@oleg-nenashev actually, it does work. The only thing we needed was annotating |
da5d737 to
5a6ccd4
Compare
5a6ccd4 to
9389d8b
Compare
|
|
||
| @DataBoundConstructor | ||
| public GitHubPluginConfig() { | ||
| load(); |
There was a problem hiding this comment.
DataBoundConstructor is used for binding new data, load() is loading old data. Thats looks wrong
There was a problem hiding this comment.
This is the constructor being used by CasC, and it uses the getter and setter to mutate the instance. The other constructor would make List<GitHubServerConfig> configs required, which should not. What do you suggest would be an appropriate fix to address your concerns?
There was a problem hiding this comment.
@jglick could you describe why DBC is set on top of Bean constructor that loads data?
There was a problem hiding this comment.
This is wrong; the annotation should be deleted. GitHubPluginConfig is a singleton (GlobalConfiguration) so it may have @DataBoundSetters but that is it.
|
|
||
| @DataBoundConstructor | ||
| public GitHubPluginConfig() { | ||
| load(); |
There was a problem hiding this comment.
This is wrong; the annotation should be deleted. GitHubPluginConfig is a singleton (GlobalConfiguration) so it may have @DataBoundSetters but that is it.
|
BTW I strongly recommend inclusion of a functional test in PRs like this. There are several examples to look at of plugins which have a |
|
I just ran into this issue, are there still outstanding issues I could help with to get it merged? |
|
I have a unit test written for this, but I'm getting a bunch of unrelated errors doing I made sure I'm running java8, what's the proper procedure here? Thanks, Eric |
|
I do not get such an error. Hard to guess at the cause without seeing the stack trace of the |
|
It looks like these tests are already marked as "existing failures" on the master branch: https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fgithub-plugin/detail/PR-208/1/tests, so the CI is having issues too |
|
Here is the full (example) error I get: https://gist.github.com/er1c/9713ccac7e6b6ece4516b9dac9f9e20a . I tried on both my OSX and a linux box, same result. I just checked out master and it does not have this error, so let me see if I can figure out what in this PR broke the build. |
This might not be as easy as suggested. JCasC requires that the plugin targets Java 8 and at least 2.60.3 Jenkins core version 😢 Unless you are fine with bumping those values. Some quick number crunching on http://stats.jenkins.io/pluginversions/github.html 92.88% are above 2.60 who have this plugin installed |
|
I'm going to submit a separate PR that upgrades |
|
I would suggest closing this PR and referencing: #210 for ongoing tracking. |
This PR addresses the issue raised in the
configuration-as-code-plugin: jenkinsci/configuration-as-code-plugin#672.This change is