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

feat: support different architectures when copying images #570

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

uncledru
Copy link

@uncledru uncledru commented Mar 15, 2024

Fixes #568

Currently we can only copy images for the amd64 architecture. copy supports ArchitectureChoice which is leveraged in this PR. If no Architecture is provided the current behavior applies (uses the platform architecture, which is x86).

auto-merge was automatically disabled March 15, 2024 21:05

Head branch was pushed to by a user without write access

@deepend-dev
Copy link

Great PR @uncledru. Even I am looking for this feature.

@deepend-dev
Copy link

It will be great if @wchaws can look into this

@uncledru
Copy link
Author

uncledru commented Aug 2, 2024

also tagging @rix0rrr

@AdamPavlat
Copy link

Hi, awesome and useful feature, please make it happen soon. 😄 Thanks.

@BwL1289
Copy link

BwL1289 commented Sep 12, 2024

Is there an update on this?

@@ -90,7 +90,7 @@
],
"main": "lib/index.js",
"license": "Apache-2.0",
"version": "0.0.0",
"version": "3.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

please revert

Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

please add a new test case using and asserting the new feature, keeping the old test case as it was.

If the old test case also needs to be changed, please explain why.

@@ -184,3 +214,13 @@ func GetSecret(secretId string) (secret string, err error) {
}
return *resp.SecretString, nil
}

func IsValidGOARCH(arch string) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this used?

Copy link
Contributor

Choose a reason for hiding this comment

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

what is this file doing? Why was it added?

Copy link
Contributor

Choose a reason for hiding this comment

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

please add e new test.

Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

This is good. Some housekeeping comments.

We should also include OSChoice and VariantChoice as well.

https://github.com/containers/image/blob/v5.21.0/types/types.go#L579-L583

@@ -31,6 +31,11 @@ export interface ECRDeploymentProps {
*/
readonly dest: IImageName;

/**
* The architecture of the docker images to copy.
Copy link
Contributor

@mrgrain mrgrain Oct 8, 2024

Choose a reason for hiding this comment

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

Suggested change
* The architecture of the docker images to copy.
* The architecture of the docker images to copy.
*
* @default "x86"

@@ -192,6 +197,7 @@ export class ECRDeployment extends Construct {
SrcCreds: props.src.creds,
DestImage: props.dest.uri,
DestCreds: props.dest.creds,
Architecture: props.architecture,
Copy link
Contributor

Choose a reason for hiding this comment

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

I reckon we should fix this and move away from defaulting to the lambda architecture to explicitly defining a default here.

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.

Support for arm64 copies
5 participants