-
Notifications
You must be signed in to change notification settings - Fork 171
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
catch download failures better in init, re: #522 #523
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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.
Since this error has nothing to do with the download but when parsing the data I am not sure this exception type is appropriate.
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.
Of the available exceptions this looked the most appropriate to me. If there's one you deem more appropriate I'm happy to switch.
Although the error may be unrelated to the actual transport, if the downloaded data is invalid or corrupted the place to look is at the network or source. This is following the same pattern as the exceptions in the function
download_rosdep_data
where data downloaded failing validation is considered a failed download. And the DownloadFailed exception is the one that makes sense to add urls to me.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 kind of agree here, since we could conceivably accidentally make malformed sources and then this error would be incorrectly pointing people to problems with their network rather than pointing them at us.
That being said, I think this is unlikely and most of the time it will be due to network errors. So I'm +0 on adding another error for this case.
@dirk-thomas / @tfoote can you guys pick a new error type or make another argument for leaving it as-is?
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.
If we are worried about malformed upstream sources, we should add CI in the upstream repo. If it is broken for everyone, people will find the right place to report it even when the error message says its a download failure. I'm +1 on @tfoote's change as is. Or maybe we could rephrase slightly like:
"Failed to download and validate rosdep sources from..."
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've updated the message to be more explicit about the potential causes.