Skip to content

Revert "[APIE-1040] Add generic --wait framework; refactor Flink stat… - #3386

Merged
Steven Gagniere (sgagniere) merged 1 commit into
mainfrom
temp-revert-wait-pr
Jun 18, 2026
Merged

Revert "[APIE-1040] Add generic --wait framework; refactor Flink stat…#3386
Steven Gagniere (sgagniere) merged 1 commit into
mainfrom
temp-revert-wait-pr

Conversation

@sgagniere

Copy link
Copy Markdown
Member

…ement create (#3361)"

This reverts commit eabeb1c.

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • PLACEHOLDER

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.
  • I have put checkmarks below confirming that the feature associated with this PR is enabled in:
    • Confluent Cloud prod
    • Confluent Cloud stag
    • Confluent Platform
    • Check this box if the feature is enabled for certain organizations only

What

Temporary revert for this release.

Blast Radius

References

Test & Review

Copilot AI review requested due to automatic review settings June 18, 2026 18:28
@sgagniere
Steven Gagniere (sgagniere) requested a review from a team as a code owner June 18, 2026 18:28
@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reverts the previously introduced generic --wait framework and related Flink statement --wait enhancements, returning Flink statement create to a simpler retry.Retry(...) polling approach and removing associated test/mock coverage.

Changes:

  • Removes pkg/wait (implementation + unit tests) and switches Flink statement create --wait back to pkg/retry.Retry.
  • Removes --wait-timeout from Flink statement create (cloud + on-prem) and updates help goldens accordingly.
  • Simplifies Flink test-server handlers and drops the integration fixtures/cases that exercised timeout/failed/transition behaviors.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
internal/flink/command_statement_create.go Reverts cloud --wait implementation to retry.Retry; removes --wait-timeout; updates help text.
internal/flink/command_statement_create_onprem.go Reverts on-prem --wait implementation to retry.Retry; removes --wait-timeout; updates help text.
pkg/wait/wait.go Deletes the generic polling framework.
pkg/wait/wait_test.go Deletes unit tests for the polling framework.
test/flink_test.go Removes integration cases for --wait timeout and failed-phase behavior.
test/flink_onprem_test.go Removes the on-prem --wait integration case.
test/test-server/flink_gateway_router.go Removes mock statement phases used by the deleted integration tests; always returns COMPLETED.
test/test-server/flink_onprem_handler.go Removes the running-wait-stmt mock behavior used by the deleted on-prem integration test.
test/fixtures/output/flink/statement/create-help.golden Updates help output to remove --wait-timeout and reflect new --wait description.
test/fixtures/output/flink/statement/create-help-onprem.golden Updates on-prem help output to remove --wait-timeout and reflect new --wait description.
test/fixtures/output/flink/statement/create-missing-sql-failure.golden Updates flags listing to remove --wait-timeout.
test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden Updates flags listing to remove --wait-timeout.
test/fixtures/output/flink/statement/create-wait-timeout.golden Deletes the --wait-timeout timeout golden output.
test/fixtures/output/flink/statement/create-wait-failed.golden Deletes the failed-phase golden output.
test/fixtures/output/flink/statement/create-wait-onprem.golden Deletes the on-prem wait golden output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to 45
cmd.Flags().Bool("wait", false, "Block until the statement is running or has failed.")
cmd.Flags().StringSlice("property", []string{}, "A mechanism to pass properties in the form key=value when creating a Flink statement.")
Comment on lines +165 to +167
if statement.Status.GetPhase() == "PENDING" {
return fmt.Errorf(`statement phase is "%s"`, statement.Status.GetPhase())
}
Comment on lines +171 to 173
if err != nil {
return err
}
Comment on lines 38 to 40
cmd.Flags().String("flink-configuration", "", "The file path to hold the Flink configuration for the statement.")
cmd.Flags().Bool("wait", false, "Block until the statement reaches a terminal state.")
cmd.Flags().Duration("wait-timeout", flinkStatementCreateWaitTimeout, "Maximum time to wait when --wait is set.")
cmd.Flags().Bool("wait", false, "Boolean flag to block until the statement is running or has failed.")
addCmfFlagSet(cmd)
Comment on lines +133 to +135
if polledStatement.GetStatus().Phase == "PENDING" {
return fmt.Errorf(`statement phase is "%s"`, polledStatement.GetStatus().Phase)
}
Comment on lines +140 to 142
if err != nil {
return err
}
Comment thread test/flink_test.go
Comment on lines 478 to 480
{args: `flink statement create my-statement-2 --sql "INSERT * INTO table;" --cloud aws --region eu-west-1 --service-account sa-123456`, fixture: "flink/statement/create-without-compute-pool.golden"},
{args: `flink statement create my-statement --sql "INSERT * INTO table;" --compute-pool lfcp-123456`, fixture: "flink/statement/create-service-account-warning.golden"},
{args: `flink statement create my-statement --sql "INSERT * INTO table;" --compute-pool lfcp-123456 --service-account sa-123456 --wait`, fixture: "flink/statement/create-wait.golden"},
Comment thread test/flink_onprem_test.go
Comment on lines 519 to 521
{args: `flink statement create test-stmt --environment default --sql "SELECT * FROM test_table" --compute-pool test-pool -o yaml`, fixture: "flink/statement/create-success-yaml.golden"},
{args: `flink statement create test-stmt --environment default --sql "SELECT * FROM test_table" --compute-pool test-pool --flink-configuration test/fixtures/input/flink/statement/flink-configuration.json`, fixture: "flink/statement/create-success.golden"},
{args: `flink statement create test-stmt --environment default --sql "SELECT * FROM test_table" --compute-pool test-pool --flink-configuration test/fixtures/input/flink/statement/flink-configuration.yaml`, fixture: "flink/statement/create-success.golden"},
c.addDatabaseFlag(cmd)
cmd.Flags().Bool("wait", false, "Block until the statement reaches a terminal state.")
cmd.Flags().Duration("wait-timeout", flinkStatementCreateWaitTimeout, "Maximum time to wait when --wait is set.")
cmd.Flags().Bool("wait", false, "Block until the statement is running or has failed.")
cmd.Flags().String("flink-configuration", "", "The file path to hold the Flink configuration for the statement.")
cmd.Flags().Bool("wait", false, "Block until the statement reaches a terminal state.")
cmd.Flags().Duration("wait-timeout", flinkStatementCreateWaitTimeout, "Maximum time to wait when --wait is set.")
cmd.Flags().Bool("wait", false, "Boolean flag to block until the statement is running or has failed.")
@sonarqube-confluent

Copy link
Copy Markdown

@sgagniere
Steven Gagniere (sgagniere) merged commit 7d98f0c into main Jun 18, 2026
4 checks passed
@sgagniere
Steven Gagniere (sgagniere) deleted the temp-revert-wait-pr branch June 18, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants