abelur | Howdy vsevolod_ Are there any example how the var expansion works with the job groups? I see this https://review.opendev.org/c/jjb/jenkins-job-builder/+/900745/9/tests/yamlparser/job_fixtures/job-and-macro-expansions.yaml does not have any job-group examples. It's a bit confussing. | 01:21 |
---|---|---|
abelur | Seeing errors from workflow run mostly because of JJB 6x updates https://github.com/o-ran-sc/ci-management/actions/runs/7704353256/job/20996498667 | 01:22 |
vsevolod_ | I suppose job-group expansion should not be changed | 06:53 |
vsevolod_ | May be you need to replace `!include-raw:` -> `!include-raw-escape:` here | 06:59 |
vsevolod_ | I mean, if this include does not supposed to be escaped | 07:00 |
vsevolod_ | * to be expanded | 07:00 |
opendevreview | Merged jjb/jenkins-job-builder master: Update TAP publisher plugin https://review.opendev.org/c/jjb/jenkins-job-builder/+/906536 | 07:03 |
abelur | vsevolod_: in what situation should we need to include-raw vs include-raw-escape? My understanding is only when var are expanded we would need to escape it right? | 07:16 |
abelur | vsevolod_: what about places where we have use `- shell:` directly? | 07:17 |
abelur | https://www.irccloud.com/pastebin/9TE30oiG/shell-escape | 07:18 |
vsevolod_ | It's vice-versa | 07:19 |
vsevolod_ | should be escaped so won't be expanded | 07:19 |
vsevolod_ | I want to rename those in next release to *-expand and *-verbatim | 07:19 |
vsevolod_ | They always cause confusion | 07:20 |
abelur | yup, I second that! It def makes more sense! | 07:20 |
vsevolod_ | And about `-shell:` above: | 07:37 |
vsevolod_ | I don't see problem with code you provided that would cause this error | 07:38 |
vsevolod_ | may be you actually used `${ALLOW_PROJECTS}` there? | 07:38 |
vsevolod_ | this shell would be expanded, as usual | 07:38 |
abelur | I change that into the following: | 07:39 |
vsevolod_ | Ah, I see: you provided source for different macro. Failed is distribution-check-wipe, you provided is distribution-check-verify-groupid | 07:40 |
abelur | https://www.irccloud.com/pastebin/G4qZcnRg/ | 07:40 |
vsevolod_ | but I see variable used in there, `{gerrit-project}` | 07:41 |
abelur | and put the `- shell:` into the script `distribution-check-verify-groupid.sh`, does not through that error anymore, so does that mean its still gonna be an runtime issue? | 07:41 |
vsevolod_ | gerrit-project will not be expanded, when you use include-raw-escape | 07:42 |
abelur | oh, boy! thatn `jjb test` does not even complain or fail the test | 07:42 |
vsevolod_ | Why it should, it just includes this variable as is, without expanding it. It will fail on runtime | 07:43 |
abelur | Ah right! I would also need to change `{gerrit-project}` -> `{{gerrit-project}}` then. | 07:44 |
abelur | my bad | 07:44 |
vsevolod_ | No, It won't help | 07:44 |
vsevolod_ | Just use include-raw: | 07:44 |
vsevolod_ | or move it back as it wa | 07:45 |
vsevolod_ | or move it back as it was | 07:45 |
vsevolod_ | Just don'nt use {} around ALLOW_PROJECTS | 07:45 |
vsevolod_ | And, may be, you need a cofee :) | 07:45 |
abelur | haha! always more the coffee, more merrier! :-)) | 07:46 |
abelur | alrighty, I just move it back to `- shell: !include-raw:`. Thank you | 07:47 |
abelur | That's a lot of work migrating the source code repos! we have several repos where this gotta be fixed then with JJB 6x :( | 07:47 |
abelur | Need to do this with care of would have runtime issues with the workflows. | 07:48 |
vsevolod_ | Yeah, sorry for that | 07:48 |
abelur | No, all good! At least its more easily readable! Do you have refs to some examples I can go thru? | 07:49 |
vsevolod_ | I would suggest to compare output of test before and after - if they do not differ, everything is ok | 07:49 |
vsevolod_ | It was on jjb list message | 07:49 |
abelur | ahha! that's a good check! I'll keep that in mind. | 07:49 |
vsevolod_ | And you provided it yourself also: | 07:50 |
vsevolod_ | https://review.opendev.org/c/jjb/jenkins-job-builder/+/900858/8/tests/yamlparser/job_fixtures/job-and-macro-expansions.yaml | 07:50 |
vsevolod_ | That is actually full example of what should be changed | 07:50 |
abelur | ah cool! that is the same link I provided earlier. | 07:52 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!