Saturday, 2018-05-12

*** caphrim007_ has joined #openstack-jjb00:00
*** caphrim007 has quit IRC00:03
*** lashuk has joined #openstack-jjb00:48
abelurssbarnea: are you around?01:13
abelurssbarnea: 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 IRC02:02
*** lashuk has joined #openstack-jjb03: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 release06:30
openstackgerritAnish Mukherjee proposed openstack-infra/jenkins-job-builder master: Deprecate running jobs without --config-xml flag  https://review.openstack.org/56746607:07
openstackgerritAnish Mukherjee proposed openstack-infra/jenkins-job-builder master: Deprecate running jobs without --config-xml flag  https://review.openstack.org/56746607:11
*** lashuk has quit IRC08:47
*** lashuk has joined #openstack-jjb08:47
*** ssbarnea_ has joined #openstack-jjb09:47
ssbarneaalphadose[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
ssbarneaOdd_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
ssbarneain 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 IRC10:43
alphadose[m]ssbarnea: Which config file are you talking about , is it setup.cfg ?10:45
ssbarneaalphadose[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 mandatory10:48
alphadose[m]it would be enforced with the deprecation in the current release10:48
ssbarneawhat 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 flag10:48
*** lashuk has joined #openstack-jjb10: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
ssbarneakinda 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 you10:53
ssbarneait should be very simple change10:53
alphadose[m]ty 🙂10:54
*** ssbarnea_ has quit IRC11:00
alphadose[m]I think I got it11:03
alphadose[m]in config.py where it assigns conf=local_conf or conf=global_conf11:03
alphadose[m]I just need to check if the field is present in each of these files or not11:03
alphadose[m]the output field11:03
alphadose[m]if not I will display the warning11: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 present11:10
alphadose[m]ssbarnea: Are the above procedures ok ?11:10
*** ssbarnea_ has joined #openstack-jjb12:08
*** lashuk has quit IRC12:33
*** ssbarnea_ has quit IRC12:34
*** alphadose[m] has quit IRC13:26
*** alphadose[m] has joined #openstack-jjb13:41
*** ssbarnea_ has joined #openstack-jjb14:13
ssbarneai 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
ssbarneaanyone expecting huge problems with the users? noting that we should wait at least one month before making 3.x release.14:59
ssbarneai do not see many benefits on plain output format which is incompatible with use of folders.14:59
Odd_Blokessbarnea: 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
ssbarneaahh, so the reason why it does not work is because "!j2" works only on fields where jjb templating is enabled, right?15:29
Odd_BlokeCorrect.15:29
Odd_BlokeWhereas, 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
ssbarneaahh... 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_Blokessbarnea: Not really, know; trying a hacky POC locally now.15:39
openstackgerritDaniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] enable !j2 expansion for pipeline jobs (dsl)  https://review.openstack.org/56792215:49
Odd_Blokessbarnea: ^ does the trick, I think.15:49
Odd_BlokeBut I don't know if it's a desirable way to solve the problem.15:49
openstackgerritSorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Deprecate running jobs without --config-xml flag  https://review.openstack.org/56746615:51
openstackgerritDaniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] enable !j2 expansion for pipeline jobs (dsl)  https://review.openstack.org/56792215:51
Odd_BlokeUh, actually, ^ fixes a typo. >.<15:51
openstackgerritDaniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] enable !j2 expansion for pipeline jobs (dsl)  https://review.openstack.org/56792215:55
Odd_BlokeAnd, actually, ^ is a version moving it one step up the stack which makes it much less invasive.15:55
*** caphrim007_ has quit IRC15:59
*** caphrim007 has joined #openstack-jjb16:00
ssbarneaOdd_Bloke: thanks!! testing it. looks fine so far but i plan to change the tests to include real jinja2 code inside.16:01
ssbarneathe next challenge is if we can make a special jinja2 include function that includes jjb templates instead of j2 ones.16:02
ssbarneaso we can re-use old snippets before we convert all of them to j2.16:02
*** ssbarnea_ has quit IRC16:02
Odd_Blokessbarnea: Like "{% include_jjb 'path/to/template' %}"?17:28
*** lashuk has joined #openstack-jjb17:31
*** lashuk has quit IRC17:32
Odd_Blokessbarnea: I have a semi-functional prototype locally.18:28
openstackgerritDaniel Watkins proposed openstack-infra/jenkins-job-builder master: [WIP] Implement a Jinja2 extension to include JJB templates  https://review.openstack.org/56802118:29
Odd_BlokeI'm out of time to work on it now, so there it is.18:29
Odd_BlokeBut I hope I'll get back to it.18:29
*** caphrim007_ has joined #openstack-jjb19:27
*** caphrim007 has quit IRC19:27
*** caphrim007_ has quit IRC21:43
*** caphrim007 has joined #openstack-jjb23:20
*** caphrim007_ has joined #openstack-jjb23:24
*** caphrim007 has quit IRC23:27

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!