Skip to content

Make gRPC downloads cancelable by complying to context.Context done signaling. #2595

Closed
@cmaglie

Description

@cmaglie

Describe the request

A download is currently not cancelable. This is not a big problem in the standalone CLI app, since it can be forcibly terminated with a CTRL-C, it may be a bigger problem using gRPC because if a download-triggering call is closed or canceled, the underlying download is not stopped.

To achieve this feature two tasks are needed:

  • adding the possibility to inject a context in the Downloader library.
  • pass the actual context from the upper call levels to the download library.

Describe the current behavior

A download is not stopped if the gRPC call that caused it is canceled.

Arduino CLI version

nightly

Operating system

N/A

Operating system version

N/A

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions