From e079ad45fb79ac545b0e2dd79fda4bf8ac82597b Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 26 Feb 2021 14:25:46 -0800 Subject: [PATCH] command/views: "Still applying..." only every 25 seconds Ever since #6162 we've had a mechanism in the UI to re-announce every 10 seconds that an apply is ongoing, for resource types that take more than 10 seconds to complete their apply. Based on feedback that these messages are making the output too verbose, it seems like 10 seconds is too short a duration to consider an operation to be "unusually slow", or else these messages would not appear often enough to be material. With that in mind, as a compromise here we reduce the frequency of these updates to every 25 seconds instead, which is another mostly-arbitrary number but one that aims to strike a compromise between being long enough that _most_ operations will not take this long, but short enough to keep the UI output coming for long-running operations so that users can be reassured that Terraform is still working and not hung, as seems to have been the motivation in #6162. --- command/views/hook_ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/views/hook_ui.go b/command/views/hook_ui.go index a869b45a22..9fd3f94fbc 100644 --- a/command/views/hook_ui.go +++ b/command/views/hook_ui.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -const defaultPeriodicUiTimer = 10 * time.Second +const defaultPeriodicUiTimer = 25 * time.Second const maxIdLen = 80 func NewUiHook(view *View) *UiHook {