*** caphrim007_ has joined #openstack-jjb | 00:00 | |
*** caphrim007 has quit IRC | 00:03 | |
*** lashuk has joined #openstack-jjb | 00:48 | |
abelur | ssbarnea: are you around? | 01:13 |
---|---|---|
abelur | ssbarnea: when you run `jjb update <path> <job-name>` without the `-j` flag, is it expected to update both the job and the all of the views? should jjb only be updating a single job-name as provided instead. | 01:18 |
*** lashuk has quit IRC | 02:02 | |
*** lashuk has joined #openstack-jjb | 03:59 | |
alphadose[m] | ssbarnea: Is this a proper deprecation message ? | 06:30 |
alphadose[m] | Running jenkins-jobs without --config-xml flag is deprecated and would be removed in the next release | 06:30 |
openstackgerrit | Anish Mukherjee proposed openstack-infra/jenkins-job-builder master: Deprecate running jobs without --config-xml flag https://review.openstack.org/567466 | 07:07 |
openstackgerrit | Anish Mukherjee proposed openstack-infra/jenkins-job-builder master: Deprecate running jobs without --config-xml flag https://review.openstack.org/567466 | 07:11 |
*** lashuk has quit IRC | 08:47 | |
*** lashuk has joined #openstack-jjb | 08:47 | |
*** ssbarnea_ has joined #openstack-jjb | 09:47 | |
ssbarnea | alphadose[m]: to be clear, I am against adding any mandatory CLI parameters. If we make anything mandatory user should be allowed to defined them in config file and/or as environment variable. I did run your patch without that argument and I didn't get any warning. not sure why. | 10:37 |
ssbarnea | Odd_Bloke: I never said that we should format dsl implicitly but I see no reason why "!j2" would not be allowed on dsl. | 10:39 |
ssbarnea | in fact jinja2 works better with DSL than jjb-formatting because jinja2 needs double brackets, so there is a big chance that a DSL block would not need any excaping to evaluate it as jinja2, becuse only {{...}} and {# ... #} amd {% ...%} do count as jinja2, which is not something you are likely to find in normal groovy code. | 10:40 |
alphadose[m] | Thats really strange, it should have worked 😕 | 10:41 |
*** lashuk has quit IRC | 10:43 | |
alphadose[m] | ssbarnea: Which config file are you talking about , is it setup.cfg ? | 10:45 |
ssbarnea | alphadose[m]: I am talking about jenkins_jobs.ini config file. setup.cfg has nothing to do with it. | 10:47 |
alphadose[m] | the config-xml flag would not be mandatory | 10:48 |
alphadose[m] | it would be enforced with the deprecation in the current release | 10:48 |
ssbarnea | what we want is to tell people to mention config format in either one of the 3 possible ways: cfg file / env vars/ cli. When not mentioned on any of them, we display warning. | 10:48 |
alphadose[m] | but in the next release it would be the default behaviour, i.e it would work without the --config-xml flag | 10:48 |
*** lashuk has joined #openstack-jjb | 10:49 | |
alphadose[m] | ssbarnea: Is this what you want :- Scan for either jenkins_jobs.ini or jenkins_jobs.cfg or the env vars and if the field output is not present in any of them , display the warning the one should configure output in any one of the files ? | 10:51 |
ssbarnea | kinda of, in fact "scanning" is not needed as these is supposed to be loaded by config by default. but the result is the one you described. | 10:53 |
ssbarnea | i will show you | 10:53 |
ssbarnea | it should be very simple change | 10:53 |
alphadose[m] | ty 🙂 | 10:54 |
*** ssbarnea_ has quit IRC | 11:00 | |
alphadose[m] | I think I got it | 11:03 |
alphadose[m] | in config.py where it assigns conf=local_conf or conf=global_conf | 11:03 |
alphadose[m] | I just need to check if the field is present in each of these files or not | 11:03 |
alphadose[m] | the output field | 11:03 |
alphadose[m] | if not I will display the warning | 11:04 |
alphadose[m] | I could modify this function def _read_config_file(self, config_filename) to search for the relevant field and display the warning if it is not present | 11:10 |
alphadose[m] | ssbarnea: Are the above procedures ok ? | 11:10 |
*** ssbarnea_ has joined #openstack-jjb | 12:08 | |
*** lashuk has quit IRC | 12:33 | |
*** ssbarnea_ has quit IRC | 12:34 | |
*** alphadose[m] has quit IRC | 13:26 | |
*** alphadose[m] has joined #openstack-jjb | 13:41 | |
*** ssbarnea_ has joined #openstack-jjb | 14:13 | |
ssbarnea | i looked bit more at the code and i think we are better off dropping the classic format completly and having only the xml. | 14:58 |
ssbarnea | anyone expecting huge problems with the users? noting that we should wait at least one month before making 3.x release. | 14:59 |
ssbarnea | i do not see many benefits on plain output format which is incompatible with use of folders. | 14:59 |
Odd_Bloke | ssbarnea: Yeah, I wouldn't be opposed to that; I was explaining why it wasn't happening today. | 15:27 |
Odd_Bloke | (Which is because it's just part of the regular templating that JJB does, which isn't enabled for the DSL.) | 15:28 |
Odd_Bloke | ^ in reference to "I never said that we should format dsl implicitly but I see no reason why "!j2" would not be allowed on dsl." | 15:28 |
ssbarnea | ahh, so the reason why it does not work is because "!j2" works only on fields where jjb templating is enabled, right? | 15:29 |
Odd_Bloke | Correct. | 15:29 |
Odd_Bloke | Whereas, ATM, the dsl is just a string that's effectively hard-coded in to the output XML before the templating handles a job definition. | 15:30 |
ssbarnea | ahh... and do you know a way to make it work without enabling jjb templating? because this would break 98/100 of dsl jobs. | 15:30 |
alphadose[m] | ssbarnea: pls ping me once you reach the decision regarding the output format as I would begin the work immediately. As for me I am a bit more inclined towards deprecation instead of changing the output extension abruptly as it is the safer route but I am fine with either decision 🙂 | 15:34 |
Odd_Bloke | ssbarnea: Not really, know; trying a hacky POC locally now. | 15:39 |
openstackgerrit | Daniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] enable !j2 expansion for pipeline jobs (dsl) https://review.openstack.org/567922 | 15:49 |
Odd_Bloke | ssbarnea: ^ does the trick, I think. | 15:49 |
Odd_Bloke | But I don't know if it's a desirable way to solve the problem. | 15:49 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Deprecate running jobs without --config-xml flag https://review.openstack.org/567466 | 15:51 |
openstackgerrit | Daniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] enable !j2 expansion for pipeline jobs (dsl) https://review.openstack.org/567922 | 15:51 |
Odd_Bloke | Uh, actually, ^ fixes a typo. >.< | 15:51 |
openstackgerrit | Daniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] enable !j2 expansion for pipeline jobs (dsl) https://review.openstack.org/567922 | 15:55 |
Odd_Bloke | And, actually, ^ is a version moving it one step up the stack which makes it much less invasive. | 15:55 |
*** caphrim007_ has quit IRC | 15:59 | |
*** caphrim007 has joined #openstack-jjb | 16:00 | |
ssbarnea | Odd_Bloke: thanks!! testing it. looks fine so far but i plan to change the tests to include real jinja2 code inside. | 16:01 |
ssbarnea | the next challenge is if we can make a special jinja2 include function that includes jjb templates instead of j2 ones. | 16:02 |
ssbarnea | so we can re-use old snippets before we convert all of them to j2. | 16:02 |
*** ssbarnea_ has quit IRC | 16:02 | |
Odd_Bloke | ssbarnea: Like "{% include_jjb 'path/to/template' %}"? | 17:28 |
*** lashuk has joined #openstack-jjb | 17:31 | |
*** lashuk has quit IRC | 17:32 | |
Odd_Bloke | ssbarnea: I have a semi-functional prototype locally. | 18:28 |
openstackgerrit | Daniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] Implement a Jinja2 extension to include JJB templates https://review.openstack.org/568021 | 18:29 |
Odd_Bloke | I'm out of time to work on it now, so there it is. | 18:29 |
Odd_Bloke | But I hope I'll get back to it. | 18:29 |
*** caphrim007_ has joined #openstack-jjb | 19:27 | |
*** caphrim007 has quit IRC | 19:27 | |
*** caphrim007_ has quit IRC | 21:43 | |
*** caphrim007 has joined #openstack-jjb | 23:20 | |
*** caphrim007_ has joined #openstack-jjb | 23:24 | |
*** caphrim007 has quit IRC | 23:27 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!