Tuesday, 2024-07-30

*** bauzas_ is now known as bauzas01:33
*** bauzas_ is now known as bauzas08:14
*** bauzas_ is now known as bauzas10:52
dansmithclarkb: fungi: can you point me at an example job with a publish-to-static.o.o example or otherwise help me with that fu?13:53
dansmithalso, my job currently doesn't collect these images as artifacts, intentionally, because I figure it's best not to store them on logs.o.o for no reason.. let me know if that's misguided13:54
fungidansmith: generic documentation building/publication jobs are an example, but maybe not conveniently encapsulated due to having a lot of layers of inheritance, i'll see if i can find you something more concise13:59
dansmithfungi: are the docs. and static. the same procedure?14:00
dansmithI had the docs ones open so I could go look at those14:00
fungiyes, identical14:00
dansmithI also, I dunno, guessed that I needed some admin intervention? :)14:00
fungias for temporarily collecting the built images as artifacts for upload to swift, zuul doesn't have its own temporary storage so swift is where we make that happen. things are uploaded with an expiration set so they get auto-deleted after 30 days anyway and it's not like this job is going to run all that often once you're done ironing out the specifics14:01
dansmithI meant collecting logs so they show up on logs.o.o14:01
dansmithpersonally, I see no reason to store them like that and that's kinda the whole point of the scripting, but it was asked in review :)14:02
fungilogs.o.o isn't a thing any more. zuul uploads logs and artifacts to swift, along with a manifest telling it which should be treated as what (log files, artifacts...)14:02
dansmithoh14:03
fungiwhen you use zuul's webui to browse/view logs or artifacts, they're just served to you directly from swift (potentially with some client-side rendering applied)14:03
dansmithI see now14:03
fungihaving the temporary copy in swift and then the final copy synced into afs is somewhat duplicative, but the copies in swift expire and are automatically reaped so it's not a big deal14:04
dansmithokay14:05
fungithe gate job which produces your image and the promote job which "publishes" (pulls from swift and pushes into afs) are quite likely to run in completely separate clouds from different zuul executors so there's no better place to temporarily store them for async operation like that14:05
dansmithokay I'm a bit lost then, the gate job can't do the publish? I guess I need to see where these publish jobs are queued?14:07
fungianyway, back to the admin intervention part, some projects are already publishing non-tarball files like minimal server images and container images to the tarballs site, so we might just increase the quota on its volume if you want to serve these from a subdirectory there. if you want a totally different domain name or a top-level subdirectory on static.opendev.org we'd need to add a14:07
funginew volume for it, but that's also pretty easy14:07
dansmithstatic.o.o seems like the right thing (these aren't tarballs)14:08
dansmitheven though existing sins are being committed, but you tell me :)14:08
fungidansmith: the way the docs jobs work, as an example, is that the gate job builds the documentation and then creates a tarball of that file tree and archives it into swift along with the job logs and such. if the gate job succeeds and the change then merges, a promote pipeline job runs which gets the artifact url reference passed in by zuul, retrieves the tarball from swift, unpacks it,14:09
fungithen performs an rsync into afs14:09
dansmithokay, seems like that's going to require me to land stuff, then land the gate+publish job, and if it doesn't work, land more stuff to try again, yeah?14:10
dansmithlooking through the docs publish stuff I'm clearly going to have to spend some time studying this to grok14:11
fungithe utility of that approach is less obvious for documentation builds, but if you extend that same pattern to something where you might want to test the built artifacts in the gate, perhaps by a completely separate but dependent gate job, then that gives you the ability to perform acceptance testing on built artifacts and only publish if they're deemed safe and working14:11
fungialso, and importantly for us, it isolates the publication credential access completely from whatever code is running to do the building and testing14:12
fungiso we can have a very simple and completely locked-down job that just gets artifacts and publishes them somewhere without running arbitrary untrusted code in the same place14:13
dansmithsure, makes sense14:13
fungion the subject of using https://static.opendev.org/ as the url for other projects' jobs to access your sample images, if you look at that site it's basically just a raw view of the global /afs/openstack.org file tree (naming of our afs cell is openstack-specific because it pre-dates the existence of opendev and is hard to change). under that you'll see that docs.openstack.org has its14:18
fungiown "docs" top-level directory, again for historical reasons, but most other sites are inside the "project" directory14:18
dansmithokay so you're thinking project/tarballs.opendev.org/openstack/os-test-images/ ?14:21
fungias an example, https://static.opendev.org/project/tarballs.opendev.org/openstack/heat-test-image/ is a.k.a. https://tarballs.opendev.org/openstack/heat-test-image/14:21
fungistatic.o.o is simply giving a higher-level view of the various web vhosts served from the same apache server14:22
dansmithyeah, understand.. feels wrong to have "tarballs" anywhere in the url for this, but I get it :)14:23
fungidevstack used to pull that for certain jobs, but i think it stopped a while back, don't remember how long ago. i expect we could clean that up. i think ipa was also publishing coreos images on the tarballs site14:23
fungikolla used to as well, but have switched to just depending on dockerhub leaving behind this breadcrumb now: https://tarballs.opendev.org/openstack/kolla/images/README.txt14:24
dansmithack, if there's some simpler targeted job I could look at to get my bearings that would be great14:25
dansmiththe docs stuff looks fairly complicated14:25
dansmithit is, at least, seemingly spread around a lot14:26
fungilooks like the akanda-appliance and astara-appliance directories also have qcow2 images in them, though those projects are dead now14:26
dansmithit's pretty tough to try to figure out how a job works, using the zuul.o.o/jobs as a map, but having to look all through all the various repos to stitch things together :/14:26
fungiand yeah, i'm looking for a better example than generic docs jobs14:27
dansmithtrove has a guest image publish job14:27
dansmithhttps://github.com/openstack/trove/blob/master/zuul.d/jobs.yaml#L41314:29
fungiah, yeah that's probably a good one. and they've had it working as recently as today: https://tarballs.opendev.org/openstack/trove/images/14:29
dansmithI don't see how the publish and build jobs are connected though14:30
fungitrove-master-guest-ubuntu-jammy.qcow2 there is from today14:30
clarkbironic's ipa images are published to static too iirc14:30
fungiyeah, i mentioned ipa a little bit back... magnum and manila are also doing it14:30
fungii'm just basically running `find /afs/openstack.org/project14:31
fungi/tarballs.opendev.org/openstack/ -type f -name "*.qcow2*"`14:31
fungion my workstation14:31
dansmithhmm, do they build in check and publish in periodic?14:31
fungii should probably rerun with -mtime -7 or something14:31
fungidansmith: some of them may be doing periodic builds instead of from the gate, which is why i'm still hunting14:32
fungiand some are doing it from tags14:32
fungiproblem is a lot of these are from back before zuul had artifact handling and so are (re)doing all their building post-merge either from tags or in post pipeline or periodic, because those were the only options at the time and they've never been revisited since there's little interest in changing if they're not broken14:36
fungiso we probably don't have any examples specifically of a promote job publishing artifacts to the tarballs site, all the examples i have are for web content (docs, governance, security...)14:39
fungiin theory they could differ just in the target publication path they specify14:40
dansmithyeah doesn't matter what they're publishing right?14:40
fungiright, if you're looking at https://zuul.opendev.org/t/openstack/builds?project=openstack%2Fossa&skip=0 it's just running openstack-tox-docs in gate which creates an artifact called "Docs archive" that's just a docs-html.tar.gz made by tarring up the contents of docs/build/html, then the promote-security job in the promote pipeline fetches that artifact, extracts it and publishes it14:45
fungiparented on the promote-tox-docs-site-base job (defined in openstack/project-config) but with "publish_site":"security.openstack.org" as an override14:45
dansmithokay I'm not sure how that helps me, unless you're suggesting that I pre-create a directory structure under a fake docs archive that looks like what should be laid out under tarballs/ so that when it gets extracted it goes into the right place?14:52
fungidon't take this as me suggesting anything yet, i'm still thinking through what the options look like and what bits of existing job definitions you'd splice together to get it14:54
dansmithI went down this path thinking it was going to be a relatively easy path to get these into place, but maybe the best thing is to just commit them to the tree and move on?14:54
dansmithokay14:54
fungii think the promote job for this could specify the afs_tarballs_opendev_org secret but publish_site: "tarballs.opendev.org" and afs_subpath: "{{zuul.project.name}}"14:59
fungiwe'd probably also need to set final: true for safety reasons (so other jobs can't parent to it and change the subpath themselves)15:02
dansmithokay and how does the promote job get linked with a gate job so it knows to run?15:02
fungiand could additionally scope it to just the images project with the allowed-projects list15:03
fungiset the download_artifact_job value to the name of the gate job15:04
dansmithoh, I saw that but I didn't think that was the linkage15:04
dansmithfungi: I'm sorry this is so laborious, but.. this went through gate and didn't merge or fail: https://review.opendev.org/c/openstack/os-test-images/+/92511416:09
dansmitham I missing something else? I'm getting the feeling I should have just put this on my personal github instead of making a huge federal case about it, so please accept my apologies16:10
dansmith...all I want is to have test images available for verification, but no good deed goes unpunished...16:10
clarkbdansmith: there are no gate jobs defined so it didn't do anything after you approved it (I think that action was a noop)16:11
clarkbdansmith: at the end of the file here: https://review.opendev.org/c/openstack/os-test-images/+/925114/11/.zuul.yaml you need to specify a job or jobs to run in the gate. Can just copy paste the check section and rename check to gate16:11
dansmithso it just needs a gate job and that will make it merge? I would have expected a fail I guess16:12
fungichanges without any jobs for a pipeline don't enqueue anything. this is so that, for example, if you don't have any jobs for the check-arm64 pipeline it doesn't emit a failure for that pipeline when you push a change16:13
clarkbyes it will merge if that job succeeds. You didn't get a failure because there was nothing run to fail. Zuul didn't know it needed to take any action16:13
dansmithokay, but it showed up in the gate queue.. I guess I don't understand the need to just run something in order to have it be merge-able, but will add16:15
opendevreviewMerged openstack/project-config master: Remove linaro cloud from Nodepool  https://review.opendev.org/c/openstack/project-config/+/92505016:16
dansmithI guess the first sentence here needs s/test job/test job in the gate queue/ https://docs.opendev.org/opendev/infra-manual/latest/creators.html#add-jobs-for-your-project16:17
fungidansmith: you can add the literal "noop" job in the gate pipeline if you want it to instantly run a job that does nothing but succeed16:18
fungiit's a built-in job that will just succeed and do nothing16:19
clarkbthe underlying reason you need to run a job to merge things is beacuse zuul is the only entity that can merge things. Zuul only merges things when they pass gate tests.16:22
dansmithwill templates: noop-jobs get you that for check and gate?16:22
clarkbyes16:23
opendevreviewJames Page proposed openstack/openstack-zuul-jobs master: openstack-charms: align to Ubuntu Pythons  https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/92527616:28
fungidansmith: noop-jobs is defined here, for reference: https://opendev.org/openstack/openstack-zuul-jobs/src/branch/master/zuul.d/project-templates.yaml#L18-L3116:43
fungiyou can see it includes the "noop" job i both the check and gate pipelines16:43
dansmithack, I obviously skipped that part of the doc because I wanted to have _some_ jobs run16:44
dansmithfungi: is this telling me that I'm going to have to define the promote job in project-config because of what you mentioned above about separating credentials from the jobs that do the building? https://review.opendev.org/c/openstack/os-test-images/+/92528817:04
fungidansmith: yes, the gate job can be defined in your project but the promote job will need to be in project-config where you see the other promote jobs17:37
*** bauzas_ is now known as bauzas20:11
opendevreviewClark Boylan proposed openstack/project-config master: Remove centos-8-stream image uploads and labels  https://review.opendev.org/c/openstack/project-config/+/92479021:02
opendevreviewClark Boylan proposed openstack/project-config master: Stop building centos 8 stream images  https://review.opendev.org/c/openstack/project-config/+/92479121:02
*** bauzas_ is now known as bauzas21:14
opendevreviewClark Boylan proposed openstack/project-config master: Set OpenDev and Zuul Zuul tenants to use ansible 9 by default  https://review.opendev.org/c/openstack/project-config/+/92530321:32
opendevreviewMerged openstack/project-config master: Remove centos-8-stream image uploads and labels  https://review.opendev.org/c/openstack/project-config/+/92479021:33
*** bauzas_ is now known as bauzas21:55
opendevreviewMerged openstack/project-config master: Stop building centos 8 stream images  https://review.opendev.org/c/openstack/project-config/+/92479122:46
*** bauzas_ is now known as bauzas23:07

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