Skip to content

Conversation

@mafredri
Copy link
Member

@mafredri mafredri commented Nov 20, 2024

This is most likely a bug in https://github.com/google/go-containerregistry, but we can work around it in Kaniko. In fact, the only bug in go-containerregistry may be that this behavior is allowed.

// Images in google/go-containerregistry don't support adding unique layers
// with duplicate diff IDs. For example, if the source image has an empty
// layer which has been compressed with Gzip level 3, and the layer we're
// adding is also an empty layer compressed with Gzip level 1, the diff IDs
// would match but the layer blobs would be different. This would cause an
// error when trying to upload the image to a registry as the manifest is
// referencing a blob that has been "overwritten".

Refs coder/envbuilder#385
Closes #34

@mafredri mafredri self-assigned this Nov 20, 2024
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

🎉

@JacobHenner
Copy link

Do you intend to open a PR against upstream?

@mafredri
Copy link
Member Author

Do you intend to open a PR against upstream?

@JacobHenner not currently. I’m still waiting for feedback from upstream maintainers to validate the correct approach.

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.

4 participants