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

Image indexes are pushed even when only one platform is specified #325

Closed
Grmiade opened this issue Jan 25, 2024 · 10 comments
Closed

Image indexes are pushed even when only one platform is specified #325

Grmiade opened this issue Jan 25, 2024 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@Grmiade
Copy link

Grmiade commented Jan 25, 2024

Orb version

Since 9.0.2
Downgrading to 9.0.1 solves the issue.

What happened

When we use aws-ecr/build_image with only one platform, an image index is pushed to ECR. As if we had specified multiple platforms.

Expected behavior

When we use aws-ecr/build_image with only one platform, a simple image should be pushed to ECR. No image index.

@Grmiade Grmiade added the bug Something isn't working label Jan 25, 2024
@brivu
Copy link
Contributor

brivu commented Jan 25, 2024

Hey @Grmiade - Can you give me some more details and share your manifest so I can fix this issue?

@brivu brivu self-assigned this Jan 25, 2024
@Grmiade
Copy link
Author

Grmiade commented Jan 25, 2024

With 9.0.1

#25 exporting to image
#25 exporting layers
#25 exporting layers 2.3s done
#25 exporting manifest sha256:77096147698454ad0b8767a4e27c75a4d7607728959fa59820162e640294ad2d 0.0s done
#25 exporting config sha256:89f5bc15f3095238b10e89f62b7fa821d1ea34d048be4495a958db5172e47f8a 0.0s done
#25 pushing layers
#25 ...

#26 [auth] sharing credentials for ********************************************
#26 DONE 0.0s

#25 exporting to image
#25 pushing layers 2.8s done
#25 pushing manifest for ********************************************/**********:ed3c848c498cc6817fb430d9c85e8fdbea8c964b@sha256:77096147698454ad0b8767a4e27c75a4d7607728959fa59820162e640294ad2d
#25 pushing manifest for ********************************************/**********:ed3c848c498cc6817fb430d9c85e8fdbea8c964b@sha256:77096147698454ad0b8767a4e27c75a4d7607728959fa59820162e640294ad2d 0.4s done
#25 DONE 5.5s

With 9.0.2

#25 exporting to image
#25 exporting layers
#25 exporting layers 2.3s done
#25 exporting manifest sha256:a3f35f4719bdb98abcb47cd5e94bda0dea8b041cef897358d8e5849d8f21691f 0.0s done
#25 exporting config sha256:cdd90ffc4435b16fd0e76ea871ee23574a8765b33e1a59439074bcec54ce16a4 done
#25 exporting attestation manifest sha256:b5ee829261b1a6240b0da164747e82535ddb9fa31509d999c65d55fd5d78182f 0.0s done
#25 exporting manifest list sha256:9b68cba8615d1244679f53a06a021ba5034dc84d17fb0279bfd46198342438f0 0.0s done
#25 pushing layers
#25 ...

#25 exporting to image
#25 pushing layers 3.2s done
#25 pushing manifest for ********************************************/*******:b3b137207f14f39abf303dcc887cbb8fce3571aa@sha256:9b68cba8615d1244679f53a06a021ba5034dc84d17fb0279bfd46198342438f0
#25 pushing manifest for ********************************************/*******:b3b137207f14f39abf303dcc887cbb8fce3571aa@sha256:9b68cba8615d1244679f53a06a021ba5034dc84d17fb0279bfd46198342438f0 1.0s done
#25 DONE 6.7s

As you can see, with 9.0.2, it's a manifest list (composed image) which is pushed and no longer a manifest (simple image).

Screenshot 2024-01-25 at 23 20 18

@Grmiade
Copy link
Author

Grmiade commented Jan 25, 2024

FYI It seems to come from the change in the executor.
By using ubuntu-2004:2022.04.1, it works again.

@Grmiade
Copy link
Author

Grmiade commented Jan 25, 2024

Probably related to docker/buildx#1964

@brivu
Copy link
Contributor

brivu commented Jan 25, 2024

I think this is similar to #300 as well.

Can you let me know which executor you were using so I can reproduce the issue?

If you use ubuntu-2204:current, it seems to work. Let me know!

@Grmiade
Copy link
Author

Grmiade commented Jan 26, 2024

@brivu We have the issue with the executor you provide, which use ubuntu-2004:current.

@Grmiade
Copy link
Author

Grmiade commented Jan 26, 2024

@brivu I tested, and it seems we still have the issue with ubuntu-2204:current

@Grmiade
Copy link
Author

Grmiade commented Jan 26, 2024

In order to stay compatible with ECR, we should probably set --provenance to false if we want to update the ubuntu image to the latest version.
See docker/buildx#1509 (comment)

EDIT: I tested --provenance=false and it works 👍

@brivu
Copy link
Contributor

brivu commented Jan 30, 2024

Thank you for testing this and letting us know! I'll make a note of this for others

@Grmiade
Copy link
Author

Grmiade commented Jan 31, 2024

@brivu Should we include the flag provenance by default in the orb?
Since ECR is not compatible yet with this new Docker feature, it could make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants