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

Manifest creation fails #131

Closed
r4sas opened this issue Jan 25, 2023 · 21 comments
Closed

Manifest creation fails #131

r4sas opened this issue Jan 25, 2023 · 21 comments

Comments

@r4sas
Copy link

r4sas commented Jan 25, 2023

Hello.
Thank you for your workaround with docker containers merging with manifest.

Lately it start fail when trying to create manifest. Example output can be found here: https://github.com/PurpleI2P/i2pd/actions/runs/4001302421/jobs/6867928655

/usr/bin/docker manifest create --amend purplei2p/i2pd:latest purplei2p/i2pd:latest-amd64 purplei2p/i2pd:latest-i386 purplei2p/i2pd:latest-arm64 purplei2p/i2pd:latest-armv7
docker.io/purplei2p/i2pd:latest-amd64 is a manifest list

How can we fix this?

@auguwu
Copy link
Member

auguwu commented Jan 25, 2023

To be honest, I haven't really seen this error before when testing with the action itself! Can you create a mini repro of this?

The repository mentioned has amend: false but the output provided has the --amend flag, which shouldn't be in the command at all. I'll take a look at this in a bit.

@r4sas
Copy link
Author

r4sas commented Jan 25, 2023

I can try modify workflow and add amend: false manually if needed.

@auguwu
Copy link
Member

auguwu commented Jan 26, 2023

Please do! If it still continues to error, please tell so I can try to find some solutions!

@auguwu
Copy link
Member

auguwu commented Jan 26, 2023

The action actually forces amend: true in the docker manifest create command and doesn't amend: true in docker manifest push, I'll need to fix that in a few hours (and maybe you can try again when it is pushed?)

@r4sas
Copy link
Author

r4sas commented Jan 26, 2023

Just tested with amend: false, and looks like it is ignored: https://github.com/PurpleI2P/i2pd/actions/runs/4018882640/jobs/6905044176#step:7:5

@r4sas
Copy link
Author

r4sas commented Jan 26, 2023

The action actually forces amend: true in the docker manifest create command and doesn't amend: true in docker manifest push, I'll need to fix that in a few hours (and maybe you can try again when it is pushed?)

Ok, I'm waiting.

@auguwu
Copy link
Member

auguwu commented Jan 26, 2023

I have started to work on this in PR #133 (and I'll work on it when I get home).

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

@auguwu
Copy link
Member

auguwu commented Jan 27, 2023

I just got the issue right now:

I'll need to dive more into this

The issue is that the tag was already merged with linux/amd64 and linux/arm64, not seperately as a single manifest. Maybe using the tags: or platforms: input from docker/build-push-action@v2 as one?

tags: <registry>/<image>
# or
platforms: linux/amd64

instead of

tags: |
   a,
   b
# or
platforms: linux/amd64,linux/arm64

I'm sorry for all the hoops, but this is also really difficult to debug (since I didn't know how to reproduce this), but maybe try that solution or amend: true?

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

Not easier for me because linux/arm64 amd linux/armv7 platforms build takes too much time, that's why I build them in separate runner for each platform...

Look at workflow graph to understand: https://github.com/PurpleI2P/i2pd/actions/runs/4001302421

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

Untill last week everything works this way:

  • Workflow build every platform in separate runner
  • Uploads them as latest-<arch> tag
  • When all builders finished one more step started, which creates updated tag latest

@auguwu
Copy link
Member

auguwu commented Jan 27, 2023

Not easier for me because linux/arm64 amd linux/armv7 platforms build takes too much time, that's why I build them in separate runner for each platform...

Look at workflow graph to understand: https://github.com/PurpleI2P/i2pd/actions/runs/4001302421

Ah, I see that you only use one platform but multiple tags! I'm really sorry that I made this a bit worse (with a refactor that I been wanting to do for a while, but didn't have the time until now).

I'll try to find a workaround for this, sorry for all the hoops! ;w;

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

btw, I think that docker.io make some changes which broken everything...

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

And one more link: https://docs.docker.com/engine/reference/commandline/manifest/#create-and-push-a-manifest-list
Example shows that we must use different containers, not tags. But somehow merging of tags worked earlier? Hm...

@book000
Copy link

book000 commented Jan 27, 2023

Hello. I have also encountered this problem and have found a tentative solution, which I will share with you.

The solution is to add provenance: false to docker/build-push-action as follows:

      - name: Build and push Docker image
        uses: docker/build-push-action@v3.3.0
        with:
          context: .
          push: true
          platforms: ${{ matrix.platform }}
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          provenance: false

Related issues may be found here: docker/build-push-action#771

For specific fixes, see the following Pull requests: tomacheese/twitter-dm-memo#31
Action log before modification: https://github.com/tomacheese/twitter-dm-memo/actions/runs/4001345210
Action log after modification: https://github.com/tomacheese/twitter-dm-memo/actions/runs/4002014080

@auguwu
Copy link
Member

auguwu commented Jan 27, 2023

Thank you for a solution! I'll add it to the README and keep this issue open (or not? I don't know in this case)

auguwu added a commit that referenced this issue Jan 27, 2023
@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

@book000 thank you for solution, I'll try it soon.

@auguwu I have question about options names, I agree with extra-images -> inputs change, but why calling output image tag as images?

add:
One more, https://github.com/Noelware/docker-manifest-action#inputs - incorrect warning:

extra-images has been renamed to output

add2:
Maybe change extra-images to images and base-image to target or outputs?

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

images
Comma-seperated list of images that will be applied in the merged manifest from the inputs.

Isn't docker manifest create creates new one manifest? I don't think it applies changes to existing, and can read only one output per execution. Current action code supports execution for each target image in list?

@book000
Copy link

book000 commented Jan 27, 2023

@r4sas

add: One more, https://github.com/Noelware/docker-manifest-action#inputs - incorrect warning:

extra-images has been renamed to output

Please see #134 and #136

@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

Please see #134 and #136

Oops, haven't seen them before, thanks.
In that case, I think this issue can be closed for now.

@r4sas r4sas closed this as completed Jan 27, 2023
@r4sas
Copy link
Author

r4sas commented Jan 27, 2023

The solution is to add provenance: false to docker/build-push-action as follows:

It works. Thank you again.

yrashk added a commit to omnigres/omnigres that referenced this issue Mar 6, 2023
"X is a manifest list" error

Solution: disable provenance
(Noelware/docker-manifest-action#131)

as recommended in https://github.com/Noelware/docker-manifest-action
(and use this action as well)
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

No branches or pull requests

3 participants