-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Existing and error logs behavior #4656
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bab4d3b
Existing and error logs behavior
08db941
errors-only matches full logs output for a task error
8327560
Resume printing failed commands at the end of a run
2837721
Merge branch 'main' into gsoltis/fix_errors_only_continue
031fdf6
Drop commented-out code
d622cc9
Clarify comment a little
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
turborepo-tests/integration/tests/_fixtures/monorepo_dependency_error/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
.turbo | ||
.npmrc |
9 changes: 9 additions & 0 deletions
9
...repo-tests/integration/tests/_fixtures/monorepo_dependency_error/apps/my-app/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "my-app", | ||
"scripts": { | ||
"build": "echo 'working'" | ||
}, | ||
"dependencies": { | ||
"some-lib": "*" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...o-tests/integration/tests/_fixtures/monorepo_dependency_error/apps/other-app/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "other-app", | ||
"scripts": { | ||
"build": "exit 3" | ||
}, | ||
"dependencies": { | ||
"some-lib": "*" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...po-tests/integration/tests/_fixtures/monorepo_dependency_error/apps/some-lib/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "some-lib", | ||
"scripts": { | ||
"build": "exit 2" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
turborepo-tests/integration/tests/_fixtures/monorepo_dependency_error/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "monorepo", | ||
"workspaces": [ | ||
"apps/**" | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
turborepo-tests/integration/tests/_fixtures/monorepo_dependency_error/turbo.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"pipeline": { | ||
"build": { | ||
"dependsOn": ["^build"], | ||
"outputs": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
Setup | ||
$ . ${TESTDIR}/../../helpers/setup.sh | ||
$ . ${TESTDIR}/_helpers/setup_monorepo.sh $(pwd) monorepo_dependency_error | ||
Run without --continue | ||
$ ${TURBO} build | ||
\xe2\x80\xa2 Packages in scope: my-app, other-app, some-lib (esc) | ||
\xe2\x80\xa2 Running build in 3 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
some-lib:build: cache miss, executing 3494007308f52ad6 | ||
some-lib:build: | ||
some-lib:build: > build | ||
some-lib:build: > exit 2 | ||
some-lib:build: | ||
some-lib:build: npm ERR! Lifecycle script `build` failed with error: | ||
some-lib:build: npm ERR! Error: command failed | ||
some-lib:build: npm ERR! in workspace: some-lib | ||
some-lib:build: npm ERR! at location: (.*)/apps/some-lib (re) | ||
some-lib:build: ERROR: command finished with error: command \((.*)/apps/some-lib\) npm run build exited \(1\) (re) | ||
command \((.*)/apps/some-lib\) npm run build exited \(1\) (re) | ||
|
||
Tasks: 0 successful, 1 total | ||
Cached: 0 cached, 1 total | ||
Time:\s*[\.0-9]+m?s (re) | ||
|
||
ERROR run failed: command exited (1) | ||
[1] | ||
|
||
Run without --continue, and with only errors. | ||
$ ${TURBO} build --output-logs=errors-only | ||
\xe2\x80\xa2 Packages in scope: my-app, other-app, some-lib (esc) | ||
\xe2\x80\xa2 Running build in 3 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
some-lib:build: cache miss, executing 3494007308f52ad6 | ||
some-lib:build: | ||
some-lib:build: > build | ||
some-lib:build: > exit 2 | ||
some-lib:build: | ||
some-lib:build: npm ERR! Lifecycle script `build` failed with error: | ||
some-lib:build: npm ERR! Error: command failed | ||
some-lib:build: npm ERR! in workspace: some-lib | ||
some-lib:build: npm ERR! at location: (.*)/apps/some-lib (re) | ||
some-lib:build: ERROR: command finished with error: command \((.*)/apps/some-lib\) npm run build exited \(1\) (re) | ||
command \((.*)/apps/some-lib\) npm run build exited \(1\) (re) | ||
|
||
Tasks: 0 successful, 1 total | ||
Cached: 0 cached, 1 total | ||
Time:\s*[\.0-9]+m?s (re) | ||
|
||
ERROR run failed: command exited (1) | ||
[1] | ||
|
||
Run with --continue | ||
$ ${TURBO} build --output-logs=errors-only --continue | ||
\xe2\x80\xa2 Packages in scope: my-app, other-app, some-lib (esc) | ||
\xe2\x80\xa2 Running build in 3 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
some-lib:build: cache miss, executing 3494007308f52ad6 | ||
some-lib:build: | ||
some-lib:build: > build | ||
some-lib:build: > exit 2 | ||
some-lib:build: | ||
some-lib:build: npm ERR! Lifecycle script `build` failed with error: | ||
some-lib:build: npm ERR! Error: command failed | ||
some-lib:build: npm ERR! in workspace: some-lib | ||
some-lib:build: npm ERR! at location: (.*)/apps/some-lib (re) | ||
some-lib:build: command finished with error, but continuing... | ||
other-app:build: cache miss, executing af6505fe5634a5f5 | ||
other-app:build: | ||
other-app:build: > build | ||
other-app:build: > exit 3 | ||
other-app:build: | ||
other-app:build: npm ERR! Lifecycle script `build` failed with error: | ||
other-app:build: npm ERR! Error: command failed | ||
other-app:build: npm ERR! in workspace: other-app | ||
other-app:build: npm ERR! at location: (.*)/apps/other-app (re) | ||
other-app:build: command finished with error, but continuing... | ||
command \((.*)/apps/some-lib\) npm run build exited \(1\) (re) | ||
command \((.*)/apps/other-app\) npm run build exited \(1\) (re) | ||
|
||
Tasks: 1 successful, 3 total | ||
Cached: 0 cached, 3 total | ||
Time:\s*[\.0-9]+m?s (re) | ||
|
||
ERROR run failed: command exited (1) | ||
[1] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what other errors could we have here? Is it something from a task execution or something from the
dag
library essentially?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The anonymous function pattern should prevent us from leaking any of our execution errors out. It's possible that something in the
dag
library can produce an error, but from thedag
library's point of view, every node visit should look successful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to understand what
unusedErrs
was about. Since we're recording all our errors withrecordErr()
, I did not understand what theunusedErrs
was or why it could occur