Monday, 2019-07-29

*** altlogbot_3 has quit IRC09:24
*** altlogbot_3 has joined #openstack-jjb09:25
Odd_Blokephilroche: https://storyboard.openstack.org/#!/story/2006254 <-- this is being reported as something your patch introduced13:21
philrocheOdd_Bloke: Thanks for the heads up. I have replied asking reporters to try patch https://pastebin.ubuntu.com/p/F3w5wHcdtr/13:32
Odd_Blokephilroche: It sounds like it should be fairly easy to reproduce (he said, having not tried at all himself ;), is it worth creating a testcase for the affected configuration so we know we won't regress it in future?13:35
philrocheYes, I am in the process of adding tests now13:35
Odd_BlokeOK, great!13:39
Odd_Blokephilroche: Ping me once you have something up and I'll review.13:39
*** electrofelix has joined #openstack-jjb14:40
*** openstackgerrit has joined #openstack-jjb15:48
openstackgerritPhil Roche proposed jjb/jenkins-job-builder master: Avoid ResourceWarning by closing file handlers when finished  https://review.opendev.org/67331715:48
openstackgerritPhil Roche proposed jjb/jenkins-job-builder master: Bugfix: deep_formatting non templates caused regressions when variables used  https://review.opendev.org/67331815:48
philrocheOdd_Bloke: https://review.opendev.org/#/c/673318/1 has been proposed. It does fix the reported issues but I'm not sure it's the right approach long term15:52
Odd_Blokephilroche: I agree, that feels like we'll be playing whack-a-mole.16:00
philrocheYup16:00
Odd_BlokeSo what's the root cause of the bug?  Is it that we changed the default behaviour from "template in job-templates" to "template everything"?16:01
Odd_BlokeOr is it less broad than that?16:01
Odd_Blokes/everything/\0 except DSLs/, I guess.16:04
philrocheCorrect. Yes16:04
philrocheWell not exactly - more that we now call deep_format on everything (apart from dsl)so we can use !include-X calls in jobs rather than just job-templates and builders16:07
Odd_Blokephilroche: If we aren't in a job-template, what context does the Jinja2 rendering have?16:11
philrocheThe specific context I was trying to solve was being able to build yaml in multiple job configs from a common source, thus reducing duplicate configuration.16:14
Odd_Blokephilroche: So I'm wondering if we can solve this problem by rendering the Jinja2 template at include time.16:16
philrocheAs part of the CustomLoader?16:16
Odd_BlokeI don't _think_ the !include equivalent should be doing any template substitution, it should be including YAML _before_ the templating phase.16:17
Odd_Bloke(But let me be very clear that this is conjecture, I don't really have a good mental model of how this all works any longer.)16:17
philrocheNo, that does make sense16:17
Odd_BlokeSo I think we can dispense with the loader entirely?16:17
Odd_BlokeAnd YamlIncludeJinja2AsYaml._from_file should render the template with no arguments?16:19
Odd_BlokeDoes that make sense?16:19
philrocheYes, I think so. I'll try that approach16:22
openstackgerritPhil Roche proposed jjb/jenkins-job-builder master: Bugfix: deep_formatting non templates caused regressions when variables used  https://review.opendev.org/67331816:58
openstackgerritPhil Roche proposed jjb/jenkins-job-builder master: Bugfix: deep_formatting non templates caused regressions when variables used  https://review.opendev.org/67331817:00
philrocheOdd_Bloke: https://review.opendev.org/#/c/673318 now updated and avoids the whack-a-mole approach without removing the ability to template !includes17:03
openstackgerritPhil Roche proposed jjb/jenkins-job-builder master: Bugfix: deep_formatting non templates caused regressions when variables used  https://review.opendev.org/67331817:13
Odd_Blokephilroche: Did the changes to the local_yaml.py objects not work out?17:33
philrocheThey were not required17:33
Odd_Blokephilroche: I'm concerned about no longer formatting strings, that seems like a big behaviour change.17:36
Odd_Bloke(Which might not be necessary if we can drop the deep_format call you added in parser.py by making the local_yaml changes?)17:38
philrocheOdd_Bloke: We still format strings if they are part of a template which is the same behaviour as prior to my original patchset17:39
philrocheIf not a template I don't see why we would want to attempt to format strings17:40
philrocheAlso, if we don't call deep_format recursively then the !include will never happen and will remain as "!include" string17:44
Odd_Blokephilroche: !include was working before any of these changes, so I don't see how any of them can now be required to make it work?17:52
Odd_BlokeAnd I _think_ the !include* substitution happens in the YAML parsing, well before we're formatting anything.17:52
*** electrofelix has quit IRC18:06
philrocheOdd_Bloke: From my initial testing !includes only worked inside a job-template or a builder18:11
Odd_Blokephilroche: https://paste.ubuntu.com/p/8vXbxFmv8P/ and https://paste.ubuntu.com/p/s6qswph72j/ together work for me on 2.10.1.18:15
philrocheOdd_Bloke: Yes, that is part of a builder18:15
Odd_BlokeOh, I see, my mistake.18:16
Odd_BlokeLet me try something else.18:16
philrocheThanks for your help. I am going EOD now but I will continue investigating tomorrow18:17
Odd_Blokephilroche: OK, I don't think it's _builders_ per se, I think you can't !include mappings.18:17
Odd_Blokephilroche: zxiiro: I wonder if we should revert that change (and re-release) as we haven't got a clear path to resolution yet and it's breaking people.  What do you think?18:18
philroche+118:18
Odd_BlokeOK, I'll propose that.18:21
Odd_Blokephilroche: Have a good evening!18:21
zxiirophilroche: Odd_Bloke just catching up.... I'm happy to produce a patch release but someone's going to have to propose the revert.18:31
zxiirois there a patch already?18:31
Odd_Blokezxiiro: I'm just configuring gerrit on this machine, then I will propose one.18:36
zxiirosounds good18:37
Odd_BlokeUgh, gerrit setup sucks.18:39
openstackgerritDaniel Watkins proposed jjb/jenkins-job-builder master: Revert "Add support for rendering jinja template as yaml"  https://review.opendev.org/67334718:42
Odd_BlokeFinally.18:42
Odd_BlokeI'm still having to fill in my password manually every time I run something, but whatever.18:42
Odd_Blokezxiiro: Pinging in case you didn't see the above.19:25
zxiiroOdd_Bloke: approved. sorry was busy with work19:26
Odd_BlokeNot a problem!19:27
zxiiroI'll cut a release once Zuul merges that19:27
Odd_BlokeThanks!19:27
openstackgerritMerged jjb/jenkins-job-builder master: Revert "Add support for rendering jinja template as yaml"  https://review.opendev.org/67334719:36

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