nodejs icon indicating copy to clipboard operation
nodejs copied to clipboard

Node change to 3.0.1 causes embedded daemon response: max depth exceeded]

Open pbrumm opened this issue 1 year ago • 6 comments

rolling back to node 3.0.0 and [email protected] has fixed the issue.

not sure why the latest shows node going to 3.0.1 and node-engine going back to 4.1.0

pbrumm avatar Jul 05 '24 15:07 pbrumm

We'll need a bit more details in terms of a recreate. Also the comment about the latest going back to 4.1.0 does not make sense to me as this is what I see in terms of what is tagged for 3.0.1 and it shows 4.1.1 for node-engine/

https://github.com/paketo-buildpacks/nodejs/commit/65d75dbece53dd8be28ef27c87f650c6e8847986

mhdawson avatar Jul 18 '24 21:07 mhdawson

Looking at the info for 3.0.1 it also seems to show 4.1.1 - https://github.com/paketo-buildpacks/nodejs/releases/tag/v3.0.1

mhdawson avatar Jul 18 '24 21:07 mhdawson

I am wondering if it is related to this change.

the ca-certificates jumped from 3.6.7 to 3.8.3

https://github.com/paketo-buildpacks/nodejs/commit/91996d199e37e80ce1299dd39bd2877d7c825ace#diff-ac294531171abf4d8779df7ea98b67560755c4e8329248e8b627624078011f6dL36

here is the diff https://github.com/paketo-buildpacks/ca-certificates/compare/v3.6.7...v3.8.3

pbrumm avatar Aug 01 '24 18:08 pbrumm

I can't work around this at this point. so I am blocked.

from the looks of it. something is causing nodejs to get added multiple times.

Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' with same contents is already being added, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Buildpack 'paketo-buildpacks/[email protected]' already exists on builder with same contents, skipping... Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:afbe3824c5e262c7477b3e7d10c6aea30fcfc0744eff9a5ed05447d0cb10847d) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:aefeb9e501b74a1efceddb06a507a46c00a108afe68a9fb6ca90067836cb6613) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:809924f48fbfc71a1bcdb7f55722ebb2b0f07e6faba05e464fcf180b82dc5799) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:0e6907834aa6a64a5a4ff47b3b2e775aeb82c71e77fa6cdbe71bc9861f1b6137) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:4f071b74cd1620c9952ccc00dc09e347a34b7a18ee06cf331877be6dcf518727) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:8e6a03bd93a13577753ea7ab5e48f35067b647f5b315a252e19138dbd2cfef35) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:3dd778bef8c93f324048b06c13dadda101e64e7688976a408d39b8bd284f8219) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:d26190118848b6866eab4c00c4dbf30fcda95fa181d344eaf683f9baa3ad709d) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:5566626bed91bf0ce2e644e6af797fe9f85dc33cdb8b82bb47843ac24e9b090c) Step #2: Adding buildpack 'paketo-buildpacks/[email protected]' (diffID=sha256:8d898dc4955c9171307101195f1f60b9b3e57b0377a1149aca8b7911fcd01c16) Step #2: Provided Environment Variables

and before it identifies the active buildpacks it bombs out.

pbrumm avatar Aug 01 '24 19:08 pbrumm

We'll need a bit more details in terms of a recreate.

mhdawson avatar Aug 06 '24 15:08 mhdawson

This is a very basic rails 7 project that is just using the default settings and is using node and yarn to compile the assets

after the updates above it is now including many more buildpacks than needed and hits the docker limit.

Another client of mine is experiencing the same issue. I can try to create a simple rails example but it may be a bit before I can get it ready.

pbrumm avatar Aug 06 '24 15:08 pbrumm

I'm not sure how to get the debug info from https://github.com/paketo-buildpacks/nodejs/issues/894#issuecomment-2263769245, but I can trigger max depth succeeded with an empty directory: pack build foo --builder paketobuildpacks/builder-jammy-full --buildpack paketo-buildpacks/nodejs

using builder-jammy-base doesn't fail

cg2v avatar Aug 30 '24 19:08 cg2v

This is what I get with an empty directory with the latest pack and the current versions of the buildpacks:

user1@user1-VirtualBox:~/paketo/empty$ pack --version
0.35.1+git-3a22a7f.build-6099
user1@user1-VirtualBox:~/paketo/empty$ pack build foo --builder paketobuildpacks/builder-jammy-full --buildpack paketo-buildpacks/nodejs
latest: Pulling from paketobuildpacks/builder-jammy-full
Digest: sha256:6b3e21f7028db00dd6350ac06aa946b04569825db8a292506bfcb1f6e0ab4ea8
Status: Image is up to date for paketobuildpacks/builder-jammy-full:latest
latest: Pulling from paketobuildpacks/run-jammy-full
Digest: sha256:633afc365e8a91598467a04e9e4de133c05cd54d7eed16a0cda0ae5f6f716206
Status: Image is up to date for paketobuildpacks/run-jammy-full:latest
===> ANALYZING
Restoring data for SBOM from previous image
===> DETECTING
target distro name/version labels not found, reading /etc/os-release file
target distro name/version labels not found, reading /etc/os-release file
target distro name/version labels not found, reading /etc/os-release file
======== Output: paketo-buildpacks/[email protected] ========
no 'yarn.lock' file found in the project path /workspace
======== Output: paketo-buildpacks/[email protected] ========
no package.json file present
======== Output: paketo-buildpacks/[email protected] ========
could not find app in /workspace: expected one of server.js | server.cjs | server.mjs | app.js | app.cjs | app.mjs | main.js | main.cjs | main.mjs | index.js | index.cjs | index.mjs
======== Output: paketo-buildpacks/[email protected] ========
no 'yarn.lock' found in the project path /workspace
======== Output: paketo-buildpacks/[email protected] ========
SKIPPED: No procfile found from environment, source path, or binding.
======== Output: paketo-buildpacks/[email protected] ========
  Build Configuration:
    $BP_IMAGE_LABELS       arbitrary image labels
    $BP_OCI_AUTHORS        the org.opencontainers.image.authors image label
    $BP_OCI_CREATED        the org.opencontainers.image.created image label
    $BP_OCI_DESCRIPTION    the org.opencontainers.image.description image label
    $BP_OCI_DOCUMENTATION  the org.opencontainers.image.documentation image label
    $BP_OCI_LICENSES       the org.opencontainers.image.licenses image label
    $BP_OCI_REF_NAME       the org.opencontainers.image.ref.name image label
    $BP_OCI_REVISION       the org.opencontainers.image.revision image label
    $BP_OCI_SOURCE         the org.opencontainers.image.source image label
    $BP_OCI_TITLE          the org.opencontainers.image.title image label
    $BP_OCI_URL            the org.opencontainers.image.url image label
    $BP_OCI_VENDOR         the org.opencontainers.image.vendor image label
    $BP_OCI_VERSION        the org.opencontainers.image.version image label
SKIPPED: No supported environment variables were set
======== Results ========
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
fail: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
err:  paketo-buildpacks/[email protected] (1)
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
======== Output: paketo-buildpacks/[email protected] ========
no 'package.json' found in project path /workspace
======== Output: paketo-buildpacks/[email protected] ========
no package.json file present
======== Output: paketo-buildpacks/[email protected] ========
could not find app in /workspace: expected one of server.js | server.cjs | server.mjs | app.js | app.cjs | app.mjs | main.js | main.cjs | main.mjs | index.js | index.cjs | index.mjs
======== Output: paketo-buildpacks/[email protected] ========
no 'package.json' found in project path /workspace
======== Output: paketo-buildpacks/[email protected] ========
SKIPPED: No procfile found from environment, source path, or binding.
======== Output: paketo-buildpacks/[email protected] ========
  Build Configuration:
    $BP_IMAGE_LABELS       arbitrary image labels
    $BP_OCI_AUTHORS        the org.opencontainers.image.authors image label
    $BP_OCI_CREATED        the org.opencontainers.image.created image label
    $BP_OCI_DESCRIPTION    the org.opencontainers.image.description image label
    $BP_OCI_DOCUMENTATION  the org.opencontainers.image.documentation image label
    $BP_OCI_LICENSES       the org.opencontainers.image.licenses image label
    $BP_OCI_REF_NAME       the org.opencontainers.image.ref.name image label
    $BP_OCI_REVISION       the org.opencontainers.image.revision image label
    $BP_OCI_SOURCE         the org.opencontainers.image.source image label
    $BP_OCI_TITLE          the org.opencontainers.image.title image label
    $BP_OCI_URL            the org.opencontainers.image.url image label
    $BP_OCI_VENDOR         the org.opencontainers.image.vendor image label
    $BP_OCI_VERSION        the org.opencontainers.image.version image label
SKIPPED: No supported environment variables were set
======== Results ========
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
fail: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
err:  paketo-buildpacks/[email protected] (1)
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
======== Output: paketo-buildpacks/[email protected] ========
could not find app in /workspace: expected one of server.js | server.cjs | server.mjs | app.js | app.cjs | app.mjs | main.js | main.cjs | main.mjs | index.js | index.cjs | index.mjs
======== Output: paketo-buildpacks/[email protected] ========
SKIPPED: No procfile found from environment, source path, or binding.
======== Output: paketo-buildpacks/[email protected] ========
  Build Configuration:
    $BP_IMAGE_LABELS       arbitrary image labels
    $BP_OCI_AUTHORS        the org.opencontainers.image.authors image label
    $BP_OCI_CREATED        the org.opencontainers.image.created image label
    $BP_OCI_DESCRIPTION    the org.opencontainers.image.description image label
    $BP_OCI_DOCUMENTATION  the org.opencontainers.image.documentation image label
    $BP_OCI_LICENSES       the org.opencontainers.image.licenses image label
    $BP_OCI_REF_NAME       the org.opencontainers.image.ref.name image label
    $BP_OCI_REVISION       the org.opencontainers.image.revision image label
    $BP_OCI_SOURCE         the org.opencontainers.image.source image label
    $BP_OCI_TITLE          the org.opencontainers.image.title image label
    $BP_OCI_URL            the org.opencontainers.image.url image label
    $BP_OCI_VENDOR         the org.opencontainers.image.vendor image label
    $BP_OCI_VERSION        the org.opencontainers.image.version image label
SKIPPED: No supported environment variables were set
======== Results ========
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
err:  paketo-buildpacks/[email protected] (1)
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
ERROR: No buildpack groups passed detection.
ERROR: failed to detect: buildpack(s) failed with err
ERROR: failed to build: executing lifecycle: failed with status code: 21
user1@user1-VirtualBox:~/paketo/empty$ 

mhdawson avatar Sep 30 '24 15:09 mhdawson

I also tried with a simple application and it also builds ok (as expected since this is covered in the integration tests.

mhdawson avatar Sep 30 '24 15:09 mhdawson

@pbrumm to investigate further we really need a list of steps to run which reproduces as well as confirmation that you are using recent pack version and which environment you are running in (for example I ran the tests above in ubuntu 22)

mhdawson avatar Sep 30 '24 15:09 mhdawson

I have had to transition my project away from paketo and to a custom docker setup.

I would guess that the issue was related to including .npmrc and .yarnrc for asset compilation.

pbrumm avatar Sep 30 '24 15:09 pbrumm

The challenge and complexity I ran into was that once it is broken there is no moving forward unless it is resolved by paketo.

the automated first of the month releases caused too much instability.

pbrumm avatar Sep 30 '24 15:09 pbrumm

I can confirm that as of today, with a new pull of the builder image, both the empty directory and the python w/node frontend app I was trying to package no longer trigger the max depth error.

Using the old builder image, with the metadata below, still triggers the error. The error is triggered before analysis begins.

"io.buildpacks.stack.description": "ubuntu:jammy with compilers and common libraries and utilities",
"io.buildpacks.stack.distro.name": "ubuntu",
"io.buildpacks.stack.distro.version": "22.04",
"io.buildpacks.stack.homepage": "https://github.com/paketo-buildpacks/jammy-full-stack",
"io.buildpacks.stack.id": "io.buildpacks.stacks.jammy",
"io.buildpacks.stack.maintainer": "Paketo Buildpacks",
"io.buildpacks.stack.metadata": "{}",
"io.buildpacks.stack.mixins": "null",
"io.buildpacks.stack.released": "2024-08-16T02:49:28Z",

cg2v avatar Sep 30 '24 16:09 cg2v

@cg2v thanks for confirming that it seems to be resolved in the current versions of the builders.

@pbrumm sorry to hear that you had to move to a different approach.

I'm going to close this out since it seems to be resolved.

mhdawson avatar Oct 10 '24 13:10 mhdawson