-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Automatically download indexes, if missing, in gRPC Init
call
#2119
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2119 +/- ##
==========================================
+ Coverage 62.87% 62.90% +0.03%
==========================================
Files 218 218
Lines 19474 19452 -22
==========================================
- Hits 12244 12237 -7
+ Misses 6146 6134 -12
+ Partials 1084 1081 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
b95adc8
to
9254eea
Compare
This is looking very promising. 😍 The sister PR in the IDE2 repo is here: arduino/arduino-ide#2023. A few remarks:
|
9254eea
to
dd55eb7
Compare
I'm still not fully convinced this is the right thing to do, BTW I've implemented this one:
so we can try it. The visible change to the user is that now, as soon as you add a 3rd party package_index URL to the config, the CLI will automatically download the index, if not already present, at the first use (you don't need to do the first
The extra auto-update should not happen (only at the first startup maybe? or if the user explicitly deletes an index from the data dir... how often this happens?). |
Great. I will update the IDE2 branch soon.
I completely agree. Let's not overcomplicate the index update strategies. |
Previously it was named GetPlatforms with a different return type than the one defined in gRPC API .proto files.
dd55eb7
to
01b444c
Compare
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?
This PR changes the behavior of the
Init
function of the gRPC API.What is the current behavior?
Previously if the main indexes
package_index.json
orlibrary_index.json
were missing (for example after installing on a clean system) the gRPC client had to callUpdateIndex
orUpdateLibrariesIndex
to download the indexes and re-Init
the gRPC instance.What is the new behavior?
The indexes download is performed automatically.
Does this PR introduce a breaking change, and is titled accordingly?
It changes some golang API calls as described in the
UPGRADING.md
.The gRPC is backward compatible, but the old clients may not be optimized and may force the download of the index twice.
Other information
Fix #1529