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

Update from Docker to OCI metadata broke builds with maven-jib #1259

Closed
bijou-code opened this issue Mar 13, 2023 · 7 comments
Closed

Update from Docker to OCI metadata broke builds with maven-jib #1259

bijou-code opened this issue Mar 13, 2023 · 7 comments

Comments

@bijou-code
Copy link

bijou-code commented Mar 13, 2023

Describe the bug
This PR changed the metadata type of the distroless image from docker to OCI. It is breaking many builds accross our organization because we use the maven-jib-plugin:3.2.0 from last march, which doesn't support the OCI metadata format. Since there are no tags maintained for older versions of the distroless containers (specifically java17-debian11), we cannot refer to an older version (from yesterday, even) in order to temporarily fix our builds while we perform an investigation into the major-version update of the jib plugin. Was there an announcement regarding this metadata change? if so, where can I look for information like this in the future?

To Reproduce
Steps to reproduce the behavior: run a skaffold build using the older JIB version-

 skaffold dev --port-forward --tail --status-check=false --trigger=manual --cache-artifacts=false

Expected behavior
There to be an announcement, notice of deprecation, or some communication.

Console Output

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.0:dockerBuild (default-cli) on project platform-example-java: Tried to pull image manifest for gcr.io/distroless/java17-debian11:latest but failed because: Manifest with tag 'latest' has media type 'application/vnd.oci.image.index.v1+json', but client accepts 'application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json,application/vnd.docker.distribution.manifest.list.v2+json'.: 404 Not Found
[ERROR] {"errors":[{"code":"MANIFEST_UNKNOWN","message":"Manifest with tag 'latest' has media type 'application/vnd.oci.image.index.v1+json', but client accepts 'application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json,application/vnd.docker.distribution.manifest.list.v2+json'."}]}

Additional context
Happy to provide any required context

@bijou-code bijou-code changed the title Update from Docker to OCI metadata broke Update from Docker to OCI metadata broke builds with maven-jib Mar 13, 2023
@loosebazooka
Copy link
Member

Yeah support for oci-indexes was added 6 months ago in jib. I recommend you just update your version of Jib.

In the meantime, if you need to the older build of gcr.io/distroless/java17-debian11... the last docker based build was:
https://console.cloud.google.com/gcr/images/distroless/global/java17-debian11@sha256:7c035b36d792b1a067d7a9eb86b444b9c42ba8e885b6d537860437dc30df0306/details

@loosebazooka
Copy link
Member

loosebazooka commented Mar 13, 2023

You can also point to the architecture specific version (which is not a list)
gcr.io/distroless/java17-debian11:latest-amd64

@bijou-code
Copy link
Author

Yeah, I do realize that we'll need to update to maven-jib-plugin:3.3+ to fix the issue on our end. Thank you for pointing me at the last docker-based build. It just caught us by surprise, and is currently affecting ~70 application teams in our org which slows the roll out. Is there any good way to know about changes like this in advance? Things that might affect pulling images or the container structure?

@bijou-code
Copy link
Author

Also, I just want to say: Thank you for responding so quickly, and with helpful information. I really appreciate it.

@loosebazooka
Copy link
Member

Yeah no problem, please let us know if the transition causes anymore breakages and we can find a solution.

@loosebazooka
Copy link
Member

Yeah I didn't realize this would cause breakages, so I didn't make an annoucement. But usually major changes are announced on distroless-users@googlegroups.com

@bijou-code
Copy link
Author

Perfect: we'll be sure to hop on the mailing list. And, I don't anticipate that anything will go wrong, but I'll be sure to let you know if it does.

Thanks again!

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

2 participants