jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.7k stars 722 forks source link

BaseConfigurator warns about #owner field that should be ignored #2532

Open rsandell opened 4 months ago

rsandell commented 4 months ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Anything

Reproduction steps

See unit test: https://github.com/jenkinsci/pipeline-groovy-lib-plugin/pull/133

Expected Results

jenkins.plugins.git.GitSCMSource#owner should be ignored and never warned about.

Actual Results

The following warning is seen in the system log

WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class jenkins.plugins.git.GitSCMSource#owner: type is abstract but not Describable.

Anything else?

jenkins.plugins.git.GitSCMSource#owner is a transient field inherited from SCMSource that is not intended to be configured by a user. The value is set by the owner object when the scm source is added to it. So JCasC should ignore the field yet it is warning about it in the system log confusing many users. This warning in fact seems to be logged for any type of scm source, not just git.

SunMar commented 6 days ago

Ran into this today too. Seems a duplicate of #1637, and if you search for GitSCMSource#owner you'll find a few more (unrelated) tickets where this warning also pops up in the logs.