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.