Skip to content

refactor: bump facade version#1837

Merged
kian99 merged 7 commits intocanonical:v3from
kian99:bump-facades
Jan 28, 2026
Merged

refactor: bump facade version#1837
kian99 merged 7 commits intocanonical:v3from
kian99:bump-facades

Conversation

@kian99
Copy link
Contributor

@kian99 kian99 commented Jan 27, 2026

Description

Currently this PR is based on top of #1835.

This PR updates the versions of facades that JIMM implements to align with the latest that Juju 3.6 offers. Each commit covers a separate facade. I took the time to investigate what changed in each version change and each commit description documents the change and whether it was safe to bump JIMM, with reasons for adding/not-adding support for the old version.

In short, we were okay to bump all the facade versions without adding support for the old versions. This does mean in theory you can't use, say, a 3.4.x with the latest JIMM which may have worked for some facades. Instead, you must have a relatively new version of a 3.6.x client but I believe this is okay.

Fixes JUJU-8964

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 27, 2026 14:25
Copy link
Contributor

@SimoneDutto SimoneDutto left a comment

Choose a reason for hiding this comment

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

67

Copy link
Contributor

@luci1900 luci1900 left a comment

Choose a reason for hiding this comment

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

Ship it

The ApplicationOffers facade was bumped to v5 in juju/juju#17062 to remove the `spaces` and `bindings` fields in the offerDetails struct (see https://github.com/juju/juju/blob/3.6/rpc/params/crossmodel.go#L83).
JIMM was already returning the v5 struct while stating that we only supported the v4 method. This highlights the fact that we don't do facade versioning well.
It should be safe to move to v5 since the change was made in Juju 3.5 and now we're well into 3.6 so we can expect all clients to support the v5 facade.
The Controller facade was bumped to v12 in juju/juju#17761 to remove the "ModelConfig" method in preparation for changes in 4.0.
Already in 3.6 (see juju/juju#17732) where one should "call ModelConfigAPI instead of ControllerAPI.ModelConfig". In places like Terraform we already do the correct thing for controller bootstrap.
Facade ModelManager was bumped to v10 in juju/juju#16875 which changed the behaviour of several methods like CreateModel and ModelInfo to avoid populating the fields DefaultSeries and DefaultBase.

These fields are no longer returned in Juju 4 and are no longer populated in recent 3.5+ version.

JIMM returns ModelInfo by calling Juju, specifically using the v10 facade so we were already exhibiting v10 behaviour while claiming to be v9.

Moving JIMM's ModelManager facade to v10 should be fine as we only support newer 3.6 controllers anyway.
The MigrationTarget facade was bumped to v5 in juju/juju#19935 where the Token field was added to MigrationTargetInfo struct. We already accepted this token in our facades so we were already acting like a v5 facade.

The facade was then bumped to v6 in juju/juju#20133. From what I can tell nothing changed in MigrationTarget but a SkipUserChecks field was added to the MigrationTargetInfo struct. But this struct is used in calls to the 'Controller' facade which holds the method for starting a migration.
In short, there was a mistake and the controller facade should've been bumped but the MigrationTarget was bumped instead. I'm quite confident this is the case as I'm the one who authored the change.

In conclusion, we should be able to bump to v6 without any issue.
@kian99 kian99 merged commit ca69f34 into canonical:v3 Jan 28, 2026
8 of 10 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