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

[Feature] Including build failure log in main output #3349

Closed
KishanBagaria opened this issue Aug 26, 2021 · 5 comments
Closed

[Feature] Including build failure log in main output #3349

KishanBagaria opened this issue Aug 26, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@KishanBagaria
Copy link

KishanBagaria commented Aug 26, 2021

We're building native deps on GitHub Actions. When build failures occur, yarn saves the log to a build.log file in a random location. Only way for us to see the log is to upload C:\Users\RUNNER~1\AppData\Local\Temp\xfs-*\build.log as CI artifacts.

  ➤ YN0009: │ foo@https://github.com/bar/foo.git#commit=hash couldn't be built successfully (exit code 1, logs can be found here: C:\Users\RUNNER~1\AppData\Local\Temp\xfs-150f75fd\build.log)
515

Is it possible to include build.log in the main log (process.stdout) instead of saving to a new file?

Edit: overlooked the logs at the top

@KishanBagaria KishanBagaria added the enhancement New feature or request label Aug 26, 2021
@castarco
Copy link

How was this problem fixed? It's still a thing today (I can't find any option to configure where the logs are placed, at least that would allow us to upload it as an artifact for later inspection, but the current randomised path makes it almost impossible).

@clemyan
Copy link
Member

clemyan commented Jul 17, 2024

In CI environments, the enableInlineBuilds config defaults to true, which means ALL builds outputs (not only failing ones) are written to stdout with a prefix

@Robula
Copy link

Robula commented Jul 17, 2024

In CI environments, the enableInlineBuilds config defaults to true, which means ALL builds outputs (not only failing ones) are written to stdout with a prefix

It's never worked in Google Cloud Build. We have to pass --inline-builds to yarn install. However, that argument does not work for yarn workspaces focus.

@clemyan
Copy link
Member

clemyan commented Jul 17, 2024

It's never worked in Google Cloud Build

Looks like that will be fixed in the next release via #6377

Anyway, you can force CI to be detected by setting environment variable CI='true'. Alternatively, you can directly set the value of enableInlineBuilds via yarn config set enableInlineBuilds true or setting environment variable YARN_ENABLE_INLINE_BUILDS='true'. Both of those should work for all installs, including yarn workspaces focus.

Also, this popped into my notifications earlier (that's why I commented in the first place) but nothing happened to trigger that notification? Strange

@Robula
Copy link

Robula commented Jul 18, 2024

@clemyan That's really great to know, we will try that. Thank you. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants