Skip to content
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

Azure: Add support for ARM64 Images [SPSTRAT-467] #71

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Azure: Add support for ARM64 Images [SPSTRAT-467] #71

merged 2 commits into from
Dec 11, 2024

Conversation

JAVGan
Copy link
Collaborator

@JAVGan JAVGan commented Nov 26, 2024

This PR introduces the support for publishing ARM64 images on Azure Marketplace through the product ingestion (Graph) API.

Since arm64 images just uses Gen2 it only preserves the logic of multiple generations for x64 and introduces a new SKU naming pattern of: "{planID}-{arch}" for arm64.

With this change, the publish method is able to process either x64 or arm64 images, one per call, as the metadata.architecture must indicate one or another when publishing.

This commit PR implements several unit tests to ensure the new funcionlity works as intended and doesn't break the existing one for x64.

Refers to SPSTRAT-467

@JAVGan JAVGan force-pushed the arm64 branch 3 times, most recently from b740fec to e59eff6 Compare November 26, 2024 22:19
@JAVGan
Copy link
Collaborator Author

JAVGan commented Nov 26, 2024

@lslebodn this is my draft for supporting ARM64 images.

I will still add more tests to ensure it works as intended.

The tests already cover:

  • Updating SKUs when only x64 (both gen1 and/or gen2)
  • Updating SKUs when only arm64
  • Updating SKUs when both are set (arm64 + x64) in different orders
  • Publishing arm64 only

Missing (TO DO):

  • Test mixed publishing (arm64 + x64 in any order)

@JAVGan JAVGan force-pushed the arm64 branch 2 times, most recently from ca14541 to 23101fe Compare November 27, 2024 22:31
@JAVGan
Copy link
Collaborator Author

JAVGan commented Nov 27, 2024

@lslebodn PTAL at the commit 23101fe

I've added it to this PR but depending on the release schedule we might need to create a separate PR for it, as releasing #68 without this patch will probably cause issues.

@JAVGan JAVGan changed the title Azure: Add support for ARM64 Images Azure: Add support for ARM64 Images [SPSTRAT-467] Nov 29, 2024
@JAVGan JAVGan marked this pull request as ready for review November 29, 2024 13:01
@JAVGan
Copy link
Collaborator Author

JAVGan commented Nov 29, 2024

@lslebodn @jajreidy PTAL

Copy link
Collaborator

@jajreidy jajreidy left a comment

Choose a reason for hiding this comment

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

LGTM

This commit introduces the support for publishing ARM64 images on Azure
Marketplace through the product ingestion (Graph) API.

Since `arm64` images just uses `Gen2` it only preserves the logic of
multiple generations for `x64` and introduces a new SKU naming pattern
of: "{planID}-{arch}" for `arm64`.

With this change, the `publish` method is able to process either `x64`
or `arm64` images, one per call, as the `metadata.architecture` must
indicate one or another when publishing.

This commit also implements several unit tests to ensure the new
funcionlity works as intended and doesn't break the existing one for
`x64`.
The PR #68 removed the loop iteration over all SKUs which were not
required for detecting the default/alternate generations for `x64`,
however such iteration is required to detect the `security_type`.

This commit fixes it by creating a dedicated helper function
`_get_security_type` for this purpose only.
@JAVGan JAVGan merged commit 6837420 into main Dec 11, 2024
22 checks passed
@JAVGan JAVGan deleted the arm64 branch December 11, 2024 13:43
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