-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 errors-only output mode #2588
Conversation
@dobesv is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
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 looks good to me. An integration test under cli/integration-tests
that checks log output would be a good addition here.
| hash-only | Show only the hashes of the tasks | | ||
| new-only | Only show output from cache misses | | ||
| errors-only | Only show output from task failures | | ||
| none | Hides all task output | |
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.
Can you move docs to a separate PR? Since the feature won't be out until the next release, we'll hold onto the docs PR until then.
Co-authored-by: Mehul Kar <[email protected]>
Thanks for the review! I rolled back the docs changes and added a couple of tests. I'm not too familiar with the testing system and philosophy here so do let me know how to do the tests properly if I didn't do them right. |
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.
Almost there, thanks for the quick turnaround and working with me on this!
…tput-mode-errors-only
I updated the test so it also has a task whose output is not shown except in the count of tasks run. |
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.
Thanks for the quick update and apologies for not getting this merged yesterday. One more comment about the test case and merge conflict needs resolved. 🤞🏾 we can get this in today! (I'll watch for updates here)
// OnError | ||
// If output-mode is set to "errors-only", we'll have buffered output | ||
// to disk without logging it. Now we can log that here. | ||
func (tc TaskCache) OnError(terminal *cli.PrefixedUi, logger hclog.Logger) { |
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 is annoying, but lint requires the code comment to be a whole line starting with OnError
. You can still break it up into multiple lines, but I guess specifically what you have here is not acceptable 🤦🏾 ...
Oh, uh thanks! I hadn't fixed the linter error, thanks for cleaning that up for me |
For users that are not that interested in all the output related cache hits/misses and the cached output of prior builds or even the new output from a new build step that's just print a count of files or something boring like that, this trims the output down to just the task that failed, if any.
Partial solution for #993