saucelabs / saucectl

A command line interface for the Sauce Labs platform.
Apache License 2.0
42 stars 16 forks source link

feat: cancellable storage interactions #972

Closed alexplischke closed 2 weeks ago

alexplischke commented 2 weeks ago

Description

Introduce a global context. As is common in Go, the idea is to propagate this cancellable context wherever it may be needed. In an effort to keep this PR reviewable, I kept the changes contained to the app storage API. In fact, only the saucectl storage subcommands make use of this global context.

However, any other commands will also benefit immediately, as issuing a SIGINT twice will always result in a hard exit at the top level, irrespective of whether the global context is used or not.