Skip to content

Conversation

@viveksinghggits
Copy link
Contributor

@viveksinghggits viveksinghggits commented Dec 3, 2025

Summary

As discussed in the base PR, customers have been asking us to provide some details that can be used to figure out the container images that they need to deploy a specific version of MCK and MongoDB instance.
This PR does that. It add the functionality to add a new file called release_info_<release-version>.json to the GitHub release assets that would contain the details about MCK released images, OM, Agent, Search and the mapping between OM and agent's latest versions.

This is how the file loos like

https://gist.github.com/viveksinghggits/560e6179a3c7d9b11b0df68f02b15ccc

Proof of Work

Run the patch manually

evergreen patch --path .evergreen.yml -p mongodb-kubernetes -v add_releaseinfo_to_github_assets -t add_releaseinfo_to_github_assets -f -y -u --browse -d "Test add release info to github assets"

and make sure the new file is added to the release.

Screen.Recording.2025-12-02.at.23.00.35.mov
Screen.Recording.2025-12-02.at.23.08.27.mov

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file? (will show up later)

@viveksinghggits viveksinghggits requested a review from a team as a code owner December 3, 2025 14:03
@viveksinghggits viveksinghggits requested review from MaciejKaras, lucian-tosa, mircea-cosbuc, nammn and vinilage and removed request for a team and lucian-tosa December 3, 2025 14:03
@viveksinghggits
Copy link
Contributor Author

Hi @MaciejKaras , @nammn @mircea-cosbuc @vinilage ,
I had to re-open the PR that was already being reviewed here #623, the branch that was used in other PR was such that I was not able to push any new changes.
I have addressed the comment in this PR. can you please take a look again.

thank you, sorry for the confusion.

run_on:
- ubuntu2404-small
allowed_requesters: ["patch", "github_tag"]
# depends_on:
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this is still commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove this, I have commented this out because I don't want to mistakenly release the images while testing this.

Copy link
Collaborator

@MaciejKaras MaciejKaras Dec 5, 2025

Choose a reason for hiding this comment

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

Sure, understand. Let's keep the thread unresolved until this is uncommented.

run_on:
- ubuntu2404-small
allowed_requesters: ["patch", "github_tag"]
# depends_on:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove this, I have commented this out because I don't want to mistakenly release the images while testing this.

raise e

def get_manfiest_list_digest(self, image) -> Optional[str]:
self.pull_image(image)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pulling Ops Manager (which is huge) and other images just to get the digest seems like an overkill. Are we sure there is no other way?

Copy link
Contributor Author

@viveksinghggits viveksinghggits Dec 5, 2025

Choose a reason for hiding this comment

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

I looked into these ways of figuring out manifest list digest.

docker_cmd.buildx.imagetools.inspect(image_tag)

The python client that we are using doesn't return the manifest list digest, even though the respective CLI returns the required digest. So we can not use this way. I raised an issue upstream.

docker manifest inspect

Does not return the manifest list digest.

docker_cmd.image.inspect(image)

Works well and expects image to be pulled first.

docker inspect

Works well and expects image to be pulled locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The overall process of making the release_info file is taking less than 10 (~6) seconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other option is to call HTTP API of container registry to figure the information out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that I was thinking about it again, the other option is to not use the python module and just run docker buildx imagetools inspect command directly. The small problem with this approach is, in the other functions we will be using the python package but in one method we will be running docker command directly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not use https://github.com/containers/skopeo to inspect remote images? It's the ideal tool for this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have used skopeo now to get the manifest list digest.

Base automatically changed from latest-om-agent-mapping to master December 5, 2025 13:51
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

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

MCK 1.6.1 Release Notes

Bug Fixes

  • Backed up the agent password in a secret for SCRAM authentication to prevent unnecessary password rotations.
  • MongoDB Adding missing ownerrefs to ensure proper resource deletion by kubernetes.
  • Single Cluster Deleting resources created by CRD now only happens on multi-cluster deployments. Single Cluster will solely rely on ownerrefs.
  • MongoDB, MongoDBOpsManager: Improve validation for featureCompatibilityVersion field in MongoDB and MongoDBOpsManager spec.
    The field now enforces proper semantic versioning. Previously, invalid semver values could be accepted,
    potentially resulting in incorrect configurations.

1. Use `docker run skopeo inspect` to get digest of manifest list of a container image instead of docker inspect
2. Write unit test
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