-
Improvement
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
Jenkins 2.375.3
git plugin 4.14.3
configuration-as-code plugin 1569.vb_72405b_80249
java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment Temurin-11.0.18+10 (build 11.0.18+10)
OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode)
The issue happens when upgrading the git plugin to 5.0.0Jenkins 2.375.3 git plugin 4.14.3 configuration-as-code plugin 1569.vb_72405b_80249 java -version openjdk version "11.0.18" 2023-01-17 OpenJDK Runtime Environment Temurin-11.0.18+10 (build 11.0.18+10) OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode) The issue happens when upgrading the git plugin to 5.0.0
When using Jenkins 2.375.3 with git plugin 4.14.3, my CasC bundle is working well, but after upgrading the git plugin to 5.0.0, my CasC bundle is no longer valid.
While according to semver rules, it can be expected for this new version to contain breaking changes, It would be great to support the previously working CasC syntax as well as the new syntax.
When using git plugin 4.14.3 with the following reduced CasC bundle applied to configure the git plugin:
BEE-30962.yaml
This CasC bundle would return the following during form validation at JENKINS_URL/manage/configuration-as-code/ (and the bundle would apply cleanly):
The configuration can be applied
After upgrading the git plugin to version 5.0.0, and restarting the instance, in the product UI I see a warning:
Configuration as Code obsolete file format:
'gitSCM' is an obsolete attribute name, please use 'scmGit'
Additionally, when I go to JENKINS_URL/manage/configuration-as-code/ and try to apply that same CasC bundle, before I try to apply it, I get a form validation error in the UI:
An internal error occurred during form field validation (HTTP 500). Please reload the page and if the problem persists, ask the administrator for help.
I also see the following warning in the logs:
2023-03-03 19:13:09.780+0000 [id=16] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost:8080/manage/configuration-as-code/checkNewSource
java.lang.NullPointerException
at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$collectProblems$0(ConfigurationAsCode.java:262)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1764)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at io.jenkins.plugins.casc.ConfigurationAsCode.collectProblems(ConfigurationAsCode.java:263)