Friday, 2022-10-07

@iwienand:matrix.org```ModuleNotFoundError: No module named 'opentelemetry'``` when running tox ... :/00:14
@iwienand:matrix.orgoh hang on, maybe it didn't actually get to installing that because yarn barfed00:16
-@gerrit:opendev.org- Zuul merged on behalf of lotorev vitaly: [zuul/zuul] 859152: Update link to zuul gating docs in reference pipeline https://review.opendev.org/c/zuul/zuul/+/85915201:58
-@gerrit:opendev.org- Ian Wienand proposed: [zuul/zuul] 860632: web/api: Reject unknown methods and consolidate CORS and request checking https://review.opendev.org/c/zuul/zuul/+/86063204:32
-@gerrit:opendev.org- Zuul merged on behalf of Ian Wienand: [zuul/zuul] 855107: web: console -- clarify package: comment https://review.opendev.org/c/zuul/zuul/+/85510704:35
-@gerrit:opendev.org- Ian Wienand proposed: [zuul/zuul] 860632: web/api: Reject unknown methods and consolidate CORS and request checking https://review.opendev.org/c/zuul/zuul/+/86063204:56
-@gerrit:opendev.org- Zuul merged on behalf of Simon Westphahl: [zuul/zuul] 860572: Store parent span context with span info https://review.opendev.org/c/zuul/zuul/+/86057207:56
-@gerrit:opendev.org- Simon Westphahl proposed on behalf of Tobias Henkel: [zuul/nodepool] 614079: WIP: Add request handler timer to stats https://review.opendev.org/c/zuul/nodepool/+/61407908:24
@sean-k-mooney:matrix.orgClark:  when i said podman i actully ment docker-compose with docker 08:34
@sean-k-mooney:matrix.orgthe docker-compose toutorial was broken in that the config proejct and users were not created in gerrit08:36
@sean-k-mooney:matrix.orghttps://opendev.org/zuul/zuul/src/branch/master/doc/source/examples/playbooks/setup.yaml#L29-L36 this does not seam t actually be enought to get past the first login screen08:38
-@gerrit:opendev.org- Zuul merged on behalf of Ian Wienand:11:40
- [zuul/zuul] 858245: web: Show failed tasks with light red background https://review.opendev.org/c/zuul/zuul/+/858245
- [zuul/zuul] 858246: web: Show failed tasks in red on task page https://review.opendev.org/c/zuul/zuul/+/858246
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/zuul] 860684: End node request span when result event is sent https://review.opendev.org/c/zuul/zuul/+/86068412:23
@jim:acmegating.comsean-k-mooney: the tutorial is tested on every change that merges in zuul, so maybe there's something in your local environment13:21
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/zuul] 860684: End node request span when result event is sent https://review.opendev.org/c/zuul/zuul/+/86068413:29
-@gerrit:opendev.org- Artem Goncharov proposed: [zuul/zuul] 859939: Implement Gitea driver https://review.opendev.org/c/zuul/zuul/+/85993914:29
-@gerrit:opendev.org- Artem Goncharov proposed: [zuul/zuul] 859940: Implement tests of the gitea driver https://review.opendev.org/c/zuul/zuul/+/85994014:29
-@gerrit:opendev.org- Artem Goncharov proposed: [zuul/zuul] 859939: Implement Gitea driver https://review.opendev.org/c/zuul/zuul/+/85993916:14
-@gerrit:opendev.org- Artem Goncharov proposed: [zuul/zuul] 859940: Implement tests of the gitea driver https://review.opendev.org/c/zuul/zuul/+/85994016:15
-@gerrit:opendev.org- Zuul merged on behalf of Ian Wienand: [zuul/zuul] 858247: web: Simply task status results https://review.opendev.org/c/zuul/zuul/+/85824717:41
@clarkb:matrix.orgI'm looking at zuul unittest jobs that were slow and timed out to see if anything stands out as problematic. I think the node we landed on was slow but in some ways that is good because it exaggerates runtimes. Anyway, I notice that when we run tox we seem to do react builds twice. The first one took 6 minutes in this example and the second about two minutes. I suspect the time delta represents time to download js packages. It has me wondering if building it twice is necessary and if anyone knows why that is18:59
@clarkb:matrix.orghttps://zuul.opendev.org/t/zuul/build/17c7c955a71f447987be3a4b9f7cfd90/log/job-output.txt#840 is what I'm looking at fwiw18:59
@clarkb:matrix.organother slow section is installing the ansible venvs for zuul. When we drop ansible 5 support we'll cut that in half. Something to keep in mind for the future as we add new ansible versions though19:01
@clarkb:matrix.orgit does look like something may be crashing though https://zuul.opendev.org/t/zuul/build/17c7c955a71f447987be3a4b9f7cfd90/log/job-output.txt#3142-314319:02
@clarkb:matrix.orgI'll look closer at the react builds after lunch as that may be a quick little improvement19:02
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 860749: Only run yarn build when necessary in tools/pip.sh https://review.opendev.org/c/zuul/zuul/+/86074920:39
@clarkb:matrix.orgThat should save a bit of time. For debugging why the test run didn't exit I've pulled the subunit file and it has 1349 tests recorded in it which is the same number of tests that ran under python3820:46
@clarkb:matrix.orgSomething is causing the test runner to not exit when testing is completed maybe?20:46
@clarkb:matrix.orgAnd the job console output agrees 1349 tests ran20:52
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 860753: Try zuul web builds with swc https://review.opendev.org/c/zuul/zuul/+/86075321:47
@clarkb:matrix.orgI have no idea if ^ is a good idea. But I ended up down a huge rabbit hole wondering why our react builds are so slow. It turns out that the internet blames Babel for this and suggest swc or esbuild. Both options appear available to us via CRACO plugins (also create-react-app works so well you don't really even realize its there if you are like me and a js noob)21:48
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 860753: Try zuul web builds with swc https://review.opendev.org/c/zuul/zuul/+/86075322:08
@clarkb:matrix.orgThis js packaging is not straightforward22:08
@clarkb:matrix.orgif I end up getting that working and it does speed up our builds a lot it would be good for someone that understands the implications and how to update package.json properly to take a look. This is mostly me trying to prove the assumption it can be faster but I have no idea how correct this is22:13
-@gerrit:opendev.org- Ian Wienand proposed: [zuul/zuul] 860632: web/api: Reject unknown methods and consolidate CORS and request checking https://review.opendev.org/c/zuul/zuul/+/86063222:19
@clarkb:matrix.orghrm looks like maybe I need newer react but patternfly doesn't do newer react?22:20
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 860753: Try zuul web builds with swc https://review.opendev.org/c/zuul/zuul/+/86075322:30
@michael_kelly_anet:matrix.orgFinally got back to my zuul playground to test things out and figure out a workable k8s deployment: had convert to using a static fileserver to upload logs but a bit stuck and wondering if I can get any pointers:22:35
- defined site_logs secret in jobs.yaml in my config repo, secret to my base job
- trying to consume it in the post-logs playbook, but the complaint I'm getting is that it can't find the variable in the job
@clarkb:matrix.org> <@michael_kelly_anet:matrix.org> Finally got back to my zuul playground to test things out and figure out a workable k8s deployment: had convert to using a static fileserver to upload logs but a bit stuck and wondering if I can get any pointers:22:37
> - defined site_logs secret in jobs.yaml in my config repo, secret to my base job
> - trying to consume it in the post-logs playbook, but the complaint I'm getting is that it can't find the variable in the job
You have to explicitly pass a secret to the job
@michael_kelly_anet:matrix.orgI am22:37
@michael_kelly_anet:matrix.org```22:37
secrets:
- name: site_logs
secret: logfile-host
pass-to-parent: true
```
@michael_kelly_anet:matrix.orgThis is in the base job22:37
@clarkb:matrix.orgyou should be able to refer to the variable using site_logs then.22:37
@michael_kelly_anet:matrix.orgYes, I realize that.22:38
@michael_kelly_anet:matrix.orgBut instead what I see in the executor log is:22:38
```
2022-10-07 22:07:32,035 DEBUG zuul.AnsibleJob.output: [e: eb66c3ae2bdf43149a806bde79a7cd76] [build: a60e1e4f812c4b9b9425a5484499cd17] Ansible output: b'fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ site_logs }}: \'site_logs\' is undefined\\n\\nThe error appears to be in \'/var/lib/zuul/builds/a60e1e4f812c4b9b9425a5484499cd17/trusted/project_1/opendev.org/zuul/zuul-jobs/roles/add-fileserver/tasks/main.yaml\': line 6, column 3, but may\\nbe elsewhere in the file depending on the exact syntax problem.\\n\\nThe offending line appears to be:\\n\\n\\n- name: Create SSH private key from secret\\n ^ here\\n"}'
```
@michael_kelly_anet:matrix.orgI was trying to find examples in the Zuul repos of this being used in practice, but nothing found in opendev.org :)22:40
@clarkb:matrix.orgThe users I know of use object storage typically. But I think the zuul quickstart setup uses the fileserver option22:41
@michael_kelly_anet:matrix.orgThe quickstart doesn't use add-fileserver because it's just copying files w/in a local mounted volume, iirc.22:42
@michael_kelly_anet:matrix.orgWhen I'd asked about this discrepancy previously I was suggested to setup a static fileserver. :)22:42
@michael_kelly_anet:matrix.orgWas poking at object storage last week, but turns out our k8s setup has some sadness w.r.t MinIO operator and I decided this should be easier!22:42
@clarkb:matrix.orgI would need more job and playbook context to see why the variable is undefined22:44
@clarkb:matrix.orgThis feels like a plumbing issue and not a fatal flaw with the role itself22:44
@michael_kelly_anet:matrix.orgDefinitely.  Let me pull this.. one sec22:44
@michael_kelly_anet:matrix.org```22:45
- job:
name: base
parent: null
description: |
The recommended base job.
All jobs ultimately inherit from this. It runs a pre-playbook
which copies all of the job's prepared git repos on to all of
the nodes in the nodeset.
It also sets a default timeout value (which may be overriden).
pre-run:
- playbooks/base/pre.yaml
post-run:
- playbooks/base/post-ssh.yaml
- playbooks/base/post-logs.yaml
roles:
- zuul: zuul/zuul-jobs
timeout: 1800
nodeset:
nodes:
- name: my-ubuntu
label: my-ubuntu
secrets:
- name: site_logs
secret: logfile-host
pass-to-parent: true
```
@michael_kelly_anet:matrix.orgThe secret (in the same source file as the base job):22:46
```
- secret:
name: logfile-host
data:
fqdn: zuul-log-server.zuul
path: /var/run/static
ssh_known_hosts: < some junk here >
ssh_username: zuul
ssh_private_key: !encrypted/pkcs1-oaep
- < private key junk here >
```
@michael_kelly_anet:matrix.orgfwiw, the base job is pretty much straight out of the example22:46
@michael_kelly_anet:matrix.orgAnd the post-logs playbook:22:46
```
- hosts: localhost
roles:
- role: add-fileserver
fileserver: site_logs
- hosts: "{{ site_logs.fqdn }}"
gather_facts: False
roles:
- generate-zuul-manifest
- role: upload-logs
zuul_log_url: "https://zuul-logs.dev.corp.arista.io/"
```
@michael_kelly_anet:matrix.orgThe actual job:22:47
```
- job:
name: build
run: playbooks/build.yaml
parent: base
nodeset:
nodes:
- name: builder
label: golang-1-17
```
@michael_kelly_anet:matrix.orgAny more context you need?22:47
@michael_kelly_anet:matrix.orgfyi, in the post-logs playbook the fileserver line was originally:22:48
```
fileserver: {{ site_logs }}
```
but it doesn't make any difference, same error
@michael_kelly_anet:matrix.org(and to be clear, this feels 100% like a plumbing and/or documentation issue, but it's unclear to me what the fail is precisely)22:49
@michael_kelly_anet:matrix.orgfyi, after I get a working soln with this I'll likely write it up... I expect a k8s example would help lots of folks22:51
@clarkb:matrix.orgI think the `fileserver: {{ site_logs }}` version is correct because we need to assign the value of the contents of that var to the role input var fileserver. However bceause this is yaml { has meaning and we may need to quote it to have `fileserver: "{{ site_logs }}"`22:52
@michael_kelly_anet:matrix.orger, sorry, I missed the quotes in my example, but pretty sure that's what I had before.  Let me try again..22:53
@clarkb:matrix.org(its possible ansible is automagically doing jinja there though I don't know all of the locations it does this, hbut this is the first thing I would try)22:53
@michael_kelly_anet:matrix.orgIs there a good/easy way to plumb -vvv through to ansible via the executor cli being used in the pod?  I see code in the executor that does this, but not 100% clear on how to leverage this22:54
@clarkb:matrix.org> <@michael_kelly_anet:matrix.org> Is there a good/easy way to plumb -vvv through to ansible via the executor cli being used in the pod?  I see code in the executor that does this, but not 100% clear on how to leverage this22:56
https://zuul-ci.org/docs/zuul/latest/operation.html#id5 you run the `zuul-executor verbose` command
@michael_kelly_anet:matrix.orgYep.  Same fail.22:56
@michael_kelly_anet:matrix.orgHmm.  I was a bit unclear as to how that works - do I just add `verbose` to the existing CLI invocation or do I run it separately in the pod and it'll tweak something"22:57
@michael_kelly_anet:matrix.org * Hmm.  I was a bit unclear as to how that works - do I just add `verbose` to the existing CLI invocation or do I run it separately in the pod and it'll tweak something?22:57
@michael_kelly_anet:matrix.orgLooks like the latter?22:57
@michael_kelly_anet:matrix.orgBam.  Ok, let's see what we get now22:58
@clarkb:matrix.orgcorrect you run it as a separate command. It speaks to the running daemon via a socket22:58
@michael_kelly_anet:matrix.orgStupid question - how pervasive is zuul+k8s use?22:59
@clarkb:matrix.orgI know tristanC and tobiash are using it at different locations (though I think with openshift as the k8s implementation)22:59
@michael_kelly_anet:matrix.orgGotcha.23:00
@michael_kelly_anet:matrix.orgSeems like it could/should be a match made in heaven.23:00
@michael_kelly_anet:matrix.org(conceptually)23:00
@clarkb:matrix.orgI also notice your indentation on pass-to-parent seems to be under indented. Not sure if that might affect the yaml representation of the secrets dict but it might23:01
@michael_kelly_anet:matrix.orgblerg. stupid emacs inserting tabs in YAML23:02
@clarkb:matrix.orginstead of `secrets: [{ name: site_logs]` you might get `secrets: {pass-to-parent: true}23:02
@clarkb:matrix.org * instead of `secrets: [{ name: site_logs]` you might get \`secrets: {pass-to-parent: true}`23:02
@michael_kelly_anet:matrix.orgI'm surprised it's actually not complaining about that YAML....23:03
@clarkb:matrix.orgya it errors for me running a local test. Is it possible it did error in zuul too forcing zuul to use an older version of the job config?23:04
@clarkb:matrix.orgyour zuul web status will have a bell in the top right you can click on to see errors23:05
@clarkb:matrix.orgnote my local test was done just with pyyaml not with ansible and zuul23:05
@clarkb:matrix.orgmy only other thought right now is that you might want to reduce down to a simple secret without any real secret info (doesn't even need encrypted data) and try to debug print that out. If we can make that work we should be able to build up from there23:15
@michael_kelly_anet:matrix.orgIn fact, your thought about it using an old version gave me an idea...23:19
@michael_kelly_anet:matrix.orgI had set `default-branch: main` for the config project, but it seems to produce weird results.23:23
@michael_kelly_anet:matrix.orgeg: it was referencing two different versions of my config repo in the executor log23:24
@clarkb:matrix.orgdefault-branch is a fallback branch when you have nothing that matches better. With config projects you really want a single branch and there shouldn't be a fallback. Instead you likely want to set load-branch in your tenant config23:25
@clarkb:matrix.orgthink of default branch as "use this branch when we're testing two different projects together and the second project doesn't have the same branch as the first". load-branch says "load all of the trusted configuration from this specific branch"23:26
@michael_kelly_anet:matrix.orggotcha.23:27
@michael_kelly_anet:matrix.orgThat might be what's making it sad then ;)23:27
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 860753: Try zuul web builds with swc https://review.opendev.org/c/zuul/zuul/+/86075323:29
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul] 860753: Try zuul web builds with swc https://review.opendev.org/c/zuul/zuul/+/86075323:40

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