terraform/internal
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
..
copydir internal/copydir: Factor out our recursive directory copy for reuse 2020-03-25 11:29:48 -07:00
depsfile getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
earlyconfig addrs: ImpliedProviderForUnqualifiedType function 2020-04-06 09:24:23 -07:00
getproviders command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
initwd internal/initwd: allow tests to pass when $PWD contains symlinks (#26015) 2020-08-27 10:02:22 -04:00
modsdir internal/modsdir: Fix Dropped Error (#24600) 2020-06-04 10:26:26 -04:00
providercache command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
tfplugin5 Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00