-
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
Add tests to validate errors-only is working #3945
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
40768f1
Add tests to validate errors-only is working
mehulkar afed60c
Update cli/integration_tests/run_logging/monorepo/app-a/package.json
mehulkar 6e3f249
Merge branch 'main' into mk/errors-only
mehulkar 9c0d10a
update hash b/c package.json changed
mehulkar 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Setup | ||
$ . ${TESTDIR}/../setup.sh | ||
$ . ${TESTDIR}/setup.sh $(pwd) ./monorepo | ||
|
||
# [ ] error exit | ||
# [ ] outputMode: errors-only | ||
# [x] --ouptut-logs=errors-only | ||
$ ${TURBO} run build --output-logs=errors-only | ||
\xe2\x80\xa2 Packages in scope: app-a (esc) | ||
\xe2\x80\xa2 Running build in 1 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 1 successful, 1 total | ||
Cached: 0 cached, 1 total | ||
Time:\s*[\.0-9]+m?s (re) | ||
|
||
|
||
# [ ] error exit | ||
# [x] outputMode: errors-only | ||
# [ ] --ouptut-logs=errors-only | ||
$ ${TURBO} run buildsuccess | ||
\xe2\x80\xa2 Packages in scope: app-a (esc) | ||
\xe2\x80\xa2 Running buildsuccess in 1 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 1 successful, 1 total | ||
Cached: 0 cached, 1 total | ||
Time:\s*[\.0-9]+m?s (re) | ||
|
||
# [x] error exit | ||
# [ ] outputMode: errors-only | ||
# [x] --ouptut-logs=errors-only | ||
$ ${TURBO} run builderror --output-logs=errors-only | ||
\xe2\x80\xa2 Packages in scope: app-a (esc) | ||
\xe2\x80\xa2 Running builderror in 1 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
app-a:builderror: ERROR: command finished with error: command .* npm run builderror exited \(1\) (re) | ||
app-a:builderror: | ||
app-a:builderror: > builderror | ||
app-a:builderror: > echo "error builderror app-a!" && exit 1 | ||
app-a:builderror: | ||
app-a:builderror: error builderror app-a! | ||
app-a:builderror: npm ERR! Lifecycle script `builderror` failed with error: | ||
app-a:builderror: npm ERR! Error: command failed | ||
app-a:builderror: npm ERR! in workspace: app-a | ||
app-a:builderror: npm ERR! at location: .* (re) | ||
command .* npm run builderror 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] | ||
|
||
# [x] error exit | ||
# [x] outputMode: errors-only | ||
# [ ] --ouptut-logs=errors-only | ||
$ ${TURBO} run builderror2 | ||
\xe2\x80\xa2 Packages in scope: app-a (esc) | ||
\xe2\x80\xa2 Running builderror2 in 1 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
app-a:builderror2: ERROR: command finished with error: command .* npm run builderror2 exited \(1\) (re) | ||
app-a:builderror2: | ||
app-a:builderror2: > builderror2 | ||
app-a:builderror2: > echo "error builderror2 app-a!" && exit 1 | ||
app-a:builderror2: | ||
app-a:builderror2: error builderror2 app-a! | ||
app-a:builderror2: npm ERR! Lifecycle script `builderror2` failed with error: | ||
app-a:builderror2: npm ERR! Error: command failed | ||
app-a:builderror2: npm ERR! in workspace: app-a | ||
app-a:builderror2: npm ERR! at location: .* (re) | ||
command .* npm run builderror2 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] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.turbo |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{ | ||
"name": "app-a", | ||
"scripts": { | ||
"build": "echo 'build app-a'" | ||
"build": "echo 'build app-a'", | ||
"builderror": "echo \"error builderror app-a!\" && exit 1", | ||
"builderror2": "echo \"error builderror2 app-a!\" && exit 1", | ||
"buildsuccess": "echo \"buildsuccess app-a!\"" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{ | ||
"pipeline": { | ||
"build": {} | ||
"build": {}, | ||
|
||
"builderror": {}, | ||
"builderror2": { | ||
"outputMode": "errors-only" | ||
}, | ||
"buildsuccess": { | ||
"outputMode": "errors-only" | ||
} | ||
} | ||
} |
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.
This test was redundant with the new ones I added. The other tests in this file are about caching the outputs, so I kept those.