Files
opentf/command
Alisdair McDiarmid 536c80da23 backend: Add per-operation diagnostic rendering
The enhanced backends (local and remote) need to be able to render
diagnostics during operations. Prior to this commit, this functionality
was supported with a per-backend `ShowDiagnostics` function pointer.

In order to allow users of these backends to control how diagnostics are
rendered, this commit moves that function pointer to the `Operation`
type. This means that a diagnostic renderer is configured for each
operation, rather than once per backend initialization.

Some secondary consequences of this change:

- The `ReportResult` method on the backend is now moved to the
  `Operation` type, as it needs to access the `ShowDiagnostics` callback
  (and nothing else from the backend);
- Tests which assumed that diagnostics would be written to the backend's
  `cli.Ui` instance are migrated to using a new record/playback diags
  helper function;
- Apply, plan, and refresh commands now pass a pointer to the `Meta`
  struct's `showDiagnostics` method.

This commit should not change how Terraform works, and is refactoring in
preparation for more changes which move UI code out of the backend.
2021-02-12 14:30:35 -05:00
..
2020-12-02 13:59:19 -05:00
2020-12-02 13:59:19 -05:00
2015-04-29 13:07:13 -05:00
2021-01-12 17:47:55 -05:00
2020-12-02 13:59:19 -05:00
2019-07-18 16:11:41 -04:00
2020-12-02 13:59:19 -05:00
2021-02-12 09:56:02 -05:00
2020-10-08 08:42:16 -04:00
2018-10-16 18:24:47 -07:00
2021-01-12 17:47:55 -05:00
2020-12-02 13:59:19 -05:00
2021-01-27 09:54:28 -08:00
2020-10-08 08:42:16 -04:00
2020-10-08 08:42:16 -04:00
2021-01-12 17:47:55 -05:00
2020-12-02 13:59:19 -05:00
2021-01-12 17:47:55 -05:00
2020-12-02 13:59:19 -05:00