opendevreview | Dmitriy Rabotyagov proposed openstack/diskimage-builder master: Add Fedora 40 to the CI tests https://review.opendev.org/c/openstack/diskimage-builder/+/933664 | 09:44 |
---|---|---|
shermanm | I'm having some trouble getting the 'source-repositories' element working for me, in that even after I create a `source-repository-my-package-name` file, it never seems to actually download + cache the repo targeted by that file | 21:40 |
shermanm | so I feel like I'm doing something incorrectly | 21:40 |
shermanm | in the logs, I do see this line: "Getting /cache/source-repositories/repositories_flock: Wed Oct 30 21:39:23 UTC 2024 for /cache/dib_build.KvfB6z3L/hooks/source-repository-my-package-name" | 21:41 |
shermanm | but then "dib-run-parts 98-source-repositories completed" immediately after | 21:41 |
clarkb | I'm trying to dig up our use of that to build the ci images for opendev but I think everything may be programmatically generated which may be more complicated than its worth but still looking | 21:41 |
shermanm | I basically copied the invocation out of the ironic-python-agent-ramdisk | 21:42 |
clarkb | https://opendev.org/openstack/project-config/src/branch/master/nodepool/elements/cache-devstack is where we cache a bunch of files not git repos | 21:42 |
clarkb | and that depends on the element where we cache git repos which is generated programmatically but that depends on the source-repositories element: https://opendev.org/openstack/project-config/src/branch/master/nodepool/elements/openstack-repos | 21:43 |
shermanm | so, I coped this file, and made sure to also include a dependency on the source-repositories element: https://opendev.org/openstack/ironic-python-agent-builder/src/branch/master/dib/ironic-python-agent-ramdisk/source-repository-ironic-python-agent | 21:45 |
clarkb | are you runnin with -x set to trace the execution? if not there may be additional output when doing so that points to what is going on. You can also stick a `bash` line inside of the script that is running )in this case 98-source-repositories) to effectively create a breakpoint there that drops you into a bash shell to debug | 21:46 |
clarkb | that would allow you to say inspect the contents of the file to ensure they got copied as you expected | 21:46 |
shermanm | I think I found the issue, I wasn't setting a git ref or branch, and my repo has a default branch of `main`, not `master` | 22:47 |
shermanm | but I'm still not sure why the element was continuing even though it failed to fetch the reference | 22:48 |
clarkb | I would expect running under -x to provide some clues to that | 23:13 |
shermanm | unfortunately even with -x, or -x -x, I'm not getting any log output from inside "while read line; do" https://opendev.org/openstack/diskimage-builder/src/commit/02a3c8755960f0e1851da5ec0f8d4b66aee06494/diskimage_builder/elements/source-repositories/extra-data.d/98-source-repositories#L45 | 23:50 |
clarkb | not even the progress counter on line 55? | 23:52 |
shermanm | nope, not for any of the sources, including the ones that work | 23:52 |
clarkb | below the counter it tries to match lines against a regex which I think may fail in your case since you were missing required info | 23:53 |
clarkb | but that last item is optional so even then it should progress past that conditional | 23:53 |
clarkb | and I know it works for us you can see that here: https://nb01.opendev.org/rockylinux-9-c34cd24105754c2bb90c8623f807f7d4.log search for "Updating cache of" | 23:54 |
shermanm | I'm sure there's something really silly i'm missing tbh, but that log's helpful as an example of what the output "should" look like | 23:56 |
shermanm | thanks for the tips! | 23:56 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!