Skip to content

Calling setup-jsonnet can fail without error #11

@newhoggy

Description

@newhoggy

When using zendesk/setup-jsonnet, the installation can fail without error leading to difficult to diagnose failures later on.

There is an example usage here:

https://github.com/zendesk/entitlements/blob/3c68ee80b0d8470b84c07b2b26da8de3e19bcdc5/.github/workflows/spinnaker-manifests.yml#L88

And an example silent failure here https://github.com/zendesk/entitlements/runs/4207995033?check_suite_focus=true

Which can be observed by expanding the "Run zendesk/setup-jsonnet@v6" step.

I have reproduced the output below:

Run zendesk/setup-jsonnet@v7
  with:
    github_token: ***
    version: latest
  env:
    PROJECT_ID: docker-images-180022
    IMAGE_PATH: apps
    IMAGE_NAME: entitlements
    IMAGE_NAME2: entitlements-console
    IMAGE_NAME3: entitlements-debug
    ARTIFACTORY_API_KEY: ***
    ARTIFACTORY_USERNAME: ***
    DIGEST: sha256:2317cc52a1b3c6406191d0b292baf313a1037df69a99d4f23e2169caed5bb84e
    SHA: 66b31c16529f0ccc2953b54bc73f7d1232cad53c
/home/runner/runner/agent/_work/_actions/zendesk/setup-jsonnet/v7/install-jsonnet.sh
+ go get github.com/google/go-jsonnet/cmd/jsonnet
# cd .; git clone -- https://gopkg.in/yaml.v2 /home/runner/go/src/gopkg.in/yaml.v2
Cloning into '/home/runner/go/src/gopkg.in/yaml.v2'...
remote: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-yaml/yaml.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
fatal: unable to access 'https://gopkg.in/yaml.v2/': The requested URL returned error: 502
package gopkg.in/yaml.v2: exit status 128
(node:8460) UnhandledPromiseRejectionWarning: Error: The process '/home/runner/runner/agent/_work/_actions/zendesk/setup-jsonnet/v7/install-jsonnet.sh' failed with exit code 1
    at ExecState._setResult (/home/runner/runner/agent/_work/_actions/zendesk/setup-jsonnet/v7/node_modules/@actions/exec/lib/toolrunner.js:574:25)
    at ExecState.CheckComplete (/home/runner/runner/agent/_work/_actions/zendesk/setup-jsonnet/v7/node_modules/@actions/exec/lib/toolrunner.js:557:18)
    at ChildProcess.<anonymous> (/home/runner/runner/agent/_work/_actions/zendesk/setup-jsonnet/v7/node_modules/@actions/exec/lib/toolrunner.js:451:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)
(node:8460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions