Skip to content

Conversation

@viveksinghggits
Copy link
Contributor

@viveksinghggits viveksinghggits commented Dec 2, 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/628d93d09c186c51292a44d0c1f522d9

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 2, 2025 22:16
@viveksinghggits viveksinghggits requested review from mircea-cosbuc and nammn and removed request for a team December 2, 2025 22:16
Copy link
Collaborator

@nammn nammn left a comment

Choose a reason for hiding this comment

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

LGTM! questions:

  • automate?
  • depends_on?

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.

this should be uncommented, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

- func: install_macos_notarization_service
- func: release_kubectl_mongodb_plugin

- name: add_releaseinfo_to_github_assets
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we add this to the image release? Right now its only manually run, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes to both? So you will make a change in this PR to make it run automatically, right?


def convert_to_release_info_json(build_info: BuildInfo) -> dict:
output = {
def convert_to_release_info_json(build_info: BuildInfo, version: str) -> dict:
Copy link
Collaborator

Choose a reason for hiding this comment

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

b: version can only be used by operator related images. READINESS_PROBE_IMAGE and UPGRADE_HOOK_IMAGE have their own versions in release.json.

nit: version -> operator_version


for name, image in images.items():
output["images"][name] = {
release_info_output["images"][name] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be simpler to just iterate over images = {name: build_info.images[name] for name in RELEASE_INFO_IMAGES_ORDERED

and then go manually with OPS_MANAGER_IMAGE and AGENT_IMAGE:

# add operator related images
images = {name: build_info.images[name] for name in RELEASE_INFO_IMAGES_ORDERED
for name, image in images.items():
  add_image(name, image.repositories, image.platforms, version)

# add Ops Manager image
om_image = build_info.images[OPS_MANAGER_IMAGE]
om_version = latest_om_version(release_data)
add_image(OPS_MANAGER_IMAGE, om_image.repositories, om_image.platforms, om_version)

# add Agent image
agent_image = build_info.images[AGENT_IMAGE]
agent_version = latest_agent_version(release_data)
add_image(AGENT_IMAGE, agent_image.repositories, agent_image.platforms, agent_version)


# add search image detail
release_info_output["images"][SEARCH_IMAGE] = {
"repositories": SEARCH_IMAGE_REPOSITORY,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rather move this information to release.json and create a proper object under supportedImages, something like:

"supportedImages": {
  "mongodb-search": {
    "repository": "quay.io/mongodb/mongodb-search",
    "platforms": [
       "linux/arm64", 
       "linux/amd64"
    ],
    "version": "0.55.0"
  }
}

BuildInfo,
load_build_info,
)
from scripts.release.kubectl_mongodb.promote_kubectl_plugin import upload_assets_to_github_release
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: upload_assets_to_github_release will not be relevant only to promote_kubectl_plugin so it should be placed somewhere else

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.

4 participants