-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Downloader rewriter config has all_blocked_message #12997
Closed
illicitonion
wants to merge
1
commit into
bazelbuild:master
from
illicitonion:downloader-error-message
Closed
Downloader rewriter config has all_blocked_message #12997
illicitonion
wants to merge
1
commit into
bazelbuild:master
from
illicitonion:downloader-error-message
Conversation
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 depends on #12989 |
illicitonion
force-pushed
the
downloader-error-message
branch
from
February 11, 2021 16:15
ec15d57
to
ccdb060
Compare
aiuto
added
the
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
label
Feb 22, 2021
This allows for the config author to specify a useful error message to adorn the user-facing error, so that if the user is unaware or forgets about the config, they get a more clear error message than: ``` ERROR: java.io.IOException: Error downloading [] to /some/path ``` or ``` Error in download: java.io.IOException: Cache miss and no url specified ``` Currently there is a log line like: ``` INFO: Rewritten [https://doesnotexist.com/beep] as [] ``` printed, but this is often quite far from the error - this puts all the information in one place. If you don't configure an all_blocked_message, this now looks like: ``` ERROR: java.io.IOException: Cache miss and no url specified - Configured URL rewriter blocked all URLs ``` And if you do, it will look like something like: ``` ERROR: java.io.IOException: Cache miss and no url specified - Configured URL rewriter blocked all URLs - See https://mycorp.com/bazel-rewriter-issue for more details. ```
illicitonion
force-pushed
the
downloader-error-message
branch
from
February 24, 2021 15:25
ccdb060
to
eb1561b
Compare
I rebased as the dependent PR got merged :) |
coeuvre
approved these changes
Feb 25, 2021
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 PR!
philwo
pushed a commit
that referenced
this pull request
Mar 15, 2021
This allows for the config author to specify a useful error message to adorn the user-facing error, so that if the user is unaware or forgets about the config, they get a more clear error message than: ``` ERROR: java.io.IOException: Error downloading [] to /some/path ``` or ``` Error in download: java.io.IOException: Cache miss and no url specified ``` Currently there is a log line like: ``` INFO: Rewritten [https://doesnotexist.com/beep] as [] ``` printed, but this is often quite far from the error - this puts all the information in one place. If you don't configure an all_blocked_message, this now looks like: ``` ERROR: java.io.IOException: Cache miss and no url specified - Configured URL rewriter blocked all URLs: [https://doesnotexist.com/beep] ``` And if you do, it will look like something like: ``` ERROR: java.io.IOException: Cache miss and no url specified - Configured URL rewriter blocked all URLs: [https://doesnotexist.com/beep] - See https://mycorp.com/bazel-rewriter-issue for more details. ``` Closes #12997. PiperOrigin-RevId: 359730842
philwo
pushed a commit
that referenced
this pull request
Mar 15, 2021
This allows for the config author to specify a useful error message to adorn the user-facing error, so that if the user is unaware or forgets about the config, they get a more clear error message than: ``` ERROR: java.io.IOException: Error downloading [] to /some/path ``` or ``` Error in download: java.io.IOException: Cache miss and no url specified ``` Currently there is a log line like: ``` INFO: Rewritten [https://doesnotexist.com/beep] as [] ``` printed, but this is often quite far from the error - this puts all the information in one place. If you don't configure an all_blocked_message, this now looks like: ``` ERROR: java.io.IOException: Cache miss and no url specified - Configured URL rewriter blocked all URLs: [https://doesnotexist.com/beep] ``` And if you do, it will look like something like: ``` ERROR: java.io.IOException: Cache miss and no url specified - Configured URL rewriter blocked all URLs: [https://doesnotexist.com/beep] - See https://mycorp.com/bazel-rewriter-issue for more details. ``` Closes #12997. PiperOrigin-RevId: 359730842
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
This allows for the config author to specify a useful error message to
adorn the user-facing error, so that if the user is unaware or forgets
about the config, they get a more clear error message than:
or
Currently there is a log line like:
printed, but this is often quite far from the error - this puts all the
information in one place.
If you don't configure an all_blocked_message, this now looks like:
And if you do, it will look like something like: