Tuesday, 2023-12-19

@smashedpotato:matrix.orgHi. An absolute beginner question: I'd like to cut corners and have Zuul proceed from the check phase of a pipeline directly to the gating phase without the necessity of manual code review + upvote in between. Is there a way to achieve this? This because I'm currently working alone and have a huge pile of repos to combine. Gerrit may come into play later if I get more people to help me.12:58
@smashedpotato:matrix.org * Hi. An absolute beginner question: I'd like to cut corners and have Zuul proceed from the check phase of a pipeline directly to the gating phase without the necessity of manual code review + upvote in between. Is there a way to achieve this? This because I'm currently working alone and have a huge pile of repos to combine. Gerrit code reviews may come into play later if I get more people to help me.14:02
@fungicide:matrix.orgsmashedpotato: basically you want all proposed changes to merge if they pass testing? you could probably even get rid of the check pipeline entirely in that configuration, since it exists to provide information to reviewers so they can decide whether or not to approve something14:08
@smashedpotato:matrix.orgYes, merge if they pass testing.14:08
@fungicide:matrix.orgthe main place i'd caution you is if you add any sensitive data like credentials to a repository, someone proposing a change could alter the configuration to expose that data14:09
@fungicide:matrix.orgso you'll probably still want a manual review step for your base/config repo(s) before gating14:09
@fungicide:matrix.orgoh, or are you saying you also don't want to have to hook zuul up to a code review system at all? that might get harder, i don't think zuul has the capability currently to push commits with the git source driver14:11
@smashedpotato:matrix.orgGood point. Ideally, all passwords, credentials etc in the repos are for building, testing and integration only, so I don't see it as a big risk or problem. The production version would have its own ones outside versioning. 14:11
@fungicide:matrix.orgbut also without a code review system, i'm not sure where people would propose their changes14:11
@fungicide:matrix.orgi'm pretty sure you could achieve the automated propose->test->merge workflow you're asking for, but you'd still need a code review system (gerrit, gitlab, github, pagure...) for people to propose their changes into and for zuul to instruct that the change should merge14:13
@smashedpotato:matrix.orgYes, a code review system is redundant now that I'm alone but once there are more people, a review system is needed. A "review" for me now would be simply a decision that "now I have new code that could do" and then Zuul would build and test everything.14:14
@fungicide:matrix.orgi'd start out by taking the trigger configuration from an example check pipeline and the outcomes from a gate pipeline and combining them into a custom pipeline. the tricky part will be making sure that all the merge requirements are satisfied up front (i.e. by configuring gerrit not to require a code review or approval for the affected projects)14:16
@fungicide:matrix.orgothers in here may have additional suggestions though (or be aware of reasons this won't actually work the way i expect)14:18
@smashedpotato:matrix.orgThanks for your suggestions.14:19
@mhuin:matrix.orgWhat code review system are you using? since you want to implement immediate gating, there still needs to be a gate to speak of, ie a code review system14:31
@smashedpotato:matrix.orgI use no review system at the moment, since there's is no need for it being a lone developer (for the time being).14:33
@smashedpotato:matrix.orgSo the whole issue for me as I can see it is, can I start off with Zuul without a code review system and then later incorporate one when needed?14:35
@fungicide:matrix.orgsmashedpotato: i can't think of any way to do that. to rephrase what i said earlier, where would you "propose" the changes you want zuul to test? right now zuul knows how to listen to events from a variety of code review systems to find out when changes have been proposed so it can start testing them14:43
@mhuin:matrix.orgyou can, there's a git driver, but there won't be any trigger that corresponds to a gating event14:43
@fungicide:matrix.orgwell, also as i mentioned before, i don't think the git source driver has the ability to push anything into a repository once gating completes14:43
@fungicide:matrix.orgit's basically read-only14:44
@clarkb:matrix.orgOne way to think about it is that Zuul is a type of code reviewer14:44
@smashedpotato:matrix.orgHmmm ... sorry, being unfamiliar with Zuul I may have some trouble formulating myself in proper terms. A "proposal" in my case could be committinq a suitably named git branch, where the name of the branch matches some predefined regexp. This would then ideally be enough to trigger a Zuul build and test.14:46
@fungicide:matrix.orghaving only one git branch for proposed changes would limit zuul to only being able to test one change at a time. zuul is designed for accurate scalable parallel testing14:47
@fungicide:matrix.organyway, i think you can accomplish the automation you want, but would need a code review system. the workflow would basically be 1. propose change to the code review system, 2. zuul sees the change you proposed and starts to run tests, 3. if tests succeed zuul tells the code review system to merge the change to the intended branch14:48
@smashedpotato:matrix.orgI know it may be overkill in the beginning but there's a number of git repos out of which the different sw components would be built. Having more committers later, the setting changes.14:50
@weebull:matrix.org> <@smashedpotato:matrix.org> I know it may be overkill in the beginning but there's a number of git repos out of which the different sw components would be built. Having more committers later, the setting changes.16:30
Do you have a place you push your branches to? A GitHub/gitlab/something else? If so, it would be a case of pushing the branch, creating a pull request to let Zuul know it should test that branch, and everything can go as you want. Zuul is your reviewer and it will put information in the PR if (for example) it fails.
@weebull:matrix.orgIf it passes, it merges and closes the PR. You can come back to any open PRs in the future. 16:31
@jim:acmegating.comsmashedpotato: the single-user workflow with gerrit is good.  you can set it up so you just `git push origin HEAD:refs/for/master` (or `git review`) and if it passes tests it will auto-merge, and if it doesn't, you have a nice listing of "open" changes that show you what you need to address.  the zuul quickstart tutorial will set up a gerrit; you can use that as a basis.  you can just run the gerrit server where ever you are running zuul.  for a single user, it's lightweight (single process, no extra dependencies).16:50
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 903911: Produce consistent merge commit shas https://review.opendev.org/c/zuul/zuul/+/90391117:26
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 904024: DNM: prng test https://review.opendev.org/c/zuul/zuul/+/90402417:45
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 904028: Remove file matcher special case for empty file list https://review.opendev.org/c/zuul/zuul/+/90402818:50
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 904030: Fix multi-scheduler timer unit test https://review.opendev.org/c/zuul/zuul/+/90403018:58
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed:19:05
- [zuul/zuul] 904030: Fix multi-scheduler timer unit test https://review.opendev.org/c/zuul/zuul/+/904030
- [zuul/zuul] 903911: Produce consistent merge commit shas https://review.opendev.org/c/zuul/zuul/+/903911
- [zuul/zuul] 904033: DNM: debug reproducible repo state https://review.opendev.org/c/zuul/zuul/+/904033
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 904033: DNM: debug reproducible repo state https://review.opendev.org/c/zuul/zuul/+/90403320:48
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 903911: Produce consistent merge commit shas https://review.opendev.org/c/zuul/zuul/+/90391121:38

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