Skip to content

CLOUDP-295785 - using build_info.json in new atomic pipeline #317

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

Open
wants to merge 85 commits into
base: master
Choose a base branch
from

Conversation

MaciejKaras
Copy link
Collaborator

@MaciejKaras MaciejKaras commented Aug 6, 2025

Summary

This PR focuses on using build_info.json information in atomic_pipeline.py code. The logic is mostly hidden in image_build_config_from_args function. It is binding the parts from:

Section in Atomic Releases TD that describes the build_info.json and how it is used in the image building process.

  • Added signing configuration in build_info.json
  • Added missing meko-tests and mco-tests images in build_info.json
  • Added configuration for agent and ops-manager images in build_info.json
  • Moved images_signing.py from scripts/evergreen/release
  • Simplifications in the existing code

Proof of Work

CI tests passing + updated unit tests

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.
Julien-Ben and others added 11 commits August 8, 2025 12:01
This reverts commit c6fc163.
…d-versions

# Conflicts:
#	scripts/release/atomic_pipeline.py
#	scripts/release/build/image_build_process.py
#	scripts/release/build_context.py
…d-versions

# Conflicts:
#	scripts/release/atomic_pipeline.py
#	scripts/release/build/image_build_process.py
#	scripts/release/pipeline_main.py
@MaciejKaras MaciejKaras marked this pull request as ready for review August 8, 2025 14:18
@MaciejKaras MaciejKaras requested a review from a team as a code owner August 8, 2025 14:18
@MaciejKaras MaciejKaras requested review from anandsyncs, Julien-Ben, nammn, lucian-tosa and viveksinghggits and removed request for a team and anandsyncs August 8, 2025 14:18
Base automatically changed from julienben/redesign-pipeline to master August 8, 2025 14:49
@@ -6,9 +6,7 @@
#
# Ref: https://cryptography.io/en/latest/installation/#building-cryptography-on-linux
#
ARG GOLANG_VERSION
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 chagne?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to align with other Dockerfiles, where Golang version is specified in base image


expected_build_info = BuildInfo(
images={
"mongodbOperator": ImageInfo(
"operator": ImageInfo(
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you change the name to match what you've defined in build_info? was it generally a unification effort to extract all into shared const?

Copy link
Collaborator

Choose a reason for hiding this comment

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

should we use the const here instead of strings?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

did you change the name to match what you've defined in build_info? was it generally a unification effort to extract all into shared const?
yes, I'm using for example scripts.release.build.build_info.OPERATOR_IMAGE const vars

this is only the unit test. I can use constants or for better verbosity use hardcoded strings.

elif is_patch or is_evg:
scenario = BuildScenario.PATCH
logger.info(f"Build scenario: {scenario} (patch_id: {patch_id})")
# TODO: Uncomment the following lines when starting to work on staging builds
Copy link
Collaborator

Choose a reason for hiding this comment

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

but this is unrelated to patches, right? Its only for master merges?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, this is to not break the master merges. The next PR will target staging builds particularly

DEVELOPMENT = "development" # Local build on a developer machine

@classmethod
def infer_scenario_from_environment(cls) -> "BuildScenario":
Copy link
Collaborator

Choose a reason for hiding this comment

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

i know we have a ticket for this, but wanted to say this again - such high important infer scenarios - we should have metrics for them

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 would also like to provide scenario and version from the outside of the script. This is on my list and we will do this in Atomic Releases definitely - I've added it to our tasks

"""
Builds image used to run tests.
"""

Copy link
Collaborator

Choose a reason for hiding this comment

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

so we don't need the image_name here in the function anymore since we tightly couple this (and other) functions to a specific build_configuration which gets its information from build_info , right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, we will move most of the configuration to build_info.json, including Dockerfile location and docker args

def build_om_image(build_configuration: ImageBuildConfiguration):
# Make this a parameter for the Evergreen build
# https://github.com/evergreen-ci/evergreen/wiki/Parameterized-Builds
om_version = os.environ.get("om_version")
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we somehow extract this out of the pipeline?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes! All of the versions should be provided from outside, not from within the pipeline. This will be done in subsequent iterations and is added to our task list.

# Conflicts:
#	scripts/release/atomic_pipeline.py
#	scripts/release/pipeline_main.py
@Julien-Ben Julien-Ben mentioned this pull request Aug 11, 2025
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