Skip to content

Switch CI to 26.04 runners - #18759

Draft
simondeziel wants to merge 8 commits into
canonical:mainfrom
simondeziel:ubuntu-26.04
Draft

Switch CI to 26.04 runners#18759
simondeziel wants to merge 8 commits into
canonical:mainfrom
simondeziel:ubuntu-26.04

Conversation

@simondeziel

@simondeziel simondeziel commented Jul 15, 2026

Copy link
Copy Markdown
Member

The ubuntu-26.04 runner images are still in preview but they've been stable for the past 3 weeks.

@simondeziel
simondeziel force-pushed the ubuntu-26.04 branch 5 times, most recently from 70d17aa to 52b1fcd Compare July 21, 2026 21:18
Copilot AI review requested due to automatic review settings July 21, 2026 21:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-test directory 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.

Comment thread CONTRIBUTING.md Outdated
Comment thread .github/actions/cache-dqlite-liblxc/action.yml Outdated
Comment thread .github/workflows/tests.yml
Comment thread lxd/device/device_utils_network.go
Comment thread .github/workflows/codeql.yml
Copilot AI review requested due to automatic review settings July 21, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread .github/actions/cache-dqlite-liblxc/action.yml
Comment thread Makefile
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be $(GOPATH)/deps like where make deps builds to?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(GOPATH)/bin should only be for Go binaries.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This location was picked in 8e327e0 for convenience and portability along the liblxc lib as that path is hardcoded into liblxc.so.

Comment thread Makefile
# 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@simondeziel
simondeziel marked this pull request as draft July 24, 2026 12:17
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants