Skip to content

CLOUDP-295785 - add pipeline_main.py extended help #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 89 commits into from
Aug 12, 2025

Conversation

MaciejKaras
Copy link
Collaborator

@MaciejKaras MaciejKaras commented Aug 11, 2025

Summary

Adding more help information for the scripts.release.pipeline_main python script.

Proof of Work

(venv) ➜  mongodb-kubernetes git:(maciejk/use-ar-related-versions) ✗ python3 -m scripts.release.pipeline_main --help
usage: pipeline_main.py [-h] [-b ] [-p ] [-v ] [-r ] [-s] [--parallel] [--parallel-factor ] image

Builder tool for container images. It allows to push and sign images with multiple architectures using Docker Buildx. By default build information is read from 'build_info.json' file in the project root directory based on the build scenario. It can be inferred from the environment variables or overridden with the '--build-scenario' option.

positional arguments:
  image                 Image name to build. Supported images: meko-tests, operator, mco-tests, readiness-probe, upgrade-hook, database, agent, init-appdb, init-database, init-ops-manager, ops-manager

options:
  -h, --help            show this help message and exit
  -b, --build-scenario
                        Override the build scenario instead of inferring from environment. Options: release, patch, staging, development. Default is to infer from environment variables. For 'development' the 'patch' scenario is used to read values from 'build_info.json'
  -p, --platform        Override the platforms instead of resolving from build scenario. Multi-arch builds are comma-separated. Example: linux/amd64,linux/arm64
  -v, --version         Override the version/tag instead of resolving from build scenario. Default is to infer from environment variables based on the selected scenario.
  -r, --registry        Override the base registry instead of resolving from build scenario
  -s, --sign            If set force image signing. Default is to infer from build scenario.
  --parallel            Build agent images in parallel.
  --parallel-factor     Number of agent builds to run in parallel, defaults to number of cores

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?

Fix build scenario

Remove create and push manifests

Continue improvement to main

Simplify main and build_context

missed

Pass Build Configuration object directly

Use legacy and new pipeline

Fix

Remove --include

Rename MCO test image

Multi platform builds, with buildx

TODOs

Implement is_release_step_executed()

Fix init appdb image

Import sort

black formatting

Some cleaning and version adjustments

Adapt main to new build config

Add buildscenario to buildconfig

Handle build env

Renaming, usage of high level config

All images build pass on EVG

Lint

Explicit image type, support custom build_path

Replace old by new pipeline in EVG

Add documentation

Split in multiple files, cleanup

WIP, passing builds on staging temp + multi arch manifests

Replace usage of sonar

Remove namespace

Remove pin_at and build_id

Copied pipeline, removed daily builds and --exclude
This reverts commit 426e522.
Copy link

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

MCK 1.3.0 Release Notes

Bug Fixes

  • This change fixes the current complex and difficult-to-maintain architecture for stateful set containers, which relies on an "agent matrix" to map operator and agent versions which led to a sheer amount of images.
  • We solve this by shifting to a 3-container setup. This new design eliminates the need for the operator-version/agent-version matrix by adding one additional container containing all required binaries. This architecture maps to what we already do with the mongodb-database container.

Other Changes

  • Optional permissions for PersistentVolumeClaim moved to a separate role. When managing the operator with Helm it is possible to disable permissions for PersistentVolumeClaim resources by setting operator.enablePVCResize value to false (true by default). When enabled, previously these permissions were part of the primary operator role. With this change, permissions have a separate role.
  • subresourceEnabled Helm value was removed. This setting used to be true by default and made it possible to exclude subresource permissions from the operator role by specifying false as the value. We are removing this configuration option, making the operator roles always have subresource permissions. This setting was introduced as a temporary solution for this OpenShift issue. The issue has since been resolved and the setting is no longer needed.

@MaciejKaras MaciejKaras changed the base branch from master to maciejk/ar-use-calculate-version August 11, 2025 18:40
@MaciejKaras MaciejKaras changed the base branch from maciejk/ar-use-calculate-version to maciejk/use-ar-related-versions August 11, 2025 18:41
@MaciejKaras MaciejKaras changed the title CLOUDP-295785 - add pipeline_main.py extended help CLOUDP-295785 - add pipeline_main.py extended help Aug 11, 2025
@MaciejKaras MaciejKaras added skip-changelog Use this label in Pull Request to not require new changelog entry file and removed skip-changelog Use this label in Pull Request to not require new changelog entry file labels Aug 11, 2025
@MaciejKaras MaciejKaras marked this pull request as ready for review August 11, 2025 18:55
@MaciejKaras MaciejKaras requested a review from a team as a code owner August 11, 2025 18:55
@MaciejKaras MaciejKaras requested review from fealebenpae and lucian-tosa and removed request for a team August 11, 2025 18:55
Base automatically changed from maciejk/use-ar-related-versions to master August 12, 2025 10:58
# Conflicts:
#	scripts/release/atomic_pipeline.py
#	scripts/release/pipeline_main.py
type=str,
choices=supported_scenarios,
help=f"""Override the build scenario instead of inferring from environment. Options: {", ".join(supported_scenarios)}.
Default is to infer from environment variables. For '{BuildScenario.DEVELOPMENT}' the '{BuildScenario.PATCH}' scenario is used to read values from 'build_info.json'""",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think

For '{BuildScenario.DEVELOPMENT}' the '{BuildScenario.PATCH}' scenario is used to read values from 'build_info.json

is confusing.

Depending on if we decide to change this behaviour or keep it, we may want to add a sentence to explain why.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm still not entirely sure what direction we should go. DEVELOPMENT makes sense, but we rarely build our own images, rather instruct evg to build it for us. We can reuse PATCH configuration to build everything we want by overriding other settings like registry and build scenario

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will add a task to our todo list to clean this up later

@MaciejKaras MaciejKaras merged commit 3d0c8e7 into master Aug 12, 2025
35 of 38 checks passed
@MaciejKaras MaciejKaras deleted the maciejk/ar-pipeline-help branch August 12, 2025 13:11
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.

3 participants