Skip to content

CLOUDP-407997: Publish MCK promoted MCK images#1358

Open
josvazg wants to merge 3 commits into
masterfrom
CLOUDP-407997/release-publish
Open

CLOUDP-407997: Publish MCK promoted MCK images#1358
josvazg wants to merge 3 commits into
masterfrom
CLOUDP-407997/release-publish

Conversation

@josvazg

@josvazg josvazg commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prepare CI tool to publish previously promoted images and unify naming.

New mckci release publish and mckci release publish images commands for publishing single and all release images at a specific commit (or promoted-latest). Stomp protection added to mckci 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

# Publish all release images from latest promoted image/commit
mckci release publish images 

# Publish all release images at a specific commit
mckci release publish images \
  --commit a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2

# Publish single image (omit --commit for promoted-latest)
mckci release publish \
  --staging-image quay.io/mongodb/staging/mongodb-kubernetes \
  --commit a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2

# Promote all release images with force override
mckci release promote images --commit a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2 --force

# Dry-run all images
mckci release promote images --commit a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2 --dry-run

Proof of Work

CI must pass, changes fully self tested.

Checklist

  • Have you added changelog file?
    • use skip-changelog label if not needed

@josvazg
josvazg requested a review from a team as a code owner July 8, 2026 16:00
@josvazg
josvazg requested review from lsierant and nammn July 8, 2026 16:00
@josvazg
josvazg marked this pull request as draft July 8, 2026 16:01
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.10.0 Release Notes

New Features

  • MongoDBOpsManager, AppDB: The mongodb-agent-monitoring sidecar container has been merged into the main
    mongodb-agent container. Both automation and monitoring now run as a single process in a single container. The
    spec.appDB.monitoringAgent field is now deprecated and has no effect; Monitoring Agent options for the AppDB —
    including log level and rotation — are configured via spec.applicationDatabase.agent and
    spec.applicationDatabase.agent.monitoringAgent, the same fields used by MongoDB resources. Enabling AppDB
    monitoring still results in rolling restarts of AppDB pods.
  • MongoDBSearch: Added support to show cluster level status of Search, Managed LoadBalancer and MetricsForwarder in the MongoDBSearch resource's status.clusters field.
  • MongoDBSearch: Added support to configure the node affinity of the MongoDB Search (mongot) pods using the MongoDBSearch CR fields spec.clusters[].nodeAffinity or spec.clusters[].shardOverrides[].nodeAffinity.

Bug Fixes

  • MongoDBUser: Fixed a bug where the connection string Secret created in the central cluster did not carry a controller owner reference to the MongoDBUser CR. The missing reference prevented Kubernetes garbage collection from cleaning up the Secret when the MongoDBUser was deleted.
  • MongoDBUser: Fixed a bug where the ownership guard on the connection string Secret was always satisfied regardless of the actual owner, allowing the operator to silently overwrite a Secret controlled by a different resource.
  • Fixed a bug where all MongoDBCommunity deployment telemetry rows incorrectly reported IsRunningEnterpriseImage = true. The field was being evaluated against the operator-level enterprise image rather than the image configured in each CR's spec, causing a misleading ~100% enterprise rate for the Community deployment type.
  • IsRunningEnterpriseImage for Community deployments is now derived from the mongod container image override in spec.statefulSet.spec.template.spec.containers, if present. When no override is set, the field correctly defaults to false, reflecting that Community CRs use the community MongoDB server image by default.
  • MongoDBOpsManager, AppDB: Fix for spec.applicationDatabase.agent.monitoringAgent.logRotate field not being
    handled properly. Additionally, added defaults for
    spec.applicationDatabase.agent.monitoringAgent.logRotate.sizeThresholdMB to 1000 and
    spec.applicationDatabase.agent.monitoringAgent.logRotate.timeThresholdHrs to 24, which are same defaults Ops Manager
    would set.
  • MongoDBSearch: The default JVM heap size (half of the memory request) is now capped at 30GB, following the mongot sizing guidance. Heap sizes above ~30GB prevent the JVM from using compressed object pointers and degrade performance. User-provided heap flags are not affected, if more than 30GB heap is required, we recommend using jvmFlags.
  • MongoDB: Fixed a bug where switching a MongoDB ReplicaSet or ShardedCluster to a new Ops Manager project could cause the automation agent to generate a random keyfile in the empty target project, breaking internal cluster authentication.

@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from 20dad99 to c04d957 Compare July 9, 2026 09:15
@josvazg
josvazg marked this pull request as ready for review July 9, 2026 09:16
@josvazg
josvazg requested review from m1kola and mircea-cosbuc July 9, 2026 09:16
@josvazg josvazg added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Jul 9, 2026
@josvazg

josvazg commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Need to fix promotion first upstream, we need to promote and release all associated images not just the operator one.

@josvazg josvazg closed this Jul 10, 2026
@josvazg josvazg reopened this Jul 10, 2026
@josvazg
josvazg marked this pull request as draft July 10, 2026 07:48
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from 690dce4 to 1d3f86c Compare July 10, 2026 09:25
@josvazg
josvazg changed the base branch from master to CLOUDP-407997/promote-on-success July 10, 2026 09:26
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from 9be0011 to 2f353aa Compare July 10, 2026 14:51
@josvazg
josvazg force-pushed the CLOUDP-407997/promote-on-success branch from d30b41d to 69c5b18 Compare July 13, 2026 10:14
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch 2 times, most recently from 33c996e to d427179 Compare July 14, 2026 13:15
@josvazg
josvazg force-pushed the CLOUDP-407997/promote-on-success branch 3 times, most recently from a706627 to 4b3083a Compare July 15, 2026 14:47
Base automatically changed from CLOUDP-407997/promote-on-success to master July 15, 2026 15:20
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from d427179 to 27a5832 Compare July 15, 2026 17:10
@josvazg
josvazg marked this pull request as ready for review July 15, 2026 17:23
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch 4 times, most recently from 9e2ce72 to 2871ee6 Compare July 16, 2026 07:57
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from 2871ee6 to 56a1cc5 Compare July 16, 2026 08:18
@josvazg josvazg changed the title Publish MCK promoted MCK images CLOUDP-407997: Publish MCK promoted MCK images Jul 16, 2026
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from 56a1cc5 to 8f57caa Compare July 16, 2026 10:04

@m1kola m1kola 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.

I think something is wrong around logic with latest. See questions below.

Comment thread ci/internal/cli/release_publish.go Outdated
Comment on lines +38 to +40
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.

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.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

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.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment thread ci/internal/release/images_promote.go Outdated
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"))

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.

nit: I would not encourage use of --force

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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?

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.

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.

Comment thread ci/internal/release/publish.go Outdated
@josvazg
josvazg force-pushed the CLOUDP-407997/release-publish branch from 8f57caa to 3422194 Compare July 20, 2026 14:48
@josvazg
josvazg requested a review from m1kola July 20, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants