-
-
Notifications
You must be signed in to change notification settings - Fork 398
Fixed some error messages/warnings during index download #2257
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
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2257 +/- ##
==========================================
- Coverage 62.97% 62.93% -0.04%
==========================================
Files 220 220
Lines 19501 19521 +20
==========================================
+ Hits 12280 12286 +6
- Misses 6137 6147 +10
- Partials 1084 1088 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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 get the error message if the invalid 3rd party URL is https://invalidUrl
. Thank you! 👍
% ./arduino-cli version
arduino-cli Version: git-snapshot Commit: b39c45b9 Date: 2023-08-02T17:26:45Z
% cat ~/.arduinoIDE/arduino-cli.yaml | yq .directories
{
"builtin": {
"libraries": "/Users/a.kitta/Library/Arduino15/libraries"
},
"data": "/Users/a.kitta/Library/Arduino15",
"downloads": "/Users/a.kitta/Library/Arduino15/staging",
"user": "/Users/a.kitta/Documents/Arduino"
}
% cat ~/.arduinoIDE/arduino-cli.yaml | yq .board_manager.additional_urls
[
"https://invalidUrl"
]
% ls ~/Library/Arduino15
inventory.yaml
% ./arduino-cli core update-index --config-file ~/.arduinoIDE/arduino-cli.yaml --format json
{
"error": "Some indexes could not be updated.",
"warnings": [
"Error initializing instance: Some indexes could not be updated.",
"Error initializing instance: Loading index file: Invalid URL: https://invalidUrl"
]
}
During the review, I noticed something with the URL parsing. Is this a bug? When I changed the 3rd party URL to
% cat ~/.arduinoIDE/arduino-cli.yaml | yq .board_manager.additional_urls
[
"https://http://file://notafile"
]
% ./arduino-cli core update-index --config-file ~/.arduinoIDE/arduino-cli.yaml --format json
{
"error": "Some indexes could not be updated.",
"warnings": [
"Error initializing instance: Some indexes could not be updated.",
"Error initializing instance: Loading index file: loading json index file /Users/a.kitta/Library/Arduino15/notafile: open /Users/a.kitta/Library/Arduino15/notafile: no such file or directory"
]
} I thought it was because the last URL scheme was picked up; it was |
Scheme: https://go.dev/play/p/barpaG3S9Q0 so basically the CLI is trying to download Maybe we should enforce the |
while we decide this, I'll move forward this one. |
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
Some error messages are adjusted to better represent the actual error.
What is the current behavior?
Following the steps in #2254 I get:
What is the new behavior?
Does this PR introduce a breaking change, and is titled accordingly?
No
Other information
Fix #2254