CLOUDP-407997: Publish MCK promoted MCK images#1358
Conversation
MCK 1.10.0 Release NotesNew Features
Bug Fixes
|
20dad99 to
c04d957
Compare
|
Need to fix promotion first upstream, we need to promote and release all associated images not just the operator one. |
690dce4 to
1d3f86c
Compare
9be0011 to
2f353aa
Compare
d30b41d to
69c5b18
Compare
33c996e to
d427179
Compare
a706627 to
4b3083a
Compare
d427179 to
27a5832
Compare
9e2ce72 to
2871ee6
Compare
2871ee6 to
56a1cc5
Compare
56a1cc5 to
8f57caa
Compare
m1kola
left a comment
There was a problem hiding this comment.
I think something is wrong around logic with latest. See questions below.
| commit if --commit is omitted), then retags it in the production registry as | ||
| :{version} and :latest. The version is derived from the promoted-{commit}-{version} | ||
| tag already present in the staging registry — no --version flag is needed. |
There was a problem hiding this comment.
Is it a behaviour we want with backporting?
So if we have 2.0.1 right now as latest and then publish 2.0.2 it becomes latest. So far so good. But I I understand the description correctly, backporting something to 1.x and say publishing 1.10.1 - will move latest to that version.
Is my understanding correct? If yes - then I think it is not what should be happening and latest should always post to the highest version possible within the current branch. In the example above it will be 2.0.2 because it is the latest version despite 1.10.1 being the latest in the timeline of releases.
There was a problem hiding this comment.
Yes I think we are going to need more than one "latest" I can add a flag to pass a custom "latest" marker such as latestv1.
The latest marker is useful as it allows to pin the most up to date promoted image without knowing the commit in advance. But you are right for backports we need to extend this a bit.
My proposal is a new optional flag names --latest-marker (or similarly named) that defaults to latest but we can set to "latestv1", "latestv2" etc the "latest" remains the marker for the current release.
There was a problem hiding this comment.
I see. If we need to have some sort of latest marker, I think we can use major version for that. E.g. if 2.0.2 is the latest, it will be tagged with 2.0.2, 2.x (or just 2), latest and anything in 1.x tagged with 1.<minor>.<patch> (say 1.10.1 from example above), 1.x (or just 1) and that's it.
There was a problem hiding this comment.
At the tool level we can accept anything. This PR is at the tool level, the wiring is a separate PR. We can discuss conventions there.
| prep = append(prep, prepared{img: img, reg: reg, host: host, repoPath: path, srcRef: srcRef, versionTag: versionTag}) | ||
| } | ||
| if len(conflicts) > 0 && !force { | ||
| return nil, fmt.Errorf("refusing to promote images; tag conflicts found (use --force to override):\n%s", strings.Join(conflicts, "\n")) |
There was a problem hiding this comment.
nit: I would not encourage use of --force
There was a problem hiding this comment.
I can soften the wording, but still, the flag exists and is a separate thing to ensure safe usage. The assumption is if you are using it, is because you must.
double check and use --force to override if required would be test here?
There was a problem hiding this comment.
My logic is that if you must use it - you are aware of it or you at least looked at --help. So it is more of a deliberate decision because it requires some research before using it.
But don't worry about this comment too much. it is ok as is. Not a big deal.
Also add image stomp protection Signed-off-by: Jose Vazquez <jose.vazquez@mongodb.com>
8f57caa to
3422194
Compare
Summary
Prepare CI tool to publish previously promoted images and unify naming.
New
mckci release publishandmckci release publish imagescommands for publishing single and all release images at a specific commit (or promoted-latest). Stomp protection added tomckci release promote images.Stomp protection (both promote images + publish images)
Every image's immutable tag is checked for conflicts BEFORE any writes. If any
image conflicts and --force is not set, the entire operation is refused — no
partial writes.
Examples
Proof of Work
CI must pass, changes fully self tested.
Checklist
skip-changeloglabel if not needed