-
Notifications
You must be signed in to change notification settings - Fork 110
feature(arch): Add VmArch enum for unified architecture handling across cloud providers #13266
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
Copilot
wants to merge
1
commit into
master
Choose a base branch
from
copilot/redo-first-commit-scylla-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+123
−24
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copilot
AI
changed the title
[WIP] Redo first commit based on Lukasz's comment
feature(arch): Add VmArch enum for unified architecture handling across cloud providers
Jan 20, 2026
fruch
reviewed
Jan 20, 2026
fruch
reviewed
Jan 20, 2026
fruch
reviewed
Jan 20, 2026
soyacz
reviewed
Jan 20, 2026
Contributor
|
@copilot I'm missing a convert function for OCI backend |
Contributor
Author
Added VmArch enum to provide unified, type-safe architecture handling across different cloud backends. Conversion functions are placed in their respective cloud utility modules to keep provisioner.py cloud-agnostic. Changes include: - VmArch enum in sdcm/provision/provisioner.py with X86 and ARM values - vmarch_to_aws() in sdcm/utils/aws_utils.py (x86_64 or arm64) - vmarch_to_gcp() in sdcm/utils/gce_utils.py (X86_64 or ARM64) - vmarch_to_azure() in sdcm/provision/azure/utils.py (x64 or Arm64) - vmarch_to_oci() in sdcm/utils/oci_utils.py (x86_64 or aarch64) - Updated sct.py list_images command to use VmArch - Updated sdcm/utils/common.py image functions to use VmArch This provides a consistent approach to architecture handling and ensures that cloud-specific logic remains in the appropriate utility modules.
756804a to
89a27ef
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors architecture handling from AWS-specific
AwsArchTypeto a cloud-agnosticVmArchenum. This implements the first commit from PR #13165, excluding Azure ARM64 gallery split changes per review feedback.Key Changes:
VmArch enum (
sdcm/provision/provisioner.py):Cloud-specific conversion utilities (moved out of VmArch per review feedback):
vmarch_to_aws()insdcm/utils/aws_utils.py- converts to AWS format (x86_64/arm64)vmarch_to_gcp()insdcm/utils/gce_utils.py- converts to GCP format (X86_64/ARM64)vmarch_to_azure()insdcm/provision/azure/utils.py- converts to Azure format (x64/Arm64)vmarch_to_oci()insdcm/utils/oci_utils.py- converts to OCI format (x86_64/aarch64)TYPE_CHECKINGto avoid circular import issuesUpdated image retrieval functions (
sdcm/utils/common.py):VmArchinstead ofAwsArchTypeCLI updates (
sct.py):list_imagescommand accepts arch viaclick.Choice(["x86_64", "aarch64"])VmArchusing built-in enum value constructor for type-safe cloud API callsArchitecture:
The VmArch enum is now truly cloud-agnostic with conversion logic properly separated into cloud-specific modules. This separation of concerns ensures provisioner.py has no cloud-specific imports or logic, as intended. The implementation leverages Python's standard enum functionality without custom methods.
Not Included:
Azure ARM64 gallery split (separate gallery definitions per architecture) excluded as requested. Azure functions accept
archparameter but receiveNone- infrastructure ready for future implementation.Testing
PR pre-checks (self review)
backportlabelsReminders
sdcm/sct_config.py)unit-test/folder)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.