fix: Honor --output-logs errors-only for non-cached tasks#11926
Open
veeceey wants to merge 2 commits intovercel:mainfrom
Open
fix: Honor --output-logs errors-only for non-cached tasks#11926veeceey wants to merge 2 commits intovercel:mainfrom
veeceey wants to merge 2 commits intovercel:mainfrom
Conversation
Contributor
|
Someone is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
When a task has `cache: false`, the log file was not being created, which meant `--output-logs errors-only` had no log file to replay on error. This change ensures the log file is always written when the output mode is `errors-only`, regardless of the cache setting, so that failed task output is properly shown. Closes vercel#6677
84a336f to
d3ecc6e
Compare
Author
|
updated the PR title to capitalize the first letter after the prefix — should fix the title validation check now |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #6677 —
--output-logs errors-onlywas ignored for tasks withcache: false.When caching is disabled, the log file was not created, so
on_errorhad no log file to replay when a task failed. Sinceerrors-onlymode works by suppressing stdout during execution and replaying the log file on error, the missing log file meant error output was silently lost.The fix adds an additional condition in
TaskCache::output_writer(): the log file is also created whentask_output_logs == OutputLogsMode::ErrorsOnly, ensuring the replay-on-error mechanism works for non-cached tasks.Test plan
errors-only-no-cache.tverifying:--output-logs=errors-onlysuppresses output--output-logs=errors-onlyshows output