Skip to content

Conversation

@vsantwana
Copy link
Member

@vsantwana vsantwana commented Dec 15, 2025

Release Notes

Bug Fixes

  • Fixes creating statements in CP Flink SQL shell without explicit names

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

Creating a statement via CLI without an explicit statement name fails:

confluent --url http://localhost:8084 --environment test --compute-pool pool flink statement create --sql "SHOW TABLES"

Error message:

Error: failed to create Flink SQL statement "cli-2025-11-17-170633-01b6090a-32c2-4f69-bee2-f32b7eb84ff3" in the environment "test": {"errors":[{"message":"Statement 'cli-2025-11-17-170633-01b6090a-32c2-4f69-bee2-f32b7eb84ff3' not created in environment 'test'. Invalid name: 'cli-2025-11-17-170633-01b6090a-32c2-4f69-bee2-f32b7eb84ff3'. It must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123'), and the length must be no more than 45 characters."}]}

Current Workaround: explicitly specify a statement name (like stmt-1):

confluent --url http://localhost:8084 --environment test --compute-pool pool flink statement create stmt-1 --sql "SHOW TABLES"

Blast Radius

  • Confluent On Prem customers will need to continue using explicit name generation where they specify the SQL statement.
  • CP Flink SQL shell can stop working

References

Test & Review

Before represented by command with confluent (public release). After represented by ./confluent (local build created with the PR):

Screenshot 2025-12-15 at 12 01 11 PM

@vsantwana vsantwana requested a review from a team as a code owner December 15, 2025 04:51
Copilot AI review requested due to automatic review settings December 15, 2025 04:51
@confluent-cla-assistant
Copy link

🎉 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses statement name generation for Confluent Platform Flink by introducing a new on-premises-specific function that generates names compatible with the 45-character limit enforced by on-prem environments.

Key Changes:

  • Added GenerateStatementNameForOnPrem() function that uses a shorter random identifier (24 hex characters instead of UUID's 36 characters)
  • Updated on-prem code paths to use the new generator instead of the cloud-compatible GenerateStatementName()

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pkg/flink/types/statement.go Introduces new statement name generator optimized for on-prem 45-character limit using 12 random bytes encoded as hex
pkg/flink/internal/store/store_onprem.go Switches from cloud generator to on-prem-specific generator
internal/flink/command_statement_create_onprem.go Switches from cloud generator to on-prem-specific generator

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

@vsantwana vsantwana requested a review from fhueske December 15, 2025 05:08
@sonarqube-confluent
Copy link

Copy link
Member

@fhueske fhueske left a comment

Choose a reason for hiding this comment

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

Not a Go expert, but the change looks good to me.
Thanks for the fix @vsantwana!

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