Skip to content

test: tweak upgrade-to test#1790

Merged
kian99 merged 1 commit intocanonical:v3from
kian99:tweak-upgrade-to-test
Jan 16, 2026
Merged

test: tweak upgrade-to test#1790
kian99 merged 1 commit intocanonical:v3from
kian99:tweak-upgrade-to-test

Conversation

@kian99
Copy link
Contributor

@kian99 kian99 commented Jan 7, 2026

Description

This PR modifies the upgrade test. It avoids installing a fixed version of the Juju snap to bootstrap an old agent version and instead relies on the bootstrap command's --agent-version flag.

The test bootstraps a controller with a fixed agent version of 3.6.11, creates a model on that controller, and then attempts to upgrade it. It verifies the upgrade is complete by polling so that when the API becomes async minimal changes to the test will be required.

In order to create the model on the correct controller we use a JAAS command that is currently WIP i.e. juju jaas add-model --target-controller. Once this functionality lands this test should be ready.

One hurdle faced here was how the bootstrapped controller (done during upgrade-to execution) would connect to jimm.localhost. In the integration test workflow we the login-token-refresh-url to "http://${{ env.MACHINE_IP }}:17070/.well-known/jwks.json" where MACHINE_IP is the address of the default network interface on the device. This routes traffic from containers to the host to the JIMM container exposed alongside Traefik without TLS and makes the testing much easier. We may want to, in the future, consider cloning the controller with all its config (controller and model config).

On a final note, this test is quite slow because it is bootstrapping 2 controllers. It is worth a dicussion on how to improve this. Some ideas include,

  • Speed up bootstrap
  • Run the integration test workflow periodically (maybe daily) and allow a label on PRs to trigger it.

Fixes JUJU-8938

Engineering checklist

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

@kian99 kian99 requested a review from a team as a code owner January 7, 2026 07:10
@kian99 kian99 force-pushed the tweak-upgrade-to-test branch from 332b0b1 to a715a4c Compare January 7, 2026 08:42
Copy link
Collaborator

@alesstimec alesstimec left a comment

Choose a reason for hiding this comment

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

LGTM one the juju jaas add-model command lands

@kian99 kian99 force-pushed the tweak-upgrade-to-test branch from a715a4c to 3655fe4 Compare January 16, 2026 07:41
@kian99 kian99 merged commit e8c0c44 into canonical:v3 Jan 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants