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

Yarn v2 fails to install dd-trace v0.22.0+ during a GitHub Actions workflow #1049

Closed
vecerek opened this issue Aug 6, 2020 · 3 comments
Closed
Labels
bug Something isn't working community dev/tooling
Milestone

Comments

@vecerek
Copy link
Contributor

vecerek commented Aug 6, 2020

Describe the bug
I've recently moved one of my repos over to use Yarn v2 and GitHub Actions as the CI. For some reason, the yarn install command fails with the following error when installing dd-trace-js:

➤ YN0007: │ dd-trace@npm:0.24.0 must be built because it never did before or the last one failed
➤ YN0009: │ dd-trace@npm:0.24.0 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-563671f2/build.log)
➤ YN0009: │ dd-trace@npm:0.24.0 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-563671f2/build.log)

Unfortunately, I wasn't able to access those files in GH Actions. This doesn’t happen at all locally (on a Mac Os X Catalina). Does anyone have an idea of why this could be? The GH Action is able to install the 0.21.0-beta.0 release but not the 0.22.0 one and above.

Environment

  • Operation system: Linux version 5.3.0-1032-aws (buildd@lgw01-amd64-026) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #34~18.04.2-Ubuntu SMP as given by cat /proc/version
  • Node version: 12.16.1
  • Tracer version: 0.22.0+
  • Agent version: N/A
@vecerek vecerek added the bug Something isn't working label Aug 6, 2020
@mhassan1
Copy link
Contributor

I'm hitting the same problem. I believe it's because the install script exits with code 1 in CI environments:

if (CI === 'true' || !INIT_CWD || INIT_CWD.includes(PWD)) {

A temporary solution for me is to install using CI=false yarn.

The intention of the "install": "node scripts/should_rebuild && node-gyp-build || exit 0" script looks like it should always exit with 0; however, I'm seeing that Yarn v2 does not handle the || exit 0 as expected when it runs this script. I found that if I add parentheses, as follows, the exit 0 is hit, as expected:

"install": "(node scripts/should_rebuild && node-gyp-build) || exit 0"

I'll open a PR for the above.

@mhassan1
Copy link
Contributor

@vecerek This should be resolved on 0.24.1 or higher

@rochdev rochdev added this to the 0.24.1 milestone Aug 24, 2020
@rochdev
Copy link
Member

rochdev commented Aug 24, 2020

@vecerek I will close this since as mentioned above a fix was released in 0.24.1. Please feel free to reopen if you are still experiencing issues related to the tracer and Yarn2.

@rochdev rochdev closed this as completed Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community dev/tooling
Projects
None yet
Development

No branches or pull requests

3 participants