From 19e1b347216dbfa72fdca4d94aa83b8622db0e96 Mon Sep 17 00:00:00 2001 From: Daniel Ayaz Date: Mon, 29 Jun 2026 16:07:23 -0500 Subject: [PATCH] [APIE-1040] Default --wait-timeout to 1m (defer 6h bump to next major) Per review on the --wait reapply: keep the flink statement create --wait-timeout default at 1 minute, matching the pre-framework behavior (a hardcoded retry.Retry(time.Second, time.Minute, ...) poll). Jumping straight to 6h could surprise customers who script around the existing 1-minute timer, so defer the 6h bump to the next major version. Users can already lengthen the wait now via --wait-timeout. Updated the four flink statement create help goldens (default 6h0m0s -> 1m0s); verified the rendered --help matches. Co-Authored-By: Claude Opus 4.8 (1M context) --- internal/flink/command_statement_create.go | 12 ++++++++---- .../output/flink/statement/create-help-onprem.golden | 2 +- .../output/flink/statement/create-help.golden | 2 +- .../create-missing-compute-pool-failure.golden | 2 +- .../statement/create-missing-sql-failure.golden | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/internal/flink/command_statement_create.go b/internal/flink/command_statement_create.go index ae9254f5e3..f57189b8aa 100644 --- a/internal/flink/command_statement_create.go +++ b/internal/flink/command_statement_create.go @@ -28,10 +28,14 @@ var ( flinkStatementFailedPhases = []string{"FAILED"} ) -// statementsAPICreateTimeout aligns with terraform-provider-confluent's -// statementsAPICreateTimeout in internal/provider/constants.go. CLI users can -// shorten it with --wait-timeout; TF has no equivalent override. -const flinkStatementCreateWaitTimeout = 6 * time.Hour +// flinkStatementCreateWaitTimeout is the default for --wait-timeout. It is kept +// at 1 minute to match the pre-framework `--wait` behavior (a hardcoded +// retry.Retry(time.Second, time.Minute, ...) poll), so customers who scripted +// around that 1-minute timer are not affected by the --wait refactor. Bump to +// 6h in the next major version (aligning with terraform-provider-confluent's +// statementsAPICreateTimeout in internal/provider/constants.go); CLI users can +// already lengthen it with --wait-timeout in the meantime. (APIE-1040) +const flinkStatementCreateWaitTimeout = time.Minute func (c *command) newStatementCreateCommand() *cobra.Command { cmd := &cobra.Command{ diff --git a/test/fixtures/output/flink/statement/create-help-onprem.golden b/test/fixtures/output/flink/statement/create-help-onprem.golden index de2ed822e9..d056abc3ae 100644 --- a/test/fixtures/output/flink/statement/create-help-onprem.golden +++ b/test/fixtures/output/flink/statement/create-help-onprem.golden @@ -12,7 +12,7 @@ Flags: --database string The name of the default database. --flink-configuration string The file path to hold the Flink configuration for the statement. --wait Block until the statement reaches a terminal state. - --wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s) + --wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s) --url string Base URL of the Confluent Manager for Apache Flink (CMF). Environment variable "CONFLUENT_CMF_URL" may be set in place of this flag. --client-key-path string Path to client private key for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_KEY_PATH" may be set in place of this flag. --client-cert-path string Path to client cert to be verified by Confluent Manager for Apache Flink. Include for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_CERT_PATH" may be set in place of this flag. diff --git a/test/fixtures/output/flink/statement/create-help.golden b/test/fixtures/output/flink/statement/create-help.golden index f3c983c9ce..72fb58ff3e 100644 --- a/test/fixtures/output/flink/statement/create-help.golden +++ b/test/fixtures/output/flink/statement/create-help.golden @@ -18,7 +18,7 @@ Flags: --service-account string Service account ID. --database string The database which will be used as the default database. When using Kafka, this is the cluster ID. --wait Block until the statement reaches a terminal state. - --wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s) + --wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s) --property strings A mechanism to pass properties in the form key=value when creating a Flink statement. --environment string Environment ID. --context string CLI context name. diff --git a/test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden b/test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden index e330fbfa86..1e7db7b5ab 100644 --- a/test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden +++ b/test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden @@ -11,7 +11,7 @@ Flags: --database string The name of the default database. --flink-configuration string The file path to hold the Flink configuration for the statement. --wait Block until the statement reaches a terminal state. - --wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s) + --wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s) --url string Base URL of the Confluent Manager for Apache Flink (CMF). Environment variable "CONFLUENT_CMF_URL" may be set in place of this flag. --client-key-path string Path to client private key for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_KEY_PATH" may be set in place of this flag. --client-cert-path string Path to client cert to be verified by Confluent Manager for Apache Flink. Include for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_CERT_PATH" may be set in place of this flag. diff --git a/test/fixtures/output/flink/statement/create-missing-sql-failure.golden b/test/fixtures/output/flink/statement/create-missing-sql-failure.golden index 51aae81f04..3e9d92bf8d 100644 --- a/test/fixtures/output/flink/statement/create-missing-sql-failure.golden +++ b/test/fixtures/output/flink/statement/create-missing-sql-failure.golden @@ -11,7 +11,7 @@ Flags: --database string The name of the default database. --flink-configuration string The file path to hold the Flink configuration for the statement. --wait Block until the statement reaches a terminal state. - --wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s) + --wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s) --url string Base URL of the Confluent Manager for Apache Flink (CMF). Environment variable "CONFLUENT_CMF_URL" may be set in place of this flag. --client-key-path string Path to client private key for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_KEY_PATH" may be set in place of this flag. --client-cert-path string Path to client cert to be verified by Confluent Manager for Apache Flink. Include for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_CERT_PATH" may be set in place of this flag.