Skip to content

Conversation

nammn
Copy link
Collaborator

@nammn nammn commented Aug 20, 2025

Summary

This pull request refactors the agent build and validation logic to improve multi-architecture support and maintainability. It centralizes platform mapping logic, simplifies platform-specific filename resolution, and updates configuration files to reflect platform support changes. Additionally, it documents the new multi-architecture capabilities in the changelog.

Multi-architecture support and configuration updates:

  • Updated build_info.json to restrict supported platforms for all images to only linux/amd64, removing arm64, s390x, and ppc64le from all relevant entries. [1] [2] [3] [4] [5] [6] [7] [8]
  • Changed the key in build_info_agent.json from platform_mappings to platforms for consistency and clarity.

Agent build and validation code refactoring:

  • Introduced a PlatformConfiguration class in validation.py to encapsulate platform mapping logic, lazy-load build info, and provide unified methods for generating agent and tools build arguments.
  • Refactored functions to use the new platforms key and centralized filename resolution logic, including helper methods for finding valid filenames and checking URL existence. [1] [2] [3] [4] [5]
  • Updated import statements and removed now-redundant code in atomic_pipeline.py to use the new build argument generation functions from the refactored validation logic. [1] [2]
  • Removed unused imports and cleaned up code in atomic_pipeline.py.

Documentation:

  • Added a changelog entry describing the addition of comprehensive multi-architecture support for the Kubernetes operator and its images.

Proof of Work

  • green ci

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?

@nammn nammn requested a review from a team as a code owner August 20, 2025 11:12
@nammn nammn requested review from m1kola, MaciejKaras and lucian-tosa and removed request for a team August 20, 2025 11:13
build_info.json Outdated
Comment on lines 24 to 25
"platforms": [
"linux/arm64",
"linux/amd64",
"linux/s390x",
"linux/ppc64le"
"linux/amd64"
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove the platforms from the release stage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

accident! Let me add it back

@@ -1,5 +1,5 @@
{
"platform_mappings": {
"platforms": {
"linux/amd64": {
"agent_suffixes": ["linux_x86_64.tar.gz"],
"tools_suffix": "rhel93-x86_64-{TOOLS_VERSION}.tgz",
Copy link
Contributor

Choose a reason for hiding this comment

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

should we have an array of suffixes for tools as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmmmm yeah probably cleaner, let me do so

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done 4b98d0e

@nammn nammn requested a review from lucian-tosa August 20, 2025 13:07
build_info.json Outdated
Comment on lines 119 to 122
"linux/arm64",
"linux/amd64",
"linux/s390x",
"linux/ppc64le"
Copy link
Contributor

Choose a reason for hiding this comment

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

OM is not built for these platforms, the init image doesn't need to be

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 don't lose anything by doing so - i would just add them as this streamlines all the binaries we own

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh - they are close to timeout limit. I do wonder why. Yeah I can kick it off

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

build_info.json Outdated
Comment on lines 129 to 132
"linux/arm64",
"linux/amd64",
"linux/s390x",
"linux/ppc64le"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@nammn nammn merged commit 489c791 into multi-arch-pipeline-combined Aug 20, 2025
5 of 7 checks passed
@nammn nammn deleted the multi-refactoring-arch branch August 20, 2025 14:06
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.

2 participants