Skip to content

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

@cmaglie

Description

@cmaglie
Member

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
    I verified the feature was still missing when using the
    My request contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @cmaglie@per1234

    Issue actions

      Make gRPC downloads cancelable by complying to `context.Context` done signaling. · Issue #2595 · arduino/arduino-cli