You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do we want to do with tagging charm repos to match the CC008 spec? The spec gives us freedom to decide as long as we meet SemVer requirements. We want this solution to:
have friendly UX for our users
be extendible to product modules
be automatable: tagging the repo and releasing to the TF registry
The core of the problem
Since we want the charm to have channel validation, we want to hint that in the tag. How can we map charm tracks to TF SemVer?
Tip
I think the best option is C. It works well for product modules as well. The user's confusion regarding what workload the tag is for can be reduced with the module's README. The runner-up is B. Please see the pros and cons for each.
It is never ok to make breaking changes in-track, only on dev; the source of new tracks.
If upstream major bumps, we make an effort to bump our track at the end of the current cycle, unless time pressure/capacity does not permit.
Some charms have tracks major.minor if they have an upstream workload.
Otherwise, they have major following COS' track: reference
Terraform
We must bump the major version on breaking changes, the minor for non-breaking changes, and the patch for trivial fixes (e.g., updating descriptions) and non-breaking bug fixes.
A breaking change can be either:
an API change to the TF layer e.g., removing an endpoint in the outputs.tf.
an endpoint interface changes without updating the endpoint name i.e., no change to the TF layer, but a side-effect in the module.
Terraform registry requires tags following a subset of SemVer i.e., {major}.{minor}.{patch} without features like metadata or pre-releases.
The registry will not pick up our rev123 tags because they are not valid semver.
Decision making
The main blockers for each strategy are identified with ❗️.
Rubric
A: Charm revisions
B: Track(major.minor), TF .patch SemVer
C: Pure TF SemVer
D: Track(major.minor) SemVer
Identifier
Tag scheme UX
Terrareg support
CC008 Compatible
A
❌
❌
❌
B
❌
✅
✅
C
❓️
✅
✅
D
✅
✅
❌
Tagging strategies
Upstream
Track
Cycle
Event
B
C
D
3.6.7
3.6
26.04
3.6.0
1.0.0
3.63.6-tf.0
A TF endpoint added to track 3.6
3.6.1
1.1.0
3.63.6-tf.1
A TF endpoint added to previous track e.g., 2.9
2.9.n+1
n-1.n+1.0 or n.n+1.0
2.92.9-tf.n+1
3.6.7
3.6
26.10
We consciously decide not to track bump (to 3.7.0) across cycles
3.6.1
1.1.0
3.63.6-tf.1
4.1.0
4.1
27.04
We time a breaking change with 27.04
4.1.0
2.0.0
4.14.1-tf.0
We decide to make a breaking change mid-cycle
❗️
❗️
3.0.0
A: Charm revisions
Good:
We already have the tags and automation.
Bad:
❗️Does not conform to CC008 spec.
Tags are opaque e.g., rev123 is specific to track 2, but rev124 is specific to track dev.
We do not release with (only) TF changes
B: Track(major.minor), TF .patch SemVer
Good:
Provides insight on which track the tag is for.
Terrareg allows mapping a git tag 1.2-tf.0 -> 1.2.0 in Terrareg; obvious in git, but confusing in Terrareg UI.
Bad:
❗️The TF-specific patch can confuse the user that it is the workload version patch.
Workload-less charm tracks use the stack track i.e., just a major, not major.minor
We could map to major.minor e.g., 3 -> 3.0 and a TF version of 3.0.TF
This would not map well to product modules since they have no upstream e.g., major.TF.TF
Would documentation be enough for users to understand?
C: Pure TF SemVer
Good:
Aligns most closely to the CC008 spec.
Major changes are not gated per cycle.
Bad:
❗️Tags are opaque to charm-tracks e.g., 1.0.0 is specific to track 2.
A user needs to search release notes / module docs to understand what tracks are allowed.
We have to manage a VERSION file for tagging CI.
D: Track(major.minor) SemVer
Good:
Similar to sourcing product modules with track branches, but with tags.
E.g., in 26.04 source ?ref=track/3.6.
E.g., in 26.10 source ?ref=3.6.
Breaking (major) changes are gated for 6 months (per cycle).
The workload version is the tag.
Having a second tag (with metadata and no TF changes) acts as a source of truth for users.
metadata identifies the tag creation order e.g., 3.6+tf.1 vs. 3.6+tf.2.
Bad:
❗️Does not fully conform to the CC008 spec.
❗️We lose reproducibility.
e.g., day 1 the module documentation says it supports endpoint X, then day 2 it supports both endpoints X & Y
i.e., user needs to refresh the documentation vs. going to the new version.
e.g., day 1 terraform apply, then day 2 terraform apply is broken!
In the event that we (unlikely) commit a regression and overwrite the tag, the admin might not know how to (or that they even can) switch between a registry ref to a GitHub ref.
e.g., 3.6 is broken so they must use the ?ref=3.6+metadata tag, which is not published in the registry.
Hard to scale the fixes if we make a breaking change e.g., ManSol needs to make many changes to switch to the -tf.n tags.
TODOs
Comment on registry TF spec: both registry and module specs
Move this to the teams ADRs or to a spec and close this issue
Summary
What do we want to do with tagging charm repos to match the CC008 spec? The spec gives us freedom to decide as long as we meet SemVer requirements. We want this solution to:
The core of the problem
Since we want the charm to have channel validation, we want to hint that in the tag. How can we map charm tracks to TF SemVer?
Tip
I think the best option is
C. It works well for product modules as well. The user's confusion regarding what workload the tag is for can be reduced with the module's README. The runner-up isB. Please see the pros and cons for each.Statements of truth
Charm tracks
dev.dev; the source of new tracks.major.minorif they have an upstream workload.majorfollowing COS' track: referenceTerraform
outputs.tf.{major}.{minor}.{patch}without features like metadata or pre-releases.rev123tags because they are not valid semver.Decision making
The main blockers for each strategy are identified with ❗️.
Rubric
A: Charm revisionsB: Track(major.minor), TF.patchSemVerC: Pure TF SemVerD: Track(major.minor) SemVerABCDTagging strategies
BCD3.6.73.626.043.6.01.0.03.63.6-tf.03.63.6.11.1.03.63.6-tf.12.92.9.n+1n-1.n+1.0orn.n+1.02.92.9-tf.n+13.6.73.626.103.7.0) across cycles3.6.11.1.03.63.6-tf.14.1.04.127.0427.044.1.02.0.04.14.1-tf.03.0.0A: Charm revisionsGood:
Bad:
CC008spec.rev123is specific to track2, butrev124is specific to trackdev.B: Track(major.minor), TF.patchSemVerGood:
1.2-tf.0->1.2.0in Terrareg; obvious in git, but confusing in Terrareg UI.Bad:
major, notmajor.minormajor.minore.g.,3->3.0and a TF version of3.0.TFmajor.TF.TFC: Pure TF SemVerGood:
Bad:
1.0.0is specific to track2.VERSIONfile for tagging CI.D: Track(major.minor) SemVerGood:
?ref=track/3.6.?ref=3.6.metadataidentifies the tag creation order e.g.,3.6+tf.1vs.3.6+tf.2.Bad:
terraform apply, then day 2terraform applyis broken!3.6is broken so they must use the?ref=3.6+metadatatag, which is not published in the registry.-tf.ntags.TODOs