terraform/internal/providercache
Martin Atkins 0b734a2803 command: Make provider installation interruptible
In earlier commits we started to make the installation codepath
context-aware so that it could be canceled in the event of a SIGINT, but
we didn't complete wiring that through the API of the getproviders
package.

Here we make the getproviders.Source interface methods, along with some
other functions that can make network requests, take a context.Context
argument and act appropriately if that context is cancelled.

The main providercache.Installer.EnsureProviderVersions method now also
has some context-awareness so that it can abort its work early if its
context reports any sort of error. That avoids waiting for the process
to wind through all of the remaining iterations of the various loops,
logging each request failure separately, and instead returns just
a single aggregate "canceled" error.

We can then set things up in the "terraform init" and
"terraform providers mirror" commands so that the context will be
cancelled if we get an interrupt signal, allowing provider installation
to abort early while still atomically completing any local-side effects
that may have started.
2020-09-29 10:00:35 -07:00
..
testdata providercache: Lazily detect executable file 2020-07-07 15:18:27 -04:00
cached_provider.go getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
cached_provider_test.go getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
dir.go providercache: Lazily detect executable file 2020-07-07 15:18:27 -04:00
dir_modify.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
dir_modify_test.go internal: Fix providercache test failures on macOS 2020-09-04 16:09:57 -04:00
dir_test.go providercache: Lazily detect executable file 2020-07-07 15:18:27 -04:00
doc.go providercache: A package to encapsulate management of provider cache dirs 2020-03-25 11:29:48 -07:00
installer.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
installer_events.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
installer_test.go providercache: Validate provider executable file 2020-07-07 15:20:17 -04:00
lock_file.go internal/providercache: Fix positions on selections file/dir 2020-04-06 09:24:23 -07:00
package_install.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00