Skip to content
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

[gRPC] It should be possible to run the core update-index equivalent with and without the 3rd party URLs #1788

Closed
3 tasks done
kittaakos opened this issue Jul 1, 2022 · 1 comment · Fixed by #1866
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Jul 1, 2022

Describe the request

As described in #1762, the core update-index gRPC equivalent must run before initializing the core gRPC client (InitRequest) if it's the first start:

first start, and the core and lib indexes must be updated before running the init phase of the gRCP core client

This is doable, however, if there is a CLI config with an invalid 3rd URL (see arduino/arduino-ide#1084), then the entire core update-index command will fail and makes the core gRPC client non-functional.

Error: 13 INTERNAL: Error downloading index 'https://downloads.arduino.cc/packages/package_nonexistent_index.json': Server responded with: 404 Not Found

Describe the current behavior

As a consumer of the CLI APIs, I want to run the core update-index so that it only downloads the essential package index (#directories.data/package_index.json) and the built-in tools (builtin:serial-discovery and builtin:mdns-discovery). I also want to run the core update-index when it pulls all the package indexes required for the 3rd party platforms. A boolean flag on the gRPC API would be great to achieve it!

Arduino CLI version

From the HEAD: arduino-cli Version: 0.0.0-git Commit: Date:

Operating system

macOS

Operating system version

12.3.1

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@ubidefeo
Copy link

ubidefeo commented Aug 8, 2022

I have encountered this also in non gRPC context.
arduino-cli should handle a broken package index URL by simply skipping forward

cmaglie added a commit to cmaglie/arduino-cli that referenced this issue Sep 6, 2022
cmaglie added a commit that referenced this issue Sep 9, 2022
#1866)

* Added flag to skip 3rd party package_index in UpdateIndex gRPC API

Fix #1788

* UpdateIndex gRPC call does not stop at the first error

* Updated docs

* Fixed integration tests

* Ensure that a 'Completed' download progress is always sent

* UpdateIndex: Fixed a wrong success report and added test.

* Improved test error messages
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants