paketo-buildpacks/packit

packit/postal/service.go - Possibly eating error info?

Closed this issue · 1 comments

What happened?

I am running a simple NodeJS build and the build stops with just the following error (even with the debug option turned on)
pack build cnb/buildpack-node-api --volume "${PWD}/bindings:/platform/bindings"

Error message:
failure checking out the bindings

The challenge is that this problem is reproducible on my machine, but not others. In addition, because the code appears to eat the error, its not clear how to resolve this issue. The error message comes from here. My guess is that this line can be changed from this:

return fmt.Errorf("failure checking out the bindings")

to something like:

return fmt.Errorf("failure checking out the bindings: %s", err)

So that we can see what the actual error message is to further debug.

  • What were you attempting to do?
    Run a simple NodeJS build

  • What did you expect to happen?
    I expected the build to complete successfully or provide enough detail to debug the problem

  • What was the actual behavior? Please provide log output, if possible.

===> BUILDING

Paketo CA Certificates Buildpack 2.3.2
  https://github.com/paketo-buildpacks/ca-certificates
  Launch Helper: Contributing to layer
    Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
  CA Certificates: Contributing to layer
    Added 1 additional CA certificate(s) to system truststore
    Writing env.build/SSL_CERT_DIR.append
    Writing env.build/SSL_CERT_DIR.delim
    Writing env.build/SSL_CERT_FILE.default
Paketo Node Engine Buildpack 0.6.2
  Resolving Node Engine version
    Candidate version sources (in priority order):
      package.json -> "14.17.5"
      <unknown>    -> ""

    Selected Node Engine version (using package.json): 14.17.5

  Executing build process
    Installing Node Engine 14.17.5
failure checking out the bindings
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51

Build Configuration

MacOS, Docker Desktop

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.
    Pack version: 0.20.0+git-66a4f32.build-2668

  • What buildpacks are you using? Please include versions.
    paketo-buildpacks/ca-certificates 2.3.2
    paketo-buildpacks/node-engine 0.6.2
    paketo-buildpacks/yarn 0.4.0
    paketo-buildpacks/yarn-install 0.4.0
    paketo-buildpacks/node-module-bom 0.1.0
    paketo-buildpacks/yarn-start 0.2.0

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
    Paketo Base

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

Checklist

  • I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.
fg-j commented

Thanks for thoroughly reporting this issue. It certainly seems like we should be passing the original dependency mapping error back to the caller.

If signing the contribution CLA is in your power, this fix could make a great first contribution to the project.