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

Producing zero-size image on machine image ubuntu-2204:current #300

Closed
vatima2016 opened this issue Aug 24, 2023 · 7 comments
Closed

Producing zero-size image on machine image ubuntu-2204:current #300

vatima2016 opened this issue Aug 24, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@vatima2016
Copy link

Orb version

9.0.0
machine image: ubuntu-2204:current

What happened

After updating from 8.2.1 to 9.0.0 there are generated one image index, one zero-size image and one non-zero-size image.
aws-ecr-orb 2023-08-24 a las 10 45 56

Old usage:

# 8.2.1 - image tag 0.6.3-8433
- aws-cli/setup:
    role_arn: <<parameters.role_arn>>
- aws-ecr/build-and-push-image:
    repo: <<parameters.repo>>
    create-repo: false
    platform: <<parameters.platform>>
    skip-when-tags-exist: false
    dockerfile: <<parameters.dockerfile>>
    tag: <<parameters.tag>>
    no-output-timeout: 20m
    checkout: false
    attach-workspace: false
    workspace-root: ~/project
    registry-id: AWS_ACCOUNT_ID

New usage:

# 9.0.0  - image tag 0.6.3-8466
- aws-ecr/build_and_push_image:
    repo: <<parameters.repo>>
    create_repo: false
    platform: <<parameters.platform>>
    auth:
      - aws-cli/setup:
          role_arn: <<parameters.role_arn>>
    skip_when_tags_exist: false
    dockerfile: <<parameters.dockerfile>>
    tag: <<parameters.tag>>
    no_output_timeout: 20m
    checkout: false
    attach_workspace: false
    workspace_root: ~/project

Where:

platform: linux/arm64
machine:
    image: ubuntu-2204:current
      docker_layer_caching: true
    resource_class: arm.medium

Expected behavior

As far as the image should be generated for the only platform I'd expect either the old behaviour producing the only image without any index or at least one index and one non-zero-size image.

Workaround

Pin machine image version to ubuntu-2204:2022.07.1

@vatima2016 vatima2016 added the bug Something isn't working label Aug 24, 2023
@fwhenin
Copy link

fwhenin commented Aug 29, 2023

i'm having the same problem

@Renkas
Copy link

Renkas commented Aug 29, 2023

same here ...

@AustinAMeyer
Copy link

I am having this same issue. It didn't show up until I switched to using Docker executor with cimg/deploy:2023.09.1. I was using the machine executor with ubuntu-2204:2022.07.1 and it would just build 1 image. It would be great if we could get his fixed up since I am making the move to ARM docker images now that they are available.

@itsyuvalcohen
Copy link

I'm experiencing the same problem, fixed after changing the executor to ubuntu-2204:2022.07.1

@brivu
Copy link
Contributor

brivu commented Jan 25, 2024

Hey everyone!

This was an image issue and has been fixed. I just tested this out on ubuntu-2204:current and compared the manifest to ubuntu-2204:2022.07.1 and they both don't have a zero sized image.

I'll close this out for now but please feel free to reopen if you all are still running into this issue.

Thanks again,
Brian

@brivu
Copy link
Contributor

brivu commented Jan 30, 2024

Hey everyone,

The seems to be an issue with docker and the latest version of the ubuntu that's causing this. To prevent this from happening, you can add the --provenance=false to the extra_build_args parameter.

Reference here #325 and here

-Brian

@brivu brivu closed this as completed Jan 30, 2024
@nicoalonsop
Copy link
Contributor

It also works if you add to a context or a project environment variable BUILDX_NO_DEFAULT_ATTESTATIONS with the value 1.

I preferred to do it this way since you don't need to change the code.

I will create a PR to add ENV plus bump the executor to use ubuntu-22-04:current.

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

7 participants