Tuesday, 2023-07-25

-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 889431: Fix null dereference in gitlab https://review.opendev.org/c/zuul/zuul/+/88943114:23
@mfeder:matrix.orgHi,14:27
Zuul-Github CI pipeline-related question:
I would like to setup the pipeline on GitHub as follows:
- Pipeline should be triggered via PR comment "e2e-test"
- Pipeline should require PR label "ok-to-test" - label could be assigned to PR only by "trusted" GitHub account
- I've expected that `current-patchset: True` [0] associated the label with the latest commit in the PR and this prevents "untrusted" developers to push another commit which may expose some secrets
- This did not work. It is possible to push another commit to the PR and trigger pipeline via PR comment "e2e-test"
- Is it expected behavior?
In general, I want to protect a pipeline execution from "un-trusted" developers and introduce some pipeline conditions to ensure that. Would be great if mentioned condition is not `review approval` but something like a label.
[0] https://zuul-ci.org/docs/zuul/latest/drivers/github.html#attr-pipeline.require.%3Cgithub%20source%3E.current-patchset
@sean-k-mooney:matrix.orghi folks. quick question. support for galaxy roles and collection in zuul has been pending for a long time. for the most part zuul roles just work for most cases however recently i have had need to use roles that include action plugns/modules... and since they are packaged as glaxy collection the plugins are not packaged inline in the role16:04
@sean-k-mooney:matrix.orghas anyone ever managed to make that work with zull16:04
@sean-k-mooney:matrix.orgim trying to avoid the current hack that is being used to work around it (using ansible shell/command to run ansible-playbook ... on the nodpool vm)16:05
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 889431: Fix null dereference in gitlab https://review.opendev.org/c/zuul/zuul/+/88943116:08
@jim:acmegating.comsean-k-mooney: that has not been implemented yet16:09
@sean-k-mooney:matrix.orgyes im aware16:11
@sean-k-mooney:matrix.orgim really just wonderign is there any way i could modify the zuul job so that i can include the plugins the same way i include the roles16:11
@sean-k-mooney:matrix.orgi tried using AnsibleLibary and other similar options16:12
@sean-k-mooney:matrix.orgbasically my role works fine when urn with molecule[vagrant] locally so my fall back is just run that in the zuul vm16:13
@sean-k-mooney:matrix.orgit almost works when i have zuul run the converge/verify playbooks. i was just trying to avoid nested virt but its always an option as is runing ansibel in a sub shell16:14
@jim:acmegating.comah, sorry, i misunderstood your question.  i suspect that the best way to accomplish that would be to implement the feature, but i think it depends somewhat on ansible's module loading behavior and rules.  we don't really track that any more in zuul.  maybe something in ansible 8 would make it easier.  we just merged support for that.16:14
@sean-k-mooney:matrix.orgya this is not soemthing they document partically well16:15
@sean-k-mooney:matrix.orgi have other jobs i can follow as a reference to the ansible in ansble approch i was just trying  to avoid installing it on the test vm since it wont be there normally16:16
@sean-k-mooney:matrix.orgok ill see if i cna figure somethign else out and if not ill go back to the solution that work16:18
@sean-k-mooney:matrix.orgthanks :)16:18
@fungicide:matrix.orgthe alternative is nested ansible17:56
@fungicide:matrix.orgrather than try to use collections directly in the job playbooks run by the executor, have the job call an ansible on a test node and install whatever collections you want onto that test node17:56
@fungicide:matrix.orgit's not a great solution, but it does at least work for some cases17:57
@fungicide:matrix.orgsean-k-mooney: the main challenge with using collections directly in jobs is more or less the same as the challenge with pip installing arbitrary ansible modules (or other python libraries) for use by the ansible run on the zuul executor. if you have control of the executor which is being used, you could probably install the desired collections into the python environment(s) for the executor's ansible version(s)17:59
@fungicide:matrix.orgbut not arbitrary collections at job runtime17:59
@sean-k-mooney:matrix.orgthe problem was i am trying to test the collection18:02
@sean-k-mooney:matrix.orgas in the collection is part of the git repo where the job is being defied18:02
@sean-k-mooney:matrix.organd im trying to test one of the roles in the collection18:03
@sean-k-mooney:matrix.organd that role just happens to use one of the other roles18:03
@sean-k-mooney:matrix.orgso i dont actully want to pull it form galazy18:03
@fungicide:matrix.orgyou could likely do that with a nested ansible job18:03
@sean-k-mooney:matrix.orgyep18:03
@sean-k-mooney:matrix.orgthat the current workaround in at least one of the repos18:03
@sean-k-mooney:matrix.orgthats what im going to try ill create a python venv, install ansible and then galazy install the zuul cloned repo18:04
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 888627: Add AWS Kinesis support https://review.opendev.org/c/zuul/zuul/+/88862718:04
@fungicide:matrix.orgthat also gives you the option of testing changes to your collection with versions of ansible and python which aren't supported on the zuul executor itself18:04
@sean-k-mooney:matrix.orgyep it just feels wrong to run ansible in ansible but its better then not testing it18:05
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/nodepool] 889649: Add missing aws mock cleanup https://review.opendev.org/c/zuul/nodepool/+/88964918:06
@jim:acmegating.comhonestly, if the goal is to test a general purpose ansible collection, i think what you're doing/will do is still the right way, even if this feature were implemented in zuul.  for more or less the reasons fungi just mentioned.  i think the [missing] feature in zuul would be better limited to just zuul-specific modules18:08
@sean-k-mooney:matrix.orgthis is the acual failure i got https://review.rdoproject.org/zuul/build/6a6fde97aeff4ee7bf09dcd29c17b7b8/log/job-output.txt#116718:08
@sean-k-mooney:matrix.orgso it ran my role until i tried to use a role form the collection by fully qulaifed name18:09
@sean-k-mooney:matrix.orgif i dont fully qulify it it will likely work18:09
@sean-k-mooney:matrix.orgbut then im execting it to fail because the plugin is not insalled on the zuul executor18:09
@sean-k-mooney:matrix.orgthat what happens if i dont fully qualify in molecule18:10
@sean-k-mooney:matrix.orgso ya im just going to ansible in ansible for now18:10
@fungicide:matrix.orgit's turtles all the way down18:11
@sean-k-mooney:matrix.orgi mean im testing a role to deploy libvirt as part of deploying openstack on openshift and rhel (vai ansibel) on a ci system that uses openstack to create vms which then use ansible to run the job18:13
@sean-k-mooney:matrix.orgso yep18:13
@fungicide:matrix.orgthat's a lot of turtles indeed18:14
@sean-k-mooney:matrix.orgim just sad that the job was almost 18:14
@sean-k-mooney:matrix.org pre-run:18:14
- roles/edpm_libvirt/molecule/default/prepare.yml
- roles/edpm_libvirt/molecule/default/converge.yml
run:
- roles/edpm_libvirt/molecule/default/verify.yml
@sean-k-mooney:matrix.orgi really like it when zuul josb are written so you can repoduce them eaisly locally18:15
@sean-k-mooney:matrix.orgwhich is why i started with molecule and then was trying to reuse that directly in the zull job18:16
@sean-k-mooney:matrix.organyway im going to call it  a day. thanks again for confirming that ansible in ansibel is proably the best approch18:16
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/nodepool] 887907: Use low-level OpenStack SDK calls for server listing https://review.opendev.org/c/zuul/nodepool/+/88790718:29
@mfeder:matrix.orghello folks, could you please explain what the `current-patchset` option means in the context of Github?19:33
- https://zuul-ci.org/docs/zuul/latest/drivers/github.html#attr-pipeline.require.%3Cgithub%20source%3E.current-patchset
- an example would be helpful thx
@mfeder:matrix.org * hello folks, could you please explain what the `current-patchset` option means in the context of Github? what is the `item` mentioned in the docs? 19:34
- https://zuul-ci.org/docs/zuul/latest/drivers/github.html#attr-pipeline.require.%3Cgithub%20source%3E.current-patchset
- an example would be helpful thx
@jim:acmegating.commfeder: the item is referring to the pull request in that case.  most likely relevent if zuul is processing an event that is related to an earlier version of the pr (ie, the commit pointer has been updated since then).19:37

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