buildpacks icon indicating copy to clipboard operation
buildpacks copied to clipboard

possible mismatch between stacks/google_gae_22/run-packages.txt and Google Cloud documentation

Open StephenWithPH opened this issue 1 year ago • 4 comments

I'm looking at the contents of:

https://github.com/GoogleCloudPlatform/buildpacks/blob/168979fb9ddcd007228f5593a43c141e8f8bcd25/stacks/google_gae_22/run-packages.txt#L1-L129

.. whose associated readme suggests determines the packages in us-docker.pkg.dev/serverless-runtimes/google-22-full/run:

https://github.com/GoogleCloudPlatform/buildpacks/blob/168979fb9ddcd007228f5593a43c141e8f8bcd25/stacks/google_gae_22/README.md#L6-L10

Should those packages align with the list of packages on https://cloud.google.com/docs/buildpacks/stacks#google-22-full ?

Specifically, the Google Cloud docs show liblcms2-2 2.12~rc1-2build2 included in the google-22-full stack, but that package does not appear in this repo's stacks/google_gae_22/run-packages.txt .

StephenWithPH avatar Dec 11 '24 18:12 StephenWithPH

For clarity, I'm looking into this due to the apparent absence of liblcms2.so.2 in a Google Cloud buildpacks-built JVM application. It's a vanilla build, deployed to Cloud Run.

It strikes me as odd that we're encountering this error, since the Ubuntu jre (which is what I think corresponds to these log lines):

 [builder] === Java - Runtime ([email protected]) ===
[builder] Using requested runtime feature version: 21
[builder] 2024/12/10 22:07:27 [DEBUG] GET https://dl.google.com/runtimes/ubuntu2204/canonicaljdk/version.json
[builder] ***** CACHE MISS: "canonicaljdk"
[builder] Installing  v21.0.5+11-Ubuntu-1ubuntu122.04.
[builder] 2024/12/10 22:07:27 [DEBUG] GET https://dl.google.com/runtimes/ubuntu2204/canonicaljdk/canonicaljdk-21.0.5_11-Ubuntu-1ubuntu122.04.tar.gz

... has a transitive dependency on that:

https://packages.ubuntu.com/jammy/openjdk-21-jre -> https://packages.ubuntu.com/jammy/openjdk-21-jre-headless -> https://packages.ubuntu.com/jammy/liblcms2-2 .

I can't find enough insight on the machinery that gcr.io/buildpacks/builder:latest uses to assemble all of the pieces, so I don't know if that dependency is getting dropped somewhere.

There is this issue in the unrelated distroless repo which suggests that something might be missing here: https://github.com/GoogleContainerTools/distroless/issues/329

StephenWithPH avatar Dec 11 '24 19:12 StephenWithPH

Please consider https://cloud.google.com/docs/buildpacks/stacks#google-22-full as the final list. Some packages listed at buildpacks/stacks/google_gae_22/run-packages.txt may have dependencies which would also get installed. Hence the final list is much more comprehensive as compared to the txt.

Are you facing an error while running the build or your application?

HarshaliRaka avatar Feb 20 '25 04:02 HarshaliRaka

Are you facing an error while running the build or your application?

Yes, we did face a runtime error due to the absence of liblcms2.so.2.

StephenWithPH avatar Feb 20 '25 15:02 StephenWithPH

@StephenWithPH Can you specify what is the error? We can debug that specific error

HarshaliRaka avatar Feb 21 '25 06:02 HarshaliRaka