Friday, 2018-05-11

*** caphrim007 has joined #openstack-jjb01:45
*** caphrim007 has quit IRC01:47
*** caphrim007 has joined #openstack-jjb02:14
*** waynr has quit IRC03:08
openstackgerritAnish Mukherjee proposed openstack-infra/jenkins-job-builder master: Fix nested folders bug in test mode  https://review.openstack.org/56746605:03
alphadose[m]Hello everyone :)05:04
alphadose[m]I would be grateful if someone reviews this patch of mine https://review.openstack.org/#/c/567466/05:05
alphadose[m]Thanks05:05
*** ssbarnea_ has joined #openstack-jjb07:41
*** ssbarnea_ has quit IRC07:49
*** electrofelix has joined #openstack-jjb08:00
*** openstack has joined #openstack-jjb09:28
*** ChanServ sets mode: +o openstack09:28
*** larainema has quit IRC09:50
*** ssbarnea_ has joined #openstack-jjb09:57
*** lashuk has joined #openstack-jjb09:59
*** lashuk has quit IRC10:00
*** lashuk has joined #openstack-jjb10:01
*** lashuk has quit IRC10:21
ssbarneaalphadose[m]: gave feedback on it. sadly you may not like it but there are reasons why we would not do it like this.10:49
alphadose[m]ssbarnea: I appreciate your feedback :). I would incorporate your suggested changes and push the new patch soon.11:28
ssbarneaalphadose[m]: mainly jjb output is not broken. the default output format does not work with folders.11:28
ssbarneabut if we change default we break backwards compatibility.11:28
alphadose[m]got it11:29
alphadose[m]so for now we can change the output to config.xml as the default behaviour  ?11:29
ssbarneai would be ok with that if we allow people to configure format in config and if we also increase major version number.11:30
ssbarneai already switched to new format for the same reason11:30
ssbarneabut others probably didn't11:30
alphadose[m]So we can add a deprecation for the old behaviour while implementing the new feature at the same time ?11:31
alphadose[m]ssbarnea: ^11:33
ssbarneayep, maybe that's the trick: if format is not defined in config/cli, to display a deprecation that telling user to configure it because next version will change default.11:34
*** electrofelix has quit IRC11:35
ssbarneaand we merge this into next 2.x release, and change default on 3.x (waiting like 2-4 weeks before doing the 3.x release)11:35
alphadose[m]cool, will do it soon 👍11:35
ssbarneabut from my experience nobody reads the warnings, so they will know only when it will break :D ... but at least we are covered that we did the right thing.11:36
alphadose[m]ok to summarize :- Add a deprecation if config/cli is not configured11:37
alphadose[m]and in the next release change the default behaviour to config.xml11:37
*** ssbarnea_ has quit IRC12:43
*** ssbarnea_ has joined #openstack-jjb13:12
Odd_BlokeAre there any other major changes that we'd want to bump the major version for?13:47
Odd_BlokeI know there have been rumblings about templating, but I don't think anyone's started on anything concrete.13:47
*** larainema has joined #openstack-jjb14:08
*** lashuk has joined #openstack-jjb15:40
*** lashuk has quit IRC15:52
*** lashuk has joined #openstack-jjb15:52
*** openstack has joined #openstack-jjb17:04
*** ChanServ sets mode: +o openstack17:04
*** smyers has quit IRC17:33
*** smyers has joined #openstack-jjb17:36
ssbarneaOdd_Bloke: i just wanted to ask something about templating18:04
ssbarneai discoverd that I cannot use !j2 with "dsl:", it works only with "shell".18:04
ssbarneaalso, I am curious if it would be possible to have a special jinja2 tag like include_jjb18:05
ssbarneawith these two, people should be able to migrate from jjb-templates to jinja2 templates, gradually.18:06
Odd_Blokessbarnea: Hmm, I haven't used dsl so I haven't hit that; do includes work there normally?18:06
Odd_Blokessbarnea: And what would include_jjb do?18:06
ssbarneafirst step being to convert a "!include-raw" into a j2.18:06
Odd_BlokeWell, !include-raw should become !include-jinja218:07
Odd_BlokeRight?18:07
ssbarneayes they do, we used "dsl: !include-raw: ..."  alot.18:07
ssbarneait would be practical impossible to switch everything to j2, we have >1k files and with like 50 commits/day.18:08
ssbarneaonly chance it would be if we can refactor/transition gradually.18:08
Odd_BlokeRight, !j2 is for an inline string template (e.g. 'disabled: "{% if configuration.disabled %}true{% else %}false{% endif %}"').18:09
Odd_BlokeUgh, 'disabled: !j2: "{% if configuration.disabled %}true{% else %}false{% endif %}"'18:09
ssbarneabut why not to work the same way?18:10
Odd_BlokeWhereas if you have a Jinja2 template _file_, you want '!include-jinja2: my_template.j2'18:10
Odd_BlokeThere are two ways to template in JJB, directly in a string in a YAML file, or by including a separate file.18:11
Odd_Bloke!j2 is analogous the "templating in a string" and !include-jinja2 is analogous to !include-raw.18:11
openstackOdd_Bloke: Error: "j2" is not a valid command.18:11
Odd_BlokeThopenstack.18:11
Odd_Blokessbarnea: Did that explanation make sense?18:12
ssbarnealet me open a CR to explain it... already did half of it yesterday18:13
Odd_BlokeSure thing.18:14
Odd_Bloke(I'm keen to understand the gap here, because we have been transitioning our codebase gradually from one to the other. :)18:16
*** openstackgerrit has joined #openstack-jjb18:18
openstackgerritSorin Sbarnea proposed openstack-infra/jenkins-job-builder master: enable !j2 expansion for pipeline jobs (dsl)  https://review.openstack.org/56792218:18
ssbarneathis test files should explain what it should work18:19
ssbarneai do not see any reason why we can do shell: !j2: "..." but not dsl: !j2: "..."18:20
ssbarneasomething is missing in the parser but I have no idea what.18:20
openstackgerritDaniel Watkins proposed openstack-infra/jenkins-job-builder master: enable !j2 expansion for pipeline jobs (dsl)  https://review.openstack.org/56792219:44
Odd_BlokeThere was a typo in your job definition, but I see the problem now.19:45
Odd_Blokessbarnea: I think the problem is that the XML element is created in jenkins_jobs.modules.project_pipeline:Pipeline.root_xml.19:56
Odd_BlokeSo it's not expanded as part of the regular pass.19:57
Odd_BlokeI have a change that fixes this specifically, but I'm not sure if it's the correct fix more generally speaking.20:00
openstackgerritDaniel Watkins proposed openstack-infra/jenkins-job-builder master: enable !j2 expansion for pipeline jobs (dsl)  https://review.openstack.org/56792220:01
Odd_Blokessbarnea: So ^ fixes that specific failure (but introduces others).20:02
Odd_BlokeBut, basically, the problem is that the dsl isn't a regular component, so isn't expanded at ~line 169 in jenkins_jobs.registry.20:02
openstackgerritJan Hruban proposed openstack/python-jenkins master: Do not require requests-kerberos for tests  https://review.openstack.org/56794320:42
Odd_Blokessbarnea: Hmm, so the other test failures with my change are because if we _do_ format DSLs, then all curly braces need to be escaped.20:57
Odd_Blokessbarnea: Which I don't think is a particularly pleasant option, given how curly-braced the DSL language is.20:57
*** ssbarnea_ has quit IRC22:16
*** smyers has quit IRC22:53
*** smyers has joined #openstack-jjb22:55

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