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

Cannot package OCI image when 'docker.io/paketobuildpacks/new-relic' is provided as a buildpack #43126

Closed
RobertoGraham opened this issue Nov 12, 2024 · 4 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@RobertoGraham
Copy link

RobertoGraham commented Nov 12, 2024

Spring Boot version: 3.2.6.
Docker Engine version: 27.3.1.

When running Spring Boot Gradle Plugin's bootBuildImage task while providing the alternate set of buildpacks below, I observe a failure. Reproducer: https://github.com/RobertoGraham/spring-boot-buildpack-bug/tree/31900583887eb0a05730d89b50a1acaecb9eb822.

tasks.named<BootBuildImage>("bootBuildImage") {
    buildpacks.set(listOf("urn:cnb:builder:paketo-buildpacks/java", "docker.io/paketobuildpacks/new-relic"))
    bindings.set(listOf("${layout.projectDirectory.dir("paketo-bindings")}:/platform/bindings"))
}
> Task :bootBuildImage
Building image 'docker.io/library/spring-boot-buildpack-bug:latest'

 > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:latest' ..................................................
 > Pulled builder image 'paketobuildpacks/builder-jammy-base@sha256:cc091c78cabb481e6abe97b1ae410993a028074a973eae9964e9271c59a8b08d'
 > Pulling run image 'docker.io/paketobuildpacks/run-jammy-base:latest' ..................................................
 > Pulled run image 'paketobuildpacks/run-jammy-base@sha256:8239d931b73e87afc5c9f446d89f6cc225bc0c4d0aed80c98312636e90254b28'
 > Pulling buildpack image 'docker.io/paketobuildpacks/new-relic:latest' ..................................................
 > Pulled buildpack image 'paketobuildpacks/new-relic@sha256:a33bac27dbe13d0f93da3719b235e3664b1fd016f124caedea44997d0e1d990a'
 > Executing lifecycle version v0.20.3
 > Using build cache volume 'pack-cache-0daef3812104.build'

 > Running creator
    [creator]     ===> ANALYZING
    [creator]     Image with name "docker.io/library/spring-boot-buildpack-bug:latest" not found
    [creator]     ===> DETECTING
    [creator]     ERROR: failed to initialize detector: open /cnb/buildpacks/paketo-buildpacks_new-relic/9.3.0/buildpack.toml: no such file or directory

> Task :bootBuildImage FAILED
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 12, 2024
@mhalbritter
Copy link
Contributor

Does this work when building the image with pack?

@mhalbritter mhalbritter added the status: waiting-for-feedback We need additional information before we can continue label Nov 13, 2024
@RobertoGraham
Copy link
Author

Does this work when building the image with pack?

@mhalbritter, yes, running this command in the root of my reproducer repository works: pack build --builder paketobuildpacks/builder-jammy-base --buildpack paketo-buildpacks/java --buildpack docker.io/paketobuildpacks/new-relic --trust-extra-buildpacks --volume $(pwd)/paketo-bindings:/platform/bindings spring-boot-buildpack-bug.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Nov 13, 2024
@scottfrederick
Copy link
Contributor

scottfrederick commented Nov 13, 2024

Possibly related to #39323 (comment)

@philwebb philwebb changed the title Cannot package OCI image when docker.io/paketobuildpacks/new-relic is provided as a buildpack. Cannot package OCI image when 'docker.io/paketobuildpacks/new-relic' is provided as a buildpack. Nov 13, 2024
@mhalbritter mhalbritter changed the title Cannot package OCI image when 'docker.io/paketobuildpacks/new-relic' is provided as a buildpack. Cannot package OCI image when 'docker.io/paketobuildpacks/new-relic' is provided as a buildpack Nov 14, 2024
@mhalbritter mhalbritter added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Nov 14, 2024
@mhalbritter mhalbritter added this to the 3.2.x milestone Nov 14, 2024
@philwebb philwebb self-assigned this Nov 14, 2024
@philwebb
Copy link
Member

We have a couple of issues causing this. The first is that we don't support nested index (as documented here). The second is the media type seems to have changed in the manifest fromtar.gzip to tar+gzip.

philwebb added a commit that referenced this issue Nov 14, 2024
Update `ExportedImageTar.IndexLayerArchiveFactory` to support nested
indexes. Nested indexes support a layer of interaction where the
`index.json` file points to a blob that contains the read index to use.

Prior to this commit, we only supported indexes provided directly by
the `index.json` file. This missing support results in "buildpack.toml:
no such file or directory" errors when referencing specific buildpacks
and using Docker Engine 27.3.1 or above.

See gh-43126
@philwebb philwebb modified the milestones: 3.2.x, 3.2.12 Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants