Wednesday, 2020-12-30

*** tosky has quit IRC00:34
*** holser has quit IRC00:39
*** zenkuro has quit IRC02:00
*** bhavikdbavishi has joined #zuul02:34
*** bhavikdbavishi has quit IRC03:00
*** bhavikdbavishi has joined #zuul03:06
*** rfolco has quit IRC03:08
*** bhavikdbavishi has quit IRC03:57
*** bhavikdbavishi has joined #zuul03:57
*** bhavikdbavishi has quit IRC04:04
*** bhavikdbavishi has joined #zuul04:07
*** bhavikdbavishi1 has joined #zuul04:10
*** bhavikdbavishi has quit IRC04:12
*** bhavikdbavishi1 is now known as bhavikdbavishi04:12
*** bhavikdbavishi has quit IRC04:15
*** bhavikdbavishi has joined #zuul04:16
*** bhavikdbavishi has quit IRC04:20
*** bhavikdbavishi has joined #zuul04:21
*** ikhan has joined #zuul04:27
*** bhavikdbavishi has quit IRC04:34
*** bhavikdbavishi has joined #zuul04:35
*** evrardjp has quit IRC05:33
*** evrardjp has joined #zuul05:33
*** bhavikdbavishi has quit IRC05:42
*** ykarel has joined #zuul05:49
*** bhavikdbavishi has joined #zuul06:11
*** bhavikdbavishi1 has joined #zuul06:14
*** bhavikdbavishi has quit IRC06:16
*** bhavikdbavishi1 is now known as bhavikdbavishi06:16
*** ikhan has quit IRC06:27
*** bhavikdbavishi has quit IRC06:42
*** ikhan has joined #zuul07:05
*** ikhan has quit IRC07:10
*** ikhan has joined #zuul07:16
*** ikhan has quit IRC07:21
*** ykarel_ has joined #zuul07:34
*** ykarel has quit IRC07:37
*** ykarel_ is now known as ykarel07:52
*** ikhan has joined #zuul08:03
*** ikhan has quit IRC09:20
*** holser has joined #zuul09:55
*** ikhan has joined #zuul10:01
*** holser has quit IRC10:35
*** holser has joined #zuul10:46
*** holser has quit IRC10:47
*** holser_ has joined #zuul10:47
*** sshnaidm|afk is now known as sshnaidm|rover10:48
*** holser_ has quit IRC11:04
*** ikhan has quit IRC11:22
*** tosky has joined #zuul11:37
*** zenkuro has joined #zuul12:14
*** ikhan has joined #zuul12:18
*** ikhan has quit IRC12:22
*** rfolco has joined #zuul12:30
*** ikhan has joined #zuul12:56
*** bhavikdbavishi has joined #zuul13:07
*** sassyn has joined #zuul13:12
sassynHi All13:12
sassynI have a quick question regarding job.dependencies13:12
*** iurygregory has quit IRC13:13
sassynAssume the following - I have a job name JobX. So when a commit comes in to repo RepoX JobX start to kicks in and run13:13
sassynwhen JobX is finished I want to run a JobY13:14
sassynI guess this can be done via the post run option13:14
sassynNow consider this: When commit comes into RepoY a job Y kicks in. However I want to define that JobY need to run first JobX13:15
sassynI gues I can do it via pre run option13:15
sassynhowever I'm having trouble to understand what is the job.parent used for?13:19
*** bhavikdbavishi has quit IRC13:21
sassynand what is the diff within job.requires/provide to dependencies?13:26
sassynin any way I thinking of it I get into a loop. Cause if JobX run and then have a post run to run JobY all good. but if JobY need to run and run first JobX (which will run jobY) I ended with running (JobX+JobY)-+JobY13:32
fungijob.parent is for inheriting configuration from another job; job dependencies are a direct way of saying that one job needs to wait until another job runs; provides/requires is a more flexible alternative to job dependencies where you could have a variety of different jobs which provide the same thing and it allows you to make a job wait on that rather than waiting on some specific job to finish14:02
sassynHi fungi14:05
sassynwhen u are saying job.parent is for inheriting configuration from another job what does it really mean? it mean that I inheriting  the playbook as well?14:06
sassynor just the configuration14:07
sassynthings like     semaphore;     nodeset;       nodes;    timeout: 3600;     post-timeout: 3600;     attempts:14:08
sassynOk I see in the docs now that inherits is everything I miss that14:10
sassynso in jobB inherits JobA why is the different when using  JobB dependence on JobA?14:11
sassynwhat* not hwy*14:11
sassynwhy*14:11
*** ikhan has quit IRC14:21
fungiif jobB declares jobA is its parent, then the build will be like running jobA except with the differences you've overridden in jobB14:34
fungiif jobB depends on jobA, then you have two separate builds: first a build of jobA runs, then after that gets a result a build of jobB can run14:35
fungijob.parent is used in defining the details of a job (for example if you have several jobs which are almost the same but with slight differences you don't have to redefine the common parts in each one), dependencies are used to define relationships between separate jobs14:36
*** bhavikdbavishi has joined #zuul14:55
*** zenkuro has quit IRC15:09
*** zenkuro has joined #zuul15:09
*** ikhan has joined #zuul15:10
*** bhavikdbavishi has quit IRC15:31
*** ikhan has quit IRC15:33
sassynthank u fungi.15:39
*** ykarel has quit IRC15:41
sassynSo consider the following: RepoX define to run JobX.  so when commit comes in to RepoX - JobX start and once finish it call to JobY [ JobX compile a code, JobY test the code). When a commit come to Repo Y ( the test code was changed) we need to run JobX and after JobY... how can I make it so without getting in a loop15:44
*** noonedeadpunk_ is now known as noonedeadpunk16:01
fungijob dependencies are declared where you run the jobs, not as part of the job definitions, so you just specify them in the project-pipeline for each project where you list them to run16:19
sassynI read all the docs. I would love to get help. I can't think of a way of doing this without getting into loop16:19
* fungi looks up an example16:20
sassynBut if I set JobY as depend of JobX - when Job Y will run Job X will first run and then JobY16:21
sassynBut if I set in Job X that Job Y is a post -job I will get a state if JobX + JobY + JobY16:21
sassynI want to get into a state when I commit to repoX jobX is run and then JobY, JobZ .... are running in parallel to check the code.16:22
fungiwhen you add jobs to the project-pipeline for repoX you tell it to run jobX and then jobY by saying that in that project-pipeline jobY requires jobX.16:22
fungiwhen you add jobs to the project-pipeline for repoY you tell it to run jobY and then jobX by saying that in that project-pipeline jobX requires jobY.16:23
sassynIf however I commit to RepoY I want to run first JobX and then JobY only.16:23
fungihere's an example in nodepool's check project-pipeline: https://opendev.org/zuul/nodepool/src/branch/master/.zuul.yaml#L375-L37716:24
fungiso if a change is proposed for nodepool, then it runs zuul-quick-start only after running nodepool-build-image and some job providing zuul-container-image16:26
*** ikhan has joined #zuul16:26
sassynI'm checking thank u16:26
fungibut that's specific to changes proposed for nodepool. those same job dependencies and requirements could be rearranged in zuul-client's check project-pipeline if we wanted16:26
fungibasically the requirements and dependencies for jobs run when proposing a change for repoX don't have to be the same as for changes to repoY, they're set independently for each repo16:28
fungithat's how you avoid cycles16:28
sassynI'm trying to understand it...16:28
fungihere's a corresponding example from zuul's check project-pipeline: https://opendev.org/zuul/zuul/src/branch/master/.zuul.yaml#L262-L26416:31
fungiyou'll see the requires and dependencies are slightly different16:32
fungiso same job run in check for changes to nodepool and zuul repos, but with different requires and dependencies in each one16:32
sassynI think I understand16:36
sassynu declarer the setting in the job pipeline and not in the job itself...16:36
sassynSo JobX have dependencies  and requires  of it's own....16:37
sassynand JobY have requires and dependencies   of it's own16:37
*** bhavikdbavishi has joined #zuul16:40
*** iurygregory has joined #zuul16:41
fungiyep16:50
sassynOK16:52
fungito be clear, it's project-pipelines (not sure what a job pipeline is)16:53
sassynYes That's what I meant16:53
sassynbut provide can't be on project-pipelines16:53
fungiand i was saying that jobX and jobY can have different requires and dependencies in the repoX project-pipeline compared to in the repoY project-pipeline16:53
sassynunderstand!16:54
*** hamalq has joined #zuul16:54
sassynmy last question is if RepoX have JobY and JobZ and JobM etc... can all run in parallel ?16:54
sassynSo once RepoX is finished (code was compiles) all test starting16:55
fungiyes, normally builds run in parallel (so long as you have enough node resources to run them all), unless you declare requires/dependencies16:57
fungiand then it will still run the jobs it can in parallel as long as they're not waiting on results from another job which hasn't finished16:58
sassynOK, let me try16:59
*** hamalq has quit IRC16:59
sassynTODA (thank u in hebrew)16:59
*** hamalq has joined #zuul17:00
sassynLast question :-)  If I may fungi17:01
fungiyou're welcome!17:01
fungisure, ask17:01
sassynI set in the pipleine JobX and then JobY under the project pipeline of project X. JobY is set to  require JobX (where in the jobX i put the provide: JobX). This makes JobX run first and only when it finish JobY will start. If I put JobZ as well do I need to put require as well?17:06
sassyndoes this mean JobX will run twise?17:08
sassynsee here https://pastebin.com/s6tns0MS17:12
sassyn?17:29
sassynCan I somehow update the document?17:29
sassynIt might help others as well17:30
fungiis there any relationship between jobZ and jobX or jobY? if not, then jobX and jobZ will start at roughly the same time, but jobY will still wait for jobX to complete before starting17:31
fungiif jobY and jobZ both declare dependencies on jobX, then jobX will run by itself, and both jobY and jobZ will start at roughly the same time once jobX completes17:33
*** bhavikdbavishi has quit IRC17:33
fungialso which document are you asking about updating? all of zuul's documentation is in the zuul git repository, under doc/source17:34
sassynOK17:35
sassynI will check them out maybe it is better to say about the job pipeline in the doc17:35
sassynI understand what u are saying. but if I put   JobY:17:36
sassynThe last thing I need to understand now is How to I pass ansible VARs from jobX to JobY....17:37
fungiyou can zuul-return values from a build when it completes, and reference those in a depending job17:47
fungisassyn: https://zuul-ci.org/docs/zuul/reference/jobs.html#return-values17:48
fungiseems like that does exactly what you're asking for17:49
sassynWhat about set_fact with cacheable17:50
fungii think setting/caching facts only works within a build, not between multiple builds, but someone else would have to confirm17:52
clarkbfungi: sassyn yes that is the case since each build runs in a throwaway env17:53
clarkbthat means facts set in pre run can persist through to post run if set to cacheable but then they are discarded17:53
sassynlet's give it a try17:54
fungigot it, so cached facts work between playbooks in the same build, but not from one build to another. for that you need zuul_return to have one build set variables which you reference in playbooks for a depending build17:54
clarkbfungi: yup17:55
*** hamalq has quit IRC18:04
sassynclarkb it is not working in my case ..... in the pipeline there is JobX and then JobY - JobX as set facts a var name FS with cacheable, but JobY get an error that it doesn't know what it is.18:12
sassynwhat I'm missing?18:12
clarkbsassyn: jobX and jobY are different builds so the facts don't cross between them18:12
sassynunderstand.18:12
sassynso only pre/post18:13
clarkbno, within one build18:13
clarkb(a build is a running instance of a job)18:13
clarkbJobX and JobY will have different builds as they are distnct18:13
clarkbto pass between builds you need to use zuul_return18:14
sassynSo if JobX have a pre run and post run then it will work with cacheable?18:15
sassynbit not with JobX and JobY18:15
sassynbut*18:15
clarkbyes jobX runs in envX and jobY runs in envY. The fact caches for each build are per env18:15
sassynOK18:16
sassynThank u very much!18:16
fungisassyn: like we said before, if you want to pass values between build (that is, between runs of different jobs) use zuul_return18:20
*** ikhan has quit IRC18:25
*** holser has joined #zuul18:28
*** holser has quit IRC18:34
*** holser_ has joined #zuul18:34
*** mgoddard has joined #zuul18:43
*** ikhan has joined #zuul18:45
*** holser_ has quit IRC19:11
*** holser has joined #zuul19:11
*** holser has quit IRC19:14
*** holser_ has joined #zuul19:14
*** ikhan has quit IRC19:14
sassynfungi thank u19:15
sassynonce I have setup in the JobX the follwing:19:15
*** ikhan has joined #zuul19:16
sassynhttps://pastebin.pl/view/050fd70119:16
sassynHow do I use it in the JobY ansible?19:16
sassynby using zuul.trigger_build_number?19:16
sassynfor example19:16
*** ikhan has quit IRC19:17
clarkbsassyn: https://zuul-ci.org/docs/zuul/reference/jobs.html#return-values "Any values other than those in the zuul hierarchy will be supplied as Ansible variables to dependent jobs. These variables have less precedence than any other type of variable in Zuul, so be sure their names are not shared by any job variables."19:17
sassynso just call the name as is?19:18
clarkbyup I think so19:18
*** paladox has quit IRC19:19
sassynNo it is not working19:21
sassynThe task includes an option with an undefined variable. The error was: 'mount_jenkins' is undefined19:21
sassynEven if I have mount_jenkins set in the zuul_return:19:23
sassynfor example here https://pastebin.pl/view/050fd70119:24
sassynfungi maybe u know?19:24
clarkbcan you check the job's inventory? also is jobY set up to run after jobX as a dependent job?19:25
sassynJobY is requires of JobX19:28
*** paladox has joined #zuul19:34
clarkbso jobX provides foo and jobY requires foo?19:36
clarkbthat should be sufficient. I would still double check the inventory to ensure that the variable pathing is correct19:37
sassynhttps://pastebin.pl/view/941cf4ca19:41
fungiyes, if your variable is returned by jobX then it should appear in the inventory for jobY19:41
sassynhere it is the inventory.yaml19:42
sassynfor JOBY19:42
clarkbI agree none of the jenkins stuff seems to be in there19:49
fungithis is an example of where we use zuul_return in the zuul-jobs repo to pass buildset registry connection/credentials info to other builds: https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/buildset-artifacts-location/tasks/main.yaml#L8-L1519:53
fungier, buildset artifact locations i mean19:54
* fungi had multiple examples up19:55
sassynmaybe   delegate_to: localhost19:55
sassynis the key? to make it work?19:55
sassynso it will run on the executor and not on the node pool?19:57
fungishouldn't matter, here's the buildset registry example: https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/run-buildset-registry/tasks/main.yaml#L69-L7219:59
fungidoesn't delegate_to19:59
sassynOK20:01
sassynWill try again now20:01
sassynit is not working :-(20:15
*** ikhan has joined #zuul20:16
*** ikhan has quit IRC20:21
fungihere's an example inventory from a recent build result: https://zuul.opendev.org/t/zuul/build/92e660bb272f4ad896bda525ea88389f/log/zuul-info/inventory.yaml#2420:24
fungithat's showing the buildset_registry returned from another job appearing in the inventory20:32
sassynthansk20:32
sassyntahnk u20:32
fungiso it's working for us20:32
sassynyes20:33
sassynbut not for me :-(20:33
sassynhttps://pastebin.com/pefJZUEm20:34
sassynthis is what I have in the repoX20:34
sassynin the .zuul.yaml file20:34
sassynand this is the jobs https://pastebin.com/R7UVkctw20:36
sassynwhat do I miss?20:42
sassynI'm lost :-(20:50
*** rfolco has quit IRC20:51
sassynmaybe the requires not working right?20:52
*** rfolco has joined #zuul20:52
*** rfolco has quit IRC20:54
*** rfolco has joined #zuul20:54
*** akrpan-pure has joined #zuul20:56
akrpan-pureDoes anyone know where I could find documentation over how nodepool elements work? Like what directory structure a new element should be in?20:56
akrpan-pureOpe nvm, my bad, forgot that elements came from diskimage-builder20:57
akrpan-pureFound https://docs.openstack.org/diskimage-builder/latest/developer/developing_elements.html20:57
*** rfolco has quit IRC20:59
sassynping clarkb fungi21:07
*** holser_ has quit IRC21:09
*** holser has joined #zuul21:12
sassynI put everything here: https://pastebin.com/6DZNbiUL21:12
sassynmaybe please u can take a look?21:13
clarkbsassyn: your provides and requires don't match up properly21:34
clarkbj vs J21:34
clarkbwhether that is a transcription issue or an actual issue I can't say21:34
sassynclarkb what do u mean?21:43
sassynj vs J?21:43
sassynhmm i see21:44
sassynlet me fix21:44
clarkbrequires: JobX and provides: jobX21:44
clarkbthey need to match, that key is used to pair things up21:44
sassynit just a typo in the pastebin21:45
sassyncause in real life i have different jobs names... due to security I change to a fake one21:45
sassynin real life it is good21:45
clarkbright but that is all I have to go off of :) so I'm just correcting what I see is wrong21:45
clarkbotherwise that looks about right to me.21:46
sassynbut it still doesn't work :-(21:46
sassynif u think the logical is good... besides the upper case lower case issue in pastebin21:46
sassynthank u21:53
sassynmaybe fungi can think about some thing else?21:53
clarkbyou might try inspecting your executor logs for zuul jobx to see if the zuul return is processed21:53
clarkband then trace it from there21:53
sassynnothing on the logs all seems good22:11
sassynHELP! :(22:12
sassynI'm running in debug mode so I have good logs22:12
clarkbyou should haev logs for the zuul return itself right? to see that it runs properly?22:14
sassynin the executor ?22:15
clarkbyes22:15
sassynwhat should I grep in the file?22:16
sassyni see some error like this: ges/ara/plugins/actions/ara_read.py) as it seems to be invalid: module'22:20
clarkbI think that one is expected22:21
clarkbif you grep the build uuid you will get all the logs associated to that build22:21
sassynreally thank you for the time and help22:23
sassyni restarted the executor and clean up the logs22:23
sassynand re run22:23
sassynlogs seems Ok22:29
sassynin the web interface22:29
sassynI can see that the ansible of Job X completed with no errors.22:29
clarkbthe other thing to try is to make an explicit dependency rather than using provides and requires22:29
clarkbhttps://zuul-ci.org/docs/zuul/reference/job_def.html#attr-job.dependencies possible that is required for the zuul_return?22:30
sassyntrying with job.dependencies22:42
sassynclarkb this was working!22:52
*** hamalq has joined #zuul23:09
*** hamalq has quit IRC23:13
fungisassyn: awesome, so sounds like "requires" doesn't pull in zuul_return values like "dependencies" does? in that case, might be something we want to fix for better parity between the two mechanisms23:17
sassynyes23:18
sassynagree23:18
sassynthank u23:18
*** hamalq has joined #zuul23:25
*** hamalq has quit IRC23:29
*** holser has quit IRC23:30
fungisassyn: i've filed https://storyboard.openstack.org/#!/story/2008389 ( so we don't forget23:30
fungi"Support job.requires with zuul_return module"23:30

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