Thursday, 2023-08-17

-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 873832: DNM: Profile some dynamic layout operations https://review.opendev.org/c/zuul/zuul/+/87383200:27
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 878945: Load configuration from unknown dynamic branches https://review.opendev.org/c/zuul/zuul/+/87894500:32
-@gerrit:opendev.org- Zuul merged on behalf of Simon Westphahl: [zuul/nodepool] 887266: Don't reload config when file wasn't modified https://review.opendev.org/c/zuul/nodepool/+/88726608:28
@dpawlik:matrix.orgHello folks o/ I have small question. According to the doc: https://zuul-ci.org/docs/zuul/latest/config/job.html job execution order is: 08:44
parent pre-run playbook
child pre-run playbook
child playbook
child post-run playbook
parent post-run playbook
parent cleanup-run playbook
And all would be fine, but when child has a cleanup-run playbook, it is executed after parent post-run and parent cleanup-run playbook. Is it fine or it is a bug?
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/nodepool] 891667: Handle more quota errors during server creation https://review.opendev.org/c/zuul/nodepool/+/89166709:32
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/nodepool] 891667: Handle more quota errors during server creation https://review.opendev.org/c/zuul/nodepool/+/89166709:32
-@gerrit:opendev.org- Zuul merged on behalf of Simon Westphahl: [zuul/zuul] 891577: Use sorted list for index of deduplicated secrets https://review.opendev.org/c/zuul/zuul/+/89157712:42
@dpawlik:matrix.org> <@dpawlik:matrix.org> Hello folks o/ I have small question. According to the doc: https://zuul-ci.org/docs/zuul/latest/config/job.html job execution order is: 13:56
>
> parent pre-run playbook
>
> child pre-run playbook
>
> child playbook
>
> child post-run playbook
>
> parent post-run playbook
>
> parent cleanup-run playbook
>
> And all would be fine, but when child has a cleanup-run playbook, it is executed after parent post-run and parent cleanup-run playbook. Is it fine or it is a bug?
does someone know answer for that question ?
@dpawlik:matrix.orgsorry for ping :)13:57
@harbott.osism.tech:regio.chatwell cleanup is to run after post, so that part is as expected. regarding the order of child cleanup vs. parent, I'm not sure, I would have expected the same order as for post-run, but maybe corvus can explain the difference14:31
@jim:acmegating.comthe code looks like it should do the same for post, but the author of the feature did not add a test that includes inheritance and the docs are ambiguous, so, technically i guess the behavior is undefined.14:36
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 887004: Add github event processing debug logs https://review.opendev.org/c/zuul/zuul/+/88700414:50
@michael_kelly_anet:matrix.orgCouldn't find anything obvious, but is the commit hash of the change for a job available as an environment variable in some way? (I realize that I can grab it as an *ansible* variable, of course)17:45
@michael_kelly_anet:matrix.orgIn case it helps the question, I'm using the zuul-jobs golang-go job to run some tests which need to know the commit hash.  Trying to avoid making the test depend on the massive library fanout of something like go-git *or* being able to run `git rev-parse HEAD` (because that's more fragile)17:59
@michael_kelly_anet:matrix.orgBut it's not obvious to me how I'd inject additional environment variables into it...17:59
@clarkb:matrix.orgI think `{{ zuul.commit_id }}` has it. YOu can also look in the zuul.projects dict to get a full listing of all the incorporated git info. And you can look at the git state in the git repos for the job. Though the git state for the git repos in the job will by default be for the speculative state. If you look at the origin remote branch heads instead that will be upstream state and you can diff. Since zuul deals with speculative states what yo uhave in the job doesn't necessarily map to anything that exists in your code review system at that point in time18:00
@clarkb:matrix.orgI think zuul.commit_id maps directly to the change/PR though without any speculative state. The projects dict and the content on disk in the git repos will be speculative state though18:00
@michael_kelly_anet:matrix.orgYea, that's the Ansible variable.  I'm ok with the speculative commit hash, I just need a commit hash that's unique for what is being tested18:01
@michael_kelly_anet:matrix.orgIf I were writing the job myself, I'd just inject the ansible variable as an environment variable.  I'm assuming it's not available as such by default?18:01
@clarkb:matrix.orghttps://docs.ansible.com/ansible/latest/playbook_guide/playbooks_environment.html18:02
@clarkb:matrix.orgyou can set it as part of the environment using ansible and the zuul variable18:02
@michael_kelly_anet:matrix.orgOk, sure.  But that means I wouldn't be using the golang-go job from zuul-jobs.18:02
@michael_kelly_anet:matrix.orgThis is ok, just trying to determine if there's another alternative :)18:02
@jim:acmegating.comThe structure of jobs in the zuul-jobs repo is intentionally designed around simple playbooks that are lists of roles, and the roles have all the logic.  that's so that in situations like this, you just make your own playbook that's like 2 lines long with the extra whatever you need.  in this case, an env variable. eg: https://opendev.org/zuul/zuul-jobs/src/branch/master/playbooks/go/run.yaml18:03
@clarkb:matrix.orgI guess the other option is to add it to the library jobs assuming it is a thing golang commonly wants during builds18:12
@clarkb:matrix.orgbut no, our jobs haven't generally added that info in an env var. It is available in the ansible environment and you can inject it where necessary but as corvus says you ma need to write your own job or replace the run playbook in a child job or something18:12
@jim:acmegating.comi do not think it is appropriate to add to zuul-jobs.18:14
@jim:acmegating.comjust inherit from the job, override the playbook and you're done.18:15
@michael_kelly_anet:matrix.orgI agree with corvus , adding the env variable to the job in zuul-jobs is not what I'd want to do. 18:42
@michael_kelly_anet:matrix.orgThe suggestion of just replacing the run.yaml seems totally sane though.  It'll keep things simple.18:43
@michael_kelly_anet:matrix.orgThanks for the info corvus and Clark 18:44
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 891909: Remove unused github getBranchProtectionRule method https://review.opendev.org/c/zuul/zuul/+/89190920:28
-@gerrit:opendev.org- Joshua Watt proposed: [zuul/nodepool] 891635: Add option to decline node request based on quota https://review.opendev.org/c/zuul/nodepool/+/89163521:10
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 891910: Document max_threads_per_installation https://review.opendev.org/c/zuul/zuul/+/89191021:12
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed on behalf of Tobias Henkel: [zuul/zuul] 761520: Only report dequeue if we have reported start https://review.opendev.org/c/zuul/zuul/+/76152022:46
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed on behalf of Simon Westphahl: [zuul/zuul] 650276: Keep task stdout/stderr separate in result object https://review.opendev.org/c/zuul/zuul/+/65027623:22

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!