Skip to content

Conversation

@nammn
Copy link
Collaborator

@nammn nammn commented Dec 5, 2025

Summary

  • replacing ambiguous flags with clearer version selection, removing legacy/manual release variants, and ensuring proper argument passing throughout the pipeline

Pipeline and Release Process Improvements:

  • Replaces the release_agent task/variant with a new release_on_merge task/variant that runs automatically on every merge, detecting changes to release.json and releasing images based on evg anchors. Manual/manual-patch-only variants for agent and OM 6.0 images are removed.

  • Updates the agent image build logic to use an explicit agent_version parameter (all, current, or a specific version), removing the previous use of --all-agents and --current-agents flags. Tools version is now required for specific agent builds.

  flowchart TD
      A[Merge to master] --> B[release_on_merge task]
      B --> C[Load config<br/>release.json + .evergreen.yml]

      C --> D[Release via pipeline.py cloud_manager agent]
      C --> E{For each OM version<br/>6.0, 7.0, 8.0}

      E --> F[Release via pipeline.py ops-manager image]
      E --> G[Release via pipeline.py matching agent]

      D & F & G --> H[atomic_pipeline.py skip_if_exists handles duplicates]
Loading

related pct pr: https://github.com/10gen/mms/pull/149833

Proof of Work

  • manual run: Patch - relevant logs
[2025/12/05 16:18:51.394] 2025-12-05 15:18:51,394 - INFO - Found OM 60: 6.0.27
[2025/12/05 16:18:51.394] 2025-12-05 15:18:51,394 - INFO - Found OM 70: 7.0.19
[2025/12/05 16:18:51.394] 2025-12-05 15:18:51,394 - INFO - Found OM 80: 8.0.16
[2025/12/05 16:18:51.394] 2025-12-05 15:18:51,394 - INFO - === Releasing cloud_manager agent: 13.43.0.9995-1 ===
...
...
 All specified image tags already exist. Skipping build.
  • new tool dry-run
[2025/12/08 10:39:51.814] ============================================================
[2025/12/08 10:39:51.814] RELEASE SUMMARY:
[2025/12/08 10:39:51.814] ============================================================
[2025/12/08 10:39:51.814] Agents:
[2025/12/08 10:39:51.814]   ✓ 13.43.0.9995-1 (cloud_manager)
[2025/12/08 10:39:51.814]   ✓ 12.0.35.7911-1 (OM 6.0.27)
[2025/12/08 10:39:51.814]   ✓ 107.0.19.8805-1 (OM 7.0.19)
[2025/12/08 10:39:51.814]   ✓ 108.0.16.8895-1 (OM 8.0.16)
[2025/12/08 10:39:51.814] Ops Manager:
[2025/12/08 10:39:51.814]   ✓ 6.0.27
[2025/12/08 10:39:51.814]   ✓ 7.0.19
[2025/12/08 10:39:51.814]   ✓ 8.0.16
[2025/12/08 10:39:51.814] Total: 7 releases
[2025/12/08 10:39:51.814] ============================================================

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?

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

@nammn nammn added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Dec 5, 2025
@nammn nammn changed the title release on master merges axuillary images CLOUDP-305848 & CLOUDP-338152 - release on master merges axuillary images Dec 5, 2025
.evergreen.yml Outdated
display_name: publish_om60_images
tags: [ "manual_patch" ]
allowed_requesters: [ "patch", "github_pr" ]
allowed_requesters: [ "patch", "commit" ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed github_pr since no need to release them anymore via pct in a PR

logger.info("building current used agents")
logger.info("building currently used agents")
else:
agent_versions_to_build = detect_ops_manager_changes()
Copy link
Collaborator Author

@nammn nammn Dec 5, 2025

Choose a reason for hiding this comment

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

no need to detect for changes, since we release every commit now

)


class TestDetectOpsManagerChanges(unittest.TestCase):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

file is mostly a rename from scripts/release/tests/test_detect_ops_manager_changes.py and removing most of the tests and adding the last one

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we decided to not keep om6 publishing code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

all of this will now be run by merging to master from "release_on_merge.py"

.evergreen.yml Outdated
- name: publish_ops_manager
- name: release_agent

- name: publish_om70_images
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in theory - we should be able to delete this one, but we can keep it for now, but then it also means removal of release_agent

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should keep publish_omXX_images variants. Instead we should just document how can we trigger build for particular OM and agent image. I mean some kind of generic evergreen variant that allows you to manually build any image possible and push it to chosen repo. This can be done though in separate PR, but please mention that those variants are not going to be used.

Also is PCT is going to try to add those variants still or you have removed that logic already? Would PCT fail if the relevant variants are missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed, will remove related PCT code and then make a new PR to support singular releases.

@nammn nammn marked this pull request as ready for review December 8, 2025 08:12
@nammn nammn requested a review from a team as a code owner December 8, 2025 08:12
@nammn nammn marked this pull request as draft December 8, 2025 08:32
@nammn nammn marked this pull request as ready for review December 8, 2025 10:33
@nammn nammn requested a review from MaciejKaras December 8, 2025 14:12
Copy link
Collaborator

@MaciejKaras MaciejKaras left a comment

Choose a reason for hiding this comment

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

LGTM!

@nammn nammn requested a review from mircea-cosbuc December 8, 2025 18:31
" --version current (for currently used agents)\n"
" --version <ver> --agent-tools-version <tools_ver> (for specific agent)"
)
is_special_version = version in ("all", "current")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we have const for all and current, it looks like we are using them at a lot of places.

"""
Extract OM versions from .evergreen.yml anchors using YAML parsing and semver.
Returns: {"6.0.27", "7.0.19", "8.0.16"}
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't know we had this information already in .evergree.yaml, we recently added similar information in our release.json. https://github.com/mongodb/mongodb-kubernetes/blob/master/release.json#L19

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.

4 participants