Monday, 2018-06-25

*** openstack has joined #openstack-jjb01:20
*** ChanServ sets mode: +o openstack01:20
*** rakkaus_ has joined #openstack-jjb07:13
*** hashar has joined #openstack-jjb07:34
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: fixup  https://review.openstack.org/57774908:19
*** electrofelix has joined #openstack-jjb08:58
*** r-mibu has joined #openstack-jjb09:04
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57762809:10
rakkaus_hello guys! that ^ is my change, I don't have much experience with gerrit, I've squashed commits but I still see several commits in "related changes" can some one help me with making this change proposal valid?09:23
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57776609:45
rakkaus_how can I run pep8 checks locally?09:58
rakkaus_I run `tox` it does not fail locally09:58
openstackgerritDennis Dmitriev proposed openstack/python-jenkins master: Check for 'Location' header in the response  https://review.openstack.org/57217909:59
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57777510:08
electrofelixrakkaus_: if you just run 'tox' it will run all defined envs and tox is by default configured to continue even if one of the envs fails, so you probably need to explicitly run just the one you need 'tox -e pep8' see the 11 tasks on the failed ARA report http://logs.openstack.org/28/577628/2/check/tox-pep8/fa47df4/ara-report/10:21
rakkaus_yeah, thanks I found what was causing failures in logs here http://logs.openstack.org/66/577766/1/check/tox-pep8/cdaf14b/job-output.txt.gz10:23
rakkaus_so I've updated my changes https://review.openstack.org/577775 now passing10:24
*** caphrim007_ has quit IRC10:26
*** caphrim007 has joined #openstack-jjb10:26
*** r-mibu has quit IRC12:19
ssbarneazxiiro: electrofelix Odd_Bloke : i am still in vacation but regarding reviews i think is to use common sense, complex/risky reviews should keep needing 2x2 but simple ones with very low risk are ok to use only 1x1.12:22
ssbarneathere is an important reason for flexing the rules: adding or fixing support for a corner case plugin, something that has very few users.12:23
ssbarneaif we follow 2x2 rule the change may never get merged because it would be close to impossible to get enough interest from others to get any votes.12:24
*** caphrim007 has quit IRC13:07
*** dje2991 has joined #openstack-jjb13:14
dje2991Hello guys13:15
dje2991I'm a bit new to jenkins job builder and try to play with templates and Jinja2 expension, is there somebody around that can help?13:15
dje2991I think the issue is that Jinja2 templates can only be used to expend into a string, but not as yaml objects, is that right?13:17
dje2991here is what I'm trying to do13:17
dje2991https://www.irccloud.com/pastebin/OzYi1TWz/default.yaml13:18
dje2991https://www.irccloud.com/pastebin/VSogr62g/jobs.yaml13:18
Odd_Blokedje2991: o/13:19
dje2991the error I'm getting is13:19
dje2991 File "/home/jguichar/.local/lib/python2.7/site-packages/jenkins_jobs/modules/triggers.py", line 517, in gerrit13:19
dje2991    'compare-type', file_path.get('compare-type', 'PLAIN'))13:19
dje2991AttributeError: 'unicode' object has no attribute 'get'13:19
Odd_BlokeYeah, I think you've basically nailed the problem; the Jinja2 stuff has only been implemented to replace string templating ATM.13:20
dje2991:)13:20
Odd_Bloke"The tag !include-jinja2: will treat the given string or list of strings as filenames to be opened as Jinja2 templates, which should be rendered to a string and included in the calling YAML construct."13:21
dje2991so what would be the recomended way to do what I'm trying13:21
dje2991aka have a  yaml object that can be replicated multiple time13:21
Odd_Bloke(And !j2 is the "inline string" version of !include-jinja2.)13:21
Odd_BlokeI don't know that there really is a great way of doing it. :(13:23
dje2991IC13:23
dje2991then the other solution I had in mind was if there was a way to add configs into a template that was included13:24
dje2991say I would have the trigger template that contains my13:24
dje2991'generic' elements13:24
dje2991and then just add to it (in the job definition) the extra file-paths configurations.... is there a way to do that?13:25
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57777513:27
Odd_Blokedje2991: http://paste.ubuntu.com/p/C3grqRXR5n/ seems to DTRT for me locally.13:31
dje2991interestin13:32
dje2991interesting13:32
*** caphrim007 has joined #openstack-jjb13:33
dje2991what version are you using13:33
dje2991?13:33
dje2991I tried with 2.0.1013:33
Odd_Bloketrunk13:33
zxiiroOdd_Bloke: I'm surprisd that worked. you should have had to use a {ob:var} declaration there13:34
zxiiroOdd_Bloke: It should be file-paths: '{obj:file_paths}'13:34
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57762813:35
Odd_BlokeBoth spellings produce the same output for me here.13:36
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57762813:37
*** caphrim007 has quit IRC13:38
Odd_BlokeI'm not sure if we could (meaningfully) use Jinja2 to template YAML output, because I don't think we have the context (i.e. parameters/variables) available to us at the point we generate the YAML.13:42
Odd_BlokeI _think_ the assumption is that the YAML is static, and strings in the YAML are templated.13:43
Odd_BlokeBut I may be missing something; that part of the JJB codebase is still something of a mystery to me.13:43
dje2991IC, I think I will work this around for the time being and will try later when I'll have a bit more time13:44
dje2991just trying to run using trunk to see if I can get what Odd_Bloke got13:45
Odd_Blokedje2991: Did you try the {obj:...} syntax that zxiiro suggested?13:46
dje2991No I did not13:46
Odd_BlokeThat might be worth a punt.13:46
dje2991https://www.irccloud.com/pastebin/7DPDTKi4/13:47
dje2991somthing like this?13:47
Odd_BlokeAh, no; the Jinja2 stuff definitely won't work.13:48
Odd_BlokeI thought you were trying the "pass in the full section" approach I suggested and still seeing failures.13:48
Odd_Bloke(And I was wondering if you were seeing different results because you were doing '{file_paths}' rather than '{obj:file_paths}'.)13:49
dje2991ho!!! IC13:49
dje2991so code snippet you sent do not raise error anymore13:56
dje2991but block for the file-paths is not added13:56
Odd_Blokedje2991: So the snippet at http://paste.ubuntu.com/p/C3grqRXR5n/ is raising an error for you locally?13:58
Odd_BlokeCould you pastebin the error?13:58
dje2991ha wait I had one missing line13:59
dje2991:D13:59
zxiirodje2991: when using "obj:var" notation you cannot use dashes in the name. You must use underscores.13:59
zxiiroit's a bug I'm not sure if we ever fixed13:59
dje2991now it seems to work14:00
dje2991this makes exactly what I wanted14:00
dje2991many thanks!14:00
Odd_Bloke\o/14:03
*** rakkaus_ is now known as riuvshyn14:14
openstackgerritRoman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin  https://review.openstack.org/57762815:30
*** electrofelix has quit IRC15:44
*** caphrim007 has joined #openstack-jjb15:44
*** caphrim007 has quit IRC15:45
*** caphrim007 has joined #openstack-jjb15:45
*** caphrim007 has quit IRC15:46
*** caphrim007 has joined #openstack-jjb15:46
*** riuvshyn has quit IRC15:55
*** riuvshyn has joined #openstack-jjb16:25
*** riuvshyn has quit IRC17:52
*** riuvshyn has joined #openstack-jjb17:53
*** riuvshyn has quit IRC17:57
*** riuvshyn has joined #openstack-jjb19:03
*** riuvshyn has quit IRC19:10
Odd_Blokedje2991: Oh, by the way, another way we've addressed this (where we have a small N of cases) is !include: "{some-variable}.yaml.inc", and then had a separate file for each case.19:26
Odd_BlokeWe only have 2 different values for {some-variable} where we use this, though; I don't think it would scale well much beyond that.19:26
openstackgerritJef Mallal proposed openstack-infra/jenkins-job-builder master: Add XUnit processing plugin to builders  https://review.openstack.org/46817519:36
*** riuvshyn has joined #openstack-jjb20:21
*** riuvshyn has quit IRC20:30
*** hashar has quit IRC21:48
*** riuvshyn has joined #openstack-jjb22:30
*** riuvshyn has quit IRC22:35
*** caphrim007_ has joined #openstack-jjb23:03
*** caphrim007 has quit IRC23:06
*** caphrim007_ has quit IRC23:09
*** caphrim007 has joined #openstack-jjb23:11
*** caphrim007 has quit IRC23:14

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