Saturday, 2020-09-12

*** Goneri has quit IRC03:04
*** evrardjp has quit IRC04:33
*** evrardjp has joined #zuul04:33
*** bhavikdbavishi has joined #zuul05:54
*** bhavikdbavishi has quit IRC06:14
*** maxamillion has quit IRC07:24
*** evgenyl_ has quit IRC07:27
*** maxamillion has joined #zuul07:37
*** tosky has joined #zuul08:04
openstackgerritMatthieu Huin proposed zuul/zuul-client master: Fix empty package, missing requirement  https://review.opendev.org/75157609:35
openstackgerritMatthieu Huin proposed zuul/zuul master: Add zuul-client to requirements  https://review.opendev.org/75019609:36
*** zenkuro has joined #zuul10:18
*** sassyn has joined #zuul11:59
sassynhi all11:59
sassyncan someone tell me how to I increase the worker in gearman? for the  merger:cat                  ?12:00
sassynI have added a gir repo - and it took almost 5 hours to scan it.12:00
sassynwhat is  merger:cat      ?12:00
sassynthanks12:00
fungisassyn: "cat" is short for "concatenate" like the `cat` shell command... when zuul starts, it needs to find all of its job configuration, and since configs can be in any branch of any repository it attempts to speed up that operation by distributing the work across all the mergers. a cat job will be added to the gearman queue for each configured repository and the mergers will try to process those and return12:25
fungiany configuration they find back to the scheduler12:25
funginote that when you initially add a new repository, the merger processing its cat job will need to clone it and checkout all branches from the origin remote, so if it's an especially large repository that could take some time12:27
fungiif you have lots of repositories you can speed that up by running additional mergers so that more cat jobs can be handled in parallel12:30
fungibut if it's just one huge repository which takes a long time to clone and scan, the only workaround is probably to pre-clone it manually on your executors/mergers and checkout all the branches so that when you restart the delta will be much smaller12:31
fungithere are also ways to mark certain repositories in the tenant configuration so that zuul won't try to find configs in them, if you know you won't be using in-repository configuration for those12:34
fungiand some connection drivers are able to skip specific branches, for example if you only want protected branches checked for configs in github12:36
sassynThank you fungi13:59
sassynHow all is well at your side.13:59
sassynWe start to communicate -5 months ago when all of this corona started14:00
sassynand it still going on14:00
sassyn:-(14:00
fungithings are okay where i am. i just stay home. i live in a popular tourist area so it's better i just avoid everywhere14:01
fungicooking a lot, doing more vegetable gardening14:01
fungiare things okay for you?14:01
sassynI'm OK. working a lot also from home.14:02
sassynGain some weight14:02
sassynwhich is not good14:02
sassyncause there are days I almost not moving from house14:02
sassynstarted now to swim14:03
sassynI'm in TLV Israel14:03
sassynis there any tourist  going on?14:03
fungii use a non-powered lawn mower, so that's mostly the extent of my outdoor exercise14:03
sassynhmm14:03
sassynmy dream to have a yard14:04
fungioh, yes, everyone here seems to want to be at the beach since schools and many jobs are remote right now14:04
sassynthat's cool14:04
sassynwhere are u located if i May ask?14:04
sassynI don't remember14:04
fungia small island off the central atlantic coast of the usa14:04
sassynsounds cool14:04
sassynI have one more quick question. I have add an exciting gerrit repo into zuul. the repo have many branches and I got you answer about the merger:cat.  However in this repo I have create my own branch let's call it zuul-branch and create there the .zuul.d directory. I want only this branch to be in zuul. I guess this is possible.14:07
sassyn But when I did that other branches also started to be trigger. so maybe you could give me a tip?14:08
sassynexisting* gerrit repo...14:08
sassynthis is some repo we starting to move off the jenkins..14:09
fungii think we've previously discussed branch filters for config finding, but i don't recall where that conversation ended up. i'll see if i can find whether we added any feature for it or if there are any proposed patches to implement that14:09
sassynSo basically what you are saying is that not supported out of the box? I was thinking only the branches that have the zuul.yaml will be included in the zuul. I can see in the log files that once zuul starting up he goes over the un-trusted project14:11
sassynand looking for the .zuul.d zuu.yaml etc....14:11
sassynmy understanding that only this branch will take part in zuul14:11
fungibranches with no configuration inherit their configuration from the default branch, normally14:12
sassynthe default branch I assume is master. But in my setup I have repo X, with clean zuul configuration on the master branch, and a secound branch name zull-branch, where only in this branch I have the zuul.yaml config files.14:14
fungii believe zuul works out the default branch from whatever the remote sets as HEAD, which is often (but not always) named "master" yes14:17
sassynbut why zuul kick in when I push patches to the master branch14:18
sassynis it suppose to work like this?14:18
fungii don't entirely understand the question, but normally (unless you tell it otherwise) zuul watches for events for all your branches in every repository you tell it about14:19
fungitrusted config projects are handled a little differently, but for untrusted projects where you're allowed to do speculative testing of new job configuration, this is the applicable section of the docs: https://zuul-ci.org/docs/zuul/reference/tenants.html#attr-tenant.untrusted-projects14:20
fungi"...Zuul will read configuration files in all of their branches."14:21
fungias mentioned earlier, there's the "exclude-unprotected-branches" option for projects reached through a github connection, that allows you to have zuul skip looking for configuration in (and events for, i suppose) branches which aren't marked as "protected"14:22
fungibut that's a github-only feature, meant to deal with some github-specific challenges, so not applicable to gerrit14:23
sassynthank you for your patience and support here. I will try to  rephrase the question: I have a gerrit repo called Simpsons. Repo Simpsons have 10 branches. The HEAD is the master branch. All these branches have no zuul configuration (meaning no yaml files in the folder). Repo Simpsons is configure as untrusted  project. Now i have added a new branch.14:24
sassynWill call it branch "zuul-branch" where I add the .zuul.yaml file on it. I was expecting that only this branch will start to work and would be trigger with zuul.14:24
fungizuul will load the configuration you add in .zuul.yaml on zuul-branch and apply that configuration to any events specific to zuul-branch, but it will also check all the other branches to see if they contain zuul configuration, and if they don't then events for those branches will only trigger whatever behaviors you have configured globally (for example in your trusted config project)14:26
sassynOK not I understand.14:28
sassynGot u!14:28
sassynThanks you!14:28
sassynmay I ask what u where meaning here: "i think we've previously discussed branch filters for config finding, but i don't recall where that conversation ended up. i'll see if i can find whether we added any feature for it or if there are any proposed patches to implement that"14:29
sassynNOW I UNDERSTAND  :-)14:30
fungiyeah, at least once we've debated the possibility of an option to tell zuul to only look for configuration in specific branches of untrusted projects14:33
fungibut i don't remember whether we decided if that was a good idea. i'm not finding any current feature to allow it, nor do i see any pending changes in under review which might implement it14:34
fungithat's specific to the process of zuul looking for configuration to load, though. you can definitely already tell zuul to only trigger jobs on events for specific branches, you just can't currently tell it not to check specific branches for additional in-repository configuration in untrusted projects (or to only look in specific branches of untrusted projects for configuration)14:36
fungiyou can also tell zuul not to load configuration from the entirety of an untrusted project, or what kinds of configuration to use from an untrusted project14:37
fungijust not on a branch-by-branch basis14:37
sassyn you can definitely already tell zuul to only trigger jobs on events for specific branches - how ?14:43
sassynand also how to tell zuul not to load configuration from the entirety of an untrusted project,14:44
openstackgerritMerged zuul/zuul master: Correct visibility check in web JS  https://review.opendev.org/75142514:48
sassynyou can definitely already tell zuul to only trigger jobs on events for specific branches - you mean set the repo in the untrusted project, and then do in the pipeline the magic?  or u have better idea?14:53
fungiwhen you add projects to a tenant you can specify what kinds of configuration to load from them (jobs, roles, et cetera) and if you make that an empty list then you load no configuration at all from them15:19
fungisassyn: here's an example https://opendev.org/openstack/project-config/src/branch/master/zuul/main.yaml#L19-L3015:20
fungisassyn: as for only triggering jobs on events for specific branches, that's what branch filters do https://zuul-ci.org/docs/zuul/reference/job_def.html#attr-job.branches15:23
*** tosky has quit IRC15:37
sassynso in my case if I put on the job the branch: "zuul-branch"15:41
sassynthen the job will only run of there is triggers in that branch15:42
fungiyes, from the docs there, "If the project has more than one branch, the branch containing the job definition is used as an implied branch specifier."15:43
sassynother trigger might come to zuul, but since the job is limited to this branch only patch to this branch will run in the pipeline15:43
*** Goneri has joined #zuul15:43
sassynOK understand15:43
sassynagain thanks u15:43
fungiso the jobs configured in you hypothetical zuul-branch branch should only be triggered for events involving that branch and not other branches15:44
sassynperfect !15:44
fungiyou're welcome!15:44
sassynI will remove the base job I have in the trusted-projec15:45
fungiwell, you don't need to remove jobs from the trusted project as long as you don't configure anything to run them15:45
fungialso i think your base job has to be in a trusted config project15:46
sassynin the https://opendev.org/zuul/project-config/src/branch/master/zuul.d/pipelines.yaml line15:46
sassyn8615:46
fungiyou can just inherit from the base job in the jobs you define in your zuul-branch branch of the untrusted project, and not run the base job itself directly15:46
fungiyou can also prevent anyone from attempting to run the base job directly by setting it as an abstract job15:46
sassynWoW !15:47
sassynHow can u explain - not fair u know everything15:47
fungi(also note that you don't need to explicitly inherit from base, if a job doesn't specify a parent it automatically inherits base)15:47
sassyntenant.untrusted-projects.<project>.include if it's empty what does it mean. sorry I just can't understand it. it mean I don't load any config from the trust-project?16:01
sassynI can still load it from the project itself only?16:02
fungiif tenant.untrusted-projects.<project>.include is empty, then zuul can still trigger jobs for events involving those projects but it won't read any configuration from them16:03
sassynso only the config from the trusted project will be applied16:06
sassynright?16:06
sassynif tenant.untrusted-projects.<project>.include is empty16:07
fungicorrect16:13
sassynperfect !16:14
sassynthank u ! again16:14
fungiyou're welcome16:14
sassynwhen can I buy u a beer :-)16:14
sassynI have one more question if I may16:14
fungiappreciated, but i have plenty of beer already ;)16:14
sassynYou said: "well, you don't need to remove jobs from the trusted project as long as you don't configure anything to run them16:14
sassynhttps://pastebin.pl/view/845bd1a516:15
sassynthis is what I have16:15
fungiyes, not all jobs are run directly, some are only used to specify values which are inherited in other jobs (the base job is often treated this way, for example)16:15
sassynthan u said : you can just inherit from the base job in the jobs you define in your zuul-branch branch of the untrusted project, and not run the base job itself directly16:16
sassynSo I'm not sure I followed16:16
sassynhttps://pastebin.pl/view/aef5ca9b this is the zuul-branch  job16:17
fungithe base job in most deployments i'm familiar with isn't something you would ever actually run, it's typically treated as an abstract job (whether or not it is actually set to abstract), and serves as the parent job for any jobs which don't specify a parent16:17
fungiit serves as a place to put things you want included in every job in your system16:18
fungimaybe log collection and publishing, for example16:18
fungior ssh key cleanup16:18
sassynthis is what I have16:18
sassynhttps://pastebin.pl/view/845bd1a516:19
fungiyour testjob there inherits implicitly from your base job16:19
fungii need to step away for a few minutes, but i'll be back shortly16:19
sassynSure!16:20
sassynI think I got it. To summaries: Since I have on the tenant configuration the Simpsons repo configued as an untrusted-project, when zuul comes up zuul will search (mergre:cat) for the .zuul configuration on all branches.16:44
sassynthe trusted-project, and also if .zuul configuration exists will run the explict job (even if the event is not to this specific branch. In other words: if the .zuul file is in the zuul-branch of simpsons, but the commited was to a branch name lisa, the explict jobs will still run).16:44
sassynrun if the event was on this branch. the base jobs will still run for other events but will not include this explict job.16:44
sassynjob.abstract16:46
fungiactually only the default branch of trusted projects is checked for configuration, not all branches of a trusted config project (but most of the time people just don't branch their trusted config projects anyway)16:56
sassynnot sure about "If however I tell in the job the branch name, the explict job will  run if the event was on this branch. the base jobs will still run for other events but will not include this explict job." I think the explict job and the base jobs will run only when the event  is for that branch since there is inherited16:56
fungiit's untrusted projects (where zuul will allow configuration to be applied speculatively) that get all their branches checked for configuration16:57
funginormally the base job is not "run" for anything. you don't usually add your base job to any pipelines16:58
fungiit's just a convenient place for you to specify things you want all your other jobs to inherit16:58
sassyni understand until now.16:59
sassynbut if I don't apply job branch, what will happend? Zuul will trigger the base job that match the pipeline correct?17:01
sassynthere will be for all branches in the repo. and for the branch zuul-branch zuull will run the base jobs + the explicit one17:02
sassynsorry I'm driven you crazy. if it is too much I will try myself.17:03
sassynI just want to have a untrusted-project where only event from it run the job define and not any other event on the repo.17:04
sassynfor a specific branch17:04
sassynonly.17:05
fungizuul only runs jobs which you add to a pipeline17:10
fungiyou don't normally add the base job to any pipelines17:10
fungiyou can also prevent untrusted projects from adding the base job to their project-pipelines by setting it as an "abstract" job (one which is used exclusively for inheritance)17:10
fungiit might be useful to look at an example... here is the inheritance path from the build info for the "zuul-quick-start" job we run as a general integration exercise of changes for zuul: https://zuul.opendev.org/t/zuul/build/859d237e14414add967749c1f84e3a67/log/zuul-info/inventory.yaml#81-8517:11
sassynOK I will dig in and read more before asking stupid question17:15
sassynjust want to avoid the gate for my repo - only if it comes from the specific branch17:15
fungireading it from bottom to top, you can see that the job we ran for that build was requested by the addition of the job in the project definition here: https://zuul.opendev.org/t/zuul/build/859d237e14414add967749c1f84e3a67/log/zuul-info/inventory.yaml#81-85 (the line number it references is actually the start of the project definition)17:15
fungithe next line up in the inheritance path is for the job definition to which it referred: https://opendev.org/zuul/zuul/src/branch/master/.zuul.yaml#L11917:16
sassyninteresting17:17
sassynvery ! thank u again17:18
sassynI need to send u bottle of wine17:18
fungiyou can see that job declares opendev-buildset-registry-consumer as its parent, and indeed the next line up in the inheritance path points to https://opendev.org/opendev/base-jobs/src/branch/master/zuul.d/jobs.yaml#L22317:18
fungithat job definition does not specify any parent17:18
fungiand as you'll notice the next line up in the inheritance path (the top line) is for opendev's base job definition: https://opendev.org/opendev/base-jobs/src/branch/master/zuul.d/jobs.yaml#L2517:19
sassynI see17:20
fungiso that zuul-quick-start build inherited job configuration from its opendev-buildset-registry-consumer (declared as a parent) which in turn inherited from the unspecified "base" job17:20
fungizuul-quick-start is what we put in the gate pipeline though, we didn't directly run the base job17:20
sassynOK, so i need to set the trust-project base jobs as job.abstract17:21
sassynand then follow this17:21
fungiyou don't *have* to set it as abstract, but you can as an extra safety measure so that nobody can explicitly add it to a pipeline17:22
sassyni'm asking myself if this will give me what I need - cause as said I want to run the gate only if the event goes to a specific branch17:22
fungihowever, zuul will only ever run jobs which are added to a pipeline (either directly included in the project-pipeline within that untrusted project's default branch or the branch for the event which was triggered, or in a trusted config project pipeline listing that untrusted project), or indirectly by including a project-template which contains that job17:23
sassynthank u very very much again! really! I mean it! thank U. I will do my homework and probably will ping u again.  not sure I got it all. but you help allot!17:25
fungiif you add the job to a project-pipeline within a non-default branch, then it should only ever run from events for that branch (we call that an "implied branch matcher"). if you add it in a project-pipeline definition on that untrusted project's default branch, you can specify that you only want it to run on a particular branch (we call that an "explicit branch matcher" or just a "branch matcher")17:25
fungiyou can also add the job to the pipeline declaration for that untrusted project within a trusted config project and use an explicit branch matcher there too, just be aware that changes to things like that in your trusted config project are not run speculatively, for safety reasons, so will only take effect once they merge to the trusted config project17:26
sassyntoo much information17:28
fungiand you're welcome! i'm happy to answer questions when i can17:28
sassyn if you add the job to a project-pipeline within a non-default branch, then it should only ever run from events for that branch (we call that an "implied branch matcher"). if you add it in a project-pipeline definition on that untrusted project's default branch, you can specify that you only want it to run on a particular branch (we call that an17:28
sassyn"explicit branch matcher" or just a "branch matcher")17:28
sassynHOW?17:28
fungihttps://zuul-ci.org/docs/zuul/reference/job_def.html#attr-job.branches17:29
sassynI mean the gate will run always, only the job will run for the specific branch17:29
fungiyou can specify branch matchers in the job like that, *or*...17:29
fungiyou can do it in a job variant within a pipeline or project-pipeline definition, i'm looking for the right place in the docs for that now17:31
fungiahh, we don't call it out exactly but https://zuul-ci.org/docs/zuul/reference/project_def.html#attr-project.%3Cpipeline%3E.jobs does say "it may be a dictionary, in which case it is treated as a job variant local to this project and pipeline. In that case, the format of the dictionary is the same as the top level job definition. Any attributes set on the job here will override previous versions of the job."17:33
fungior to restate, you can override parts of job definitions within a variant where you're adding it to the pipeline, and that includes branch matchers, for example: https://opendev.org/openstack/project-config/src/branch/master/zuul.d/projects.yaml#L4117:35
sassynI follow you, but still something is missing.... I have a repo and the repo get events. it is config as  untrust project. the pipeline gets events and I understand that if I configure in the job the branch then this job will run only if the vent was on this branch. But still event not for this branch will get into zuul. and wil try to do the gate.17:42
sassynand this is what I to avoid17:42
clarkbif all of the jobs have branch matchers they will only run against thosebranches17:44
clarkbthis means the gate will not run for other branches17:44
sassynnow I understand! this was the missing thing17:44
sassynso just add the branch to the job.. and then the job will run only when event come from this branch. simple as that17:45
sassynif job run and pass - gate is done.17:46
clarkbyup17:48
sassynfungi and clarkb - u are my angel for this week. thank thank thank.17:53
sassynyou!!!!!17:53
fungimy pleasure!17:53
sassynhave a nice weekend!17:53
fungiyou too17:53
funginow i need to press out these pitas and get them into the oven to bake17:54
sassynI mean it when i say I will send u some wine!17:54
sassyn:-)17:54
sassynI was in master chef few years ago17:54
sassynI'm cooking very very good17:54
sassynif u ever come to IL17:54
sassynI will take u to nice places17:54
fungiit's a deal! there are (or at least were) some great tech conferences there i've never actually gotten to18:03
fungihopefully travel will eventually become less of a chore again18:08
*** sassyn has quit IRC18:10
*** rfolco has joined #zuul20:08
*** rfolco has quit IRC20:12
*** holser has quit IRC21:23
*** holser has joined #zuul21:25

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