-
Notifications
You must be signed in to change notification settings - Fork 56
UnsupportedOperationException when using Snippet Generator #72
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
Conversation
…tor of pipeline-syntax java.lang.UnsupportedOperationException: no public field credentialsId (or getter method) found in class stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger at org.jenkinsci.plugins.structs.describable.DescribableParameter.getValue(DescribableParameter.java:161)
Isn't this a duplicate of #69 ? |
It is related. I first created a PR to be included in #69 (https://github.com/proski/stash-pullrequest-builder-plugin/pull/1), but the author saw it as a separate issue. @proski |
OK, so it's blocked by #69 |
It's a completely separate PR. It can be merged without the pipeline support. Pipelines just expose some issues, but we don't need to wait for pipeline support to fix those issues. I checked it with a freestyle project, the credentials still work, the configuration GUI looks good. I also checked other plugins (simple pull request job, Bitbucket pull request builder, Stash notifier and Git plugin), all of them use |
OK, but what is the use of improving it while we don't support pipeline. I might be missing something. Actually shouldn't the changes in #70 prevent snippet generator from displaying this at all? |
It's just a change to the getter name to conform with the camelCase convention. The conversion is documented: The only pipeline dependency here is the commit description. When I review code, I prefer small self-contained pull requests rather that a long branch that does everything. But I can add this commit to #70 to allow more meaningful testing of the pipelines. |
I also prefer to split the work into as small chunks as are still viable. I think we can apply both of those principles at the same time :) |
@guyv, it turns out that another getter needs to be renamed. |
@proski in a separate commit, I also renamed |
I can resolve conflicts, but I don't have permissions to edit this PR. I would have to submit it separately. I can try adding unit tests using |
@proski sure you can't edit? Allow edits from maintainers option is checked. |
I did some naive resolution, but some methods got moved to other files, so have to fix that
Unfortunately he doesn't have maintainer permissions |
When using the Jenkins snippet generator for your pipeline job (http://my-jenkins:8080/job/my-pipeline-job/pipeline-syntax/), you can configure the Stash Pull Requests Builder via the option 'properties: Set job properties' and then 'Build Triggers'.
When generating the script it will give you:
"properties([pipelineTriggers([<object of type stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger>])])"
Following stacktrace is found in the log:
java.lang.UnsupportedOperationException: no public field credentialsId (or getter method) found in class stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger
at org.jenkinsci.plugins.structs.describable.DescribableParameter.getValue(DescribableParameter.java:161)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.inspect(DescribableParameter.java:142)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:584)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2_(DescribableModel.java:675)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.uncoerce(DescribableParameter.java:196)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.uncoerce(DescribableParameter.java:190)`