Switch CI to 26.04 runners - #18759
Conversation
70d17aa to
52b1fcd
Compare
There was a problem hiding this comment.
Pull request overview
This PR primarily updates GitHub Actions CI to use Ubuntu 26.04 runners by default, alongside a few supporting changes to dependency-caching behavior and an IPv6 NDP probing adjustment in LXD’s network device utilities.
Changes:
- Switch most CI jobs (and workflow-dispatch defaults) from Ubuntu 24.04 to Ubuntu 26.04 runners.
- Adjust the dqlite/liblxc caching action and CodeQL setup to build dependencies from the checkout when the
../lxd-testdirectory is absent. - Update IPv6 neighbor probing setup in
isIPAvailable()and refresh a contributing guide example to reference 26.04.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
lxd/device/device_utils_network.go |
Changes IPv6 NDP probing to avoid interface-name-based zone cache issues and improves source address binding selection. |
CONTRIBUTING.md |
Updates the example VM image to 26.04 daily (with a needed wording alignment). |
.github/workflows/tests.yml |
Switches core test jobs to ubuntu-26.04 and updates the selectable Ubuntu release inputs/defaults. |
.github/workflows/security.yml |
Moves Trivy jobs to ubuntu-26.04. |
.github/workflows/copilot-setup-steps.yml |
Moves Copilot setup job to ubuntu-26.04. |
.github/workflows/codeql.yml |
Removes the symlink workaround and relies on the cache action to build from the workspace on cache misses. |
.github/actions/cache-dqlite-liblxc/action.yml |
Adds build-dependency installation and makes deps build directory selection more flexible. |
52b1fcd to
3ed1498
Compare
3ed1498 to
2163aa1
Compare
2163aa1 to
8dcf802
Compare
8dcf802 to
0b38d8e
Compare
| LIBLXC_PATH=$(DEPS_PATH)/liblxc | ||
| LIBLXC_ROOTFS_MOUNT_PATH=$(GOPATH)/bin/liblxc/rootfs | ||
| # Directory where the built dqlite/liblxc artifacts are staged for CI caching. | ||
| DEPS_CACHE_PATH=$(GOPATH)/bin |
There was a problem hiding this comment.
shouldn't this be $(GOPATH)/deps like where make deps builds to?
There was a problem hiding this comment.
$(GOPATH)/bin should only be for Go binaries.
There was a problem hiding this comment.
This location was picked in 8e327e0 for convenience and portability along the liblxc lib as that path is hardcoded into liblxc.so.
| # Stage the freshly built dqlite/liblxc artifacts into $(DEPS_CACHE_PATH) so they | ||
| # can be cached and consumed by the CI jobs regardless of where they were built. | ||
| .PHONY: deps-cache | ||
| deps-cache: deps |
There was a problem hiding this comment.
why do we need to move the built/cache restored deps from DQLITE_PATH/LIBLXC_PATH into DEPS_CACHE_PATH? Can we restore the cache to the same place that make deps would build them to?
There was a problem hiding this comment.
The build path is variable (vendor vs non-vendor, $(CURDIR)-relative) and is a git working tree that make deps mutates, whereas the cache must live at one fixed, checkout-independent path ($(GOPATH)/bin) containing only the normalized include/libs artifacts. The move is what bridges those two, and liblxc's compiled-in rootfs-mount-path already points at the cache dir to make the relocation self-consistent.
There was a problem hiding this comment.
Hrm, I'm not following you.
Normally we would run:
make deps
make
The point of the cache, as I understand it, is to avoid the need to run make deps.
So shouldn't the cache restoration result in the same binary libs being restored into the same place that make deps would normally build them into - and then we can avoid the make deps step entirely and just move onto make.
This way the subsequent steps that use the binary libs can proceed the same way independent of whether make deps was run or whether it was skipped and the cache was restored?
The build path is variable (vendor vs non-vendor, $(CURDIR)-relative) and is a git working tree that make deps mutates
This part doesn't make sense to me. $(GOPATH) is not in a git tree, so $(GOPATH)/deps (where make deps builds to) is also not in a git tree AFAIK.
Ideally what I'm trying to avoid is introducing another level of indirection - the Github caching of libs should try and be transparent to the normal local dev process, but can we just skip the make deps step in the workflow if we have restored the cache?
There was a problem hiding this comment.
As an aside, I'm not sure if this particular change is relevant to the 26.04 runner switch, so if they can be split that would allow us to separate the discussions?
0b38d8e to
7e25e1c
Compare
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
The `actions/cache-dqlite-liblxc` only built from the unpacked `../lxd-test` dist directory, which was created solely by the `code-tests` job. On a cache miss in `system-tests` or CodeQL, the build failed on a missing `../lxd-test`. Build the deps from the checked-out workspace via the new `make deps-cache` target instead, so any job can rebuild them on a cache miss, and drop the now-redundant CodeQL symlink. Also, changing `ubuntu-24.04` -> `ubuntu-26.04` changes the cache key prefix (`deps-ubuntu-24.04-*` -> `deps-ubuntu-26.04-*`). No nightly scheduled run on main has seeded a `ubuntu-26.04` entry yet, so both today's key and yesterday's fallback miss. `code-tests` builds and saves it within the same workflow run, but system-tests and snap-tests still miss on that first run because PRs are explicitly forbidden to save anything to the cache since commit 06f909e. As such, when those transition occur, the deps need to be built for every job needing them. Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
7e25e1c to
96f87d9
Compare
The
ubuntu-26.04runner images are still in preview but they've been stable for the past 3 weeks.