Skip to content

Commit 35dac64

Browse files
danielayazclaude
andauthored
[APIE-1040] Default flink statement --wait-timeout to 1m (defer 6h to next major) (#3393)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 43219af commit 35dac64

5 files changed

Lines changed: 12 additions & 8 deletions

File tree

internal/flink/command_statement_create.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ var (
2828
flinkStatementFailedPhases = []string{"FAILED"}
2929
)
3030

31-
// statementsAPICreateTimeout aligns with terraform-provider-confluent's
32-
// statementsAPICreateTimeout in internal/provider/constants.go. CLI users can
33-
// shorten it with --wait-timeout; TF has no equivalent override.
34-
const flinkStatementCreateWaitTimeout = 6 * time.Hour
31+
// flinkStatementCreateWaitTimeout is the default for --wait-timeout. It is kept
32+
// at 1 minute to match the pre-framework `--wait` behavior (a hardcoded
33+
// retry.Retry(time.Second, time.Minute, ...) poll), so customers who scripted
34+
// around that 1-minute timer are not affected by the --wait refactor. Bump to
35+
// 6h in the next major version (aligning with terraform-provider-confluent's
36+
// statementsAPICreateTimeout in internal/provider/constants.go); CLI users can
37+
// already lengthen it with --wait-timeout in the meantime. (APIE-1040)
38+
const flinkStatementCreateWaitTimeout = time.Minute
3539

3640
func (c *command) newStatementCreateCommand() *cobra.Command {
3741
cmd := &cobra.Command{

test/fixtures/output/flink/statement/create-help-onprem.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Flags:
1212
--database string The name of the default database.
1313
--flink-configuration string The file path to hold the Flink configuration for the statement.
1414
--wait Block until the statement reaches a terminal state.
15-
--wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s)
15+
--wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s)
1616
--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.
1717
--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.
1818
--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.

test/fixtures/output/flink/statement/create-help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Flags:
1818
--service-account string Service account ID.
1919
--database string The database which will be used as the default database. When using Kafka, this is the cluster ID.
2020
--wait Block until the statement reaches a terminal state.
21-
--wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s)
21+
--wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s)
2222
--property strings A mechanism to pass properties in the form key=value when creating a Flink statement.
2323
--environment string Environment ID.
2424
--context string CLI context name.

test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Flags:
1111
--database string The name of the default database.
1212
--flink-configuration string The file path to hold the Flink configuration for the statement.
1313
--wait Block until the statement reaches a terminal state.
14-
--wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s)
14+
--wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s)
1515
--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.
1616
--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.
1717
--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.

test/fixtures/output/flink/statement/create-missing-sql-failure.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Flags:
1111
--database string The name of the default database.
1212
--flink-configuration string The file path to hold the Flink configuration for the statement.
1313
--wait Block until the statement reaches a terminal state.
14-
--wait-timeout duration Maximum time to wait when --wait is set. (default 6h0m0s)
14+
--wait-timeout duration Maximum time to wait when --wait is set. (default 1m0s)
1515
--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.
1616
--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.
1717
--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.

0 commit comments

Comments
 (0)