Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread Jesse Glick
On Thu, Jun 24, 2021 at 5:18 AM Ullrich Hafner wrote: > I often have this problem that my working JCasC configuration suddenly > breaks after an upgrade of JCasC (or another plugin) and Jenkins just not > starts up. And then you need to dig into log files to see what happens. It > would be much

Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread Basil Crow
On Thu, Jun 24, 2021 at 9:07 AM Tim Jacomb wrote: > > There are some flags you can use to tune this behaviour: >

Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread 'Gavin Mogan' via Jenkins Developers
I've had times when those groovy scripts "silently" fail on startup, and while isn't a big deal when I'm just restarting an existing instance, it does suck when I'm spinning up a new instance and suddely I don't have security setup. I used to pair my jcasc config with my jenkins docker image, so

Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread Tim Jacomb
There are some flags you can use to tune this behaviour: https://github.com/jenkinsci/configuration-as-code-plugin/blob/a6983ff60e0cf198ce02d7992bcba927197174db/test-harness/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml#L1-L5 The default is to show an error page with what failed.

Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread Basil Crow
On Thu, Jun 24, 2021 at 2:18 AM Ullrich Hafner wrote: > This is a very bad user experience (actually I don’t know of any other > application that does not start because of a configuration error). I concur. My initial impression is that JCasC lacks polish, and I was surprised to see it promoted

Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread Antonio Muñiz
Cf. https://github.com/jenkinsci/configuration-as-code-plugin/issues/912 On Thu, 24 Jun 2021 at 11:18, Ullrich Hafner wrote: > > > > Am 24.06.2021 um 00:54 schrieb Basil Crow : > > > > After all these years, we finally migrated from Groovy initialization > > scripts to JCasC on our Jenkins

Re: Error handling in Groovy initialization scripts vs JCasC

2021-06-24 Thread Ullrich Hafner
> Am 24.06.2021 um 00:54 schrieb Basil Crow : > > After all these years, we finally migrated from Groovy initialization > scripts to JCasC on our Jenkins controllers. > > While any configuration error is a problem, I noticed that the way > these errors are reported differs from one mechanism

Error handling in Groovy initialization scripts vs JCasC

2021-06-23 Thread Basil Crow
After all these years, we finally migrated from Groovy initialization scripts to JCasC on our Jenkins controllers. While any configuration error is a problem, I noticed that the way these errors are reported differs from one mechanism to the next. With Groovy initialization scripts, errors in one