Skip to content

[APIE-933] Migrate the confluent environment commands exclude the integration test - #3427

Merged
Channing Dong (channingdong) merged 3 commits into
mainfrom
APIE-933
Aug 4, 2026
Merged

[APIE-933] Migrate the confluent environment commands exclude the integration test#3427
Channing Dong (channingdong) merged 3 commits into
mainfrom
APIE-933

Conversation

@channingdong

@channingdong Channing Dong (channingdong) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

(Internal) This PR migrates the manually developed code for confluent environment commands to the auto-generated code as an effort to onboard Project Tigris going forward.

In addition, this PR improves the command help text message to be more accurate and descriptive.

Blast Radius

Minimal, comprehensive validation (not exhaustive though) has been performed to guarantee the functionally equivalent from the generated code.

In the worst case, users of confluent environment commands may notice minor cosmetic differences — for example, the environment command's help text changes from "Manage environments." to "Manage and select Confluent Cloud environments.", which are essentially improvements.

Same command helper text messages have been applied to multiple resources as well.

References

https://confluentinc.atlassian.net/browse/APIE-933

Test & Review

#1: create a new essentials environment

> confluent environment create cdong_migration
+---------------------------+-----------------+
| Current                   | false           |
| ID                        | env-ov0nqx      |
| Name                      | cdong_migration |
| Stream Governance Package | ESSENTIALS      |
+---------------------------+-----------------+

#2: describe this new essentials environment

> confluent environment describe env-ov0nqx
+---------------------------+-----------------+
| Current                   | false           |
| ID                        | env-ov0nqx      |
| Name                      | cdong_migration |
| Stream Governance Package | ESSENTIALS      |
+---------------------------+-----------------+

#3: update this new essentials environment with a different name

> confluent environment update env-ov0nqx --name cdong_updated_migration
Updated environment "env-ov0nqx".
+---------------------------+-------------------------+
| Current                   | false                   |
| ID                        | env-ov0nqx              |
| Name                      | cdong_updated_migration |
| Stream Governance Package | ESSENTIALS              |
+---------------------------+-------------------------+

#4: create a new advanced environment

> confluent environment create cdong_migration_advanced --governance-package advanced
+---------------------------+--------------------------+
| Current                   | false                    |
| ID                        | env-g3gyn1               |
| Name                      | cdong_migration_advanced |
| Stream Governance Package | ADVANCED                 |
+---------------------------+--------------------------+

#5: describe this new advanced environment

> confluent environment describe env-g3gyn1
+---------------------------+--------------------------+
| Current                   | false                    |
| ID                        | env-g3gyn1               |
| Name                      | cdong_migration_advanced |
| Stream Governance Package | ADVANCED                 |
+---------------------------+--------------------------+

#6: update this new advanced environment with different package type (downgrade), without provisioning the schema registry cluster, this is feasible.

> confluent environment update env-g3gyn1 --governance-package essentials
Updated environment "env-g3gyn1".
+---------------------------+--------------------------+
| Current                   | false                    |
| ID                        | env-g3gyn1               |
| Name                      | cdong_migration_advanced |
| Stream Governance Package | ESSENTIALS               |
+---------------------------+--------------------------+

#7: list all existing environments

> confluent environment list
  Current |     ID     |           Name           | Stream Governance Package  
----------+------------+--------------------------+----------------------------
          | env-0d1606 | Staging                  | ESSENTIALS                 
          | env-1d8mzz | Source                   | ESSENTIALS                 
          | env-3dzzx0 | FF26616_OAuth            | ESSENTIALS                 
  *       | env-3woo02 | Staging-0830             | ADVANCED                   
          | env-68g0o8 | OAuth_Demo_Environment   | ESSENTIALS                 
          | env-68wyr3 | Oauth_Test_Environment   | ESSENTIALS                 
          | env-8y1wv7 | Cluster_linking_source   | ADVANCED                   
          | env-g1xp13 | Staging-OAuthBinary      | ESSENTIALS                 
          | env-g3gyn1 | cdong_migration_advanced | ESSENTIALS                 
          | env-mp57z1 | Staging_OAuth            | ESSENTIALS                 
          | env-n5z9nz | Destination              | ESSENTIALS                 
          | env-ov0nqx | cdong_updated_migration  | ESSENTIALS                 
          | env-y2omyj | Cluster_linking_dest     | ESSENTIALS          

#8: try the new use environment command and evaluate the Current field

> confluent env use env-ov0nqx
Using environment "env-ov0nqx".
> confluent environment describe env-ov0nqx
+---------------------------+-------------------------+
| Current                   | true                    |
| ID                        | env-ov0nqx              |
| Name                      | cdong_updated_migration |
| Stream Governance Package | ESSENTIALS              |
+---------------------------+-------------------------+
> confluent environment list
  Current |     ID     |           Name           | Stream Governance Package  
----------+------------+--------------------------+----------------------------
          | env-0d1606 | Staging                  | ESSENTIALS                 
          | env-1d8mzz | Source                   | ESSENTIALS                 
          | env-3dzzx0 | FF26616_OAuth            | ESSENTIALS                 
          | env-3woo02 | Staging-0830             | ADVANCED                   
          | env-68g0o8 | OAuth_Demo_Environment   | ESSENTIALS                 
          | env-68wyr3 | Oauth_Test_Environment   | ESSENTIALS                 
          | env-8y1wv7 | Cluster_linking_source   | ADVANCED                   
          | env-g1xp13 | Staging-OAuthBinary      | ESSENTIALS                 
          | env-g3gyn1 | cdong_migration_advanced | ESSENTIALS                 
          | env-mp57z1 | Staging_OAuth            | ESSENTIALS                 
          | env-n5z9nz | Destination              | ESSENTIALS                 
  *       | env-ov0nqx | cdong_updated_migration  | ESSENTIALS                 
          | env-y2omyj | Cluster_linking_dest     | ESSENTIALS         

#9: delete both environments and confirm they are absent after deletion

> confluent environment delete env-g3gyn1
Are you sure you want to delete environment "env-g3gyn1"? (y/n): n
channingdong@CLK32PJ63L cli % dist/confluent_darwin_arm64_v8.0/confluent shell
> confluent environment delete env-g3gyn1 env-ov0nqx
Are you sure you want to delete environments "env-g3gyn1" and "env-ov0nqx"? (y/n): y
Deleted environments "env-g3gyn1" and "env-ov0nqx".
> confluent environment list
  Current |     ID     |          Name          | Stream Governance Package  
----------+------------+------------------------+----------------------------
          | env-0d1606 | Staging                | ESSENTIALS                 
          | env-1d8mzz | Source                 | ESSENTIALS                 
          | env-3dzzx0 | FF26616_OAuth          | ESSENTIALS                 
          | env-3woo02 | Staging-0830           | ADVANCED                   
          | env-68g0o8 | OAuth_Demo_Environment | ESSENTIALS                 
          | env-68wyr3 | Oauth_Test_Environment | ESSENTIALS                 
          | env-8y1wv7 | Cluster_linking_source | ADVANCED                   
          | env-g1xp13 | Staging-OAuthBinary    | ESSENTIALS                 
          | env-mp57z1 | Staging_OAuth          | ESSENTIALS                 
          | env-n5z9nz | Destination            | ESSENTIALS                 
          | env-y2omyj | Cluster_linking_dest   | ESSENTIALS

Copilot AI review requested due to automatic review settings July 31, 2026 18:23
@channingdong
Channing Dong (channingdong) requested a review from a team as a code owner July 31, 2026 18:23
@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

This PR updates the Confluent Cloud environment and RTCE command surfaces (and their test harness/goldens) as part of a generator-driven migration, including a bump of the ccloud-sdk-go-v2/org dependency and corresponding client signature changes.

Changes:

  • Regenerates/migrates Environment and RTCE Region command implementations and help text (plus associated fixtures).
  • Updates pkg/ccloudv2 org client methods to return *http.Response (and adjusts call sites accordingly).
  • Adds/adjusts test-server behavior and live tests to align with updated API/request defaults.

Reviewed changes

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

Show a summary per file
File Description
test/test-server/region_handler.go Adds generator header to test-server handler source.
test/test-server/org_handlers.go Updates mock org environment creation to default stream governance config when omitted.
test/region_test.go Adds generator header to region integration test.
test/live/region_live_test.go Adds generated RTCE region live test (list).
test/live/environment_live_test.go Updates generated live test flow/state variable naming for environments.
test/fixtures/output/rtce/rtce-topic/update-help.golden Updates RTCE topic update short description in help output.
test/fixtures/output/rtce/rtce-topic/help.golden Updates RTCE topic command help strings.
test/fixtures/output/rtce/region/help.golden Updates RTCE region command help strings.
test/fixtures/output/rtce/help.golden Updates top-level RTCE help strings.
test/fixtures/output/environment/use-help.golden Updates environment use long help text.
test/fixtures/output/environment/update-help.golden Updates environment update help/flag text.
test/fixtures/output/environment/list-help.golden Updates environment list help text.
test/fixtures/output/environment/help.golden Updates top-level environment help strings.
test/fixtures/output/environment/describe-help.golden Updates environment describe help text.
test/fixtures/output/environment/delete-help.golden Updates environment delete help text.
test/fixtures/output/environment/create-help.golden Updates environment create help/flag text.
test/fixtures/output/environment/3.golden Updates expected output for environment update scenario.
pkg/cmd/flags.go Updates environment autocomplete to match new GetOrgEnvironment return signature.
pkg/ccloudv2/rtce.go Reorders RTCE regions API helpers (no functional change intended).
pkg/ccloudv2/org.go Refactors org + environment API wrappers; environment calls now return *http.Response for richer error handling by callers.
internal/rtce/command_rtce_topic.go Updates RTCE topic command short help string.
internal/rtce/command_rtce_topic_update.go Updates RTCE topic update short help string.
internal/rtce/command_region.go Adds generator header and updates RTCE region command short help string.
internal/rtce/command_region_list.go Adds generator header to RTCE region list command.
internal/flink/command_statement_create.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_shell.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_materialized_table_update.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_materialized_table_list.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_materialized_table_describe.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_materialized_table_delete.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_materialized_table_create.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_connection_update.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_connection_list.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_connection_describe.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_connection_delete.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_connection_create.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_compute_pool_update.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_compute_pool_create.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_artifact_list.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_artifact_describe.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_artifact_delete.go Adjusts for new GetOrgEnvironment return signature.
internal/flink/command_artifact_create.go Adjusts for new GetOrgEnvironment return signature.
internal/environment/command.go Migrates environment root command; introduces shared table output + custom completions.
internal/environment/command_use.go Migrates environment use to new org client signatures and error catching.
internal/environment/command_update.go Migrates environment update to new org client signatures and output behavior.
internal/environment/command_list.go Migrates environment list to new output struct and command type.
internal/environment/command_describe.go Migrates environment describe to shared print helper and new org client signature.
internal/environment/command_delete.go Migrates environment delete to string resource type and adjusts config cleanup behavior.
internal/environment/command_create.go Migrates environment create to new org client signature and revised governance handling.
internal/connect/command_artifact_list.go Adjusts for new GetOrgEnvironment return signature.
internal/connect/command_artifact_describe.go Adjusts for new GetOrgEnvironment return signature.
internal/connect/command_artifact_delete.go Adjusts for new GetOrgEnvironment return signature.
internal/connect/command_artifact_create.go Adjusts for new GetOrgEnvironment return signature.
internal/command.go Updates root command wiring to pass config into environment command constructor.
go.mod Bumps github.com/confluentinc/ccloud-sdk-go-v2/org to v0.13.0.
go.sum Updates checksums for ccloud-sdk-go-v2/org v0.13.0.
.cli-generation-checksum Updates generator checksum.
Files not reviewed (7)
  • internal/environment/command.go: Generated file
  • internal/environment/command_create.go: Generated file
  • internal/environment/command_delete.go: Generated file
  • internal/environment/command_describe.go: Generated file
  • internal/environment/command_list.go: Generated file
  • internal/environment/command_update.go: Generated file
  • internal/environment/command_use.go: Generated file

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

Comment thread internal/environment/command_update.go
Comment thread internal/environment/command_update.go Outdated
Comment thread internal/environment/command.go Outdated

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

Copilot reviewed 49 out of 57 changed files in this pull request and generated no new comments.

Files not reviewed (7)
  • internal/environment/command.go: Generated file
  • internal/environment/command_create.go: Generated file
  • internal/environment/command_delete.go: Generated file
  • internal/environment/command_describe.go: Generated file
  • internal/environment/command_list.go: Generated file
  • internal/environment/command_update.go: Generated file
  • internal/environment/command_use.go: Generated file
Suppressed comments (21)

internal/environment/command_update.go:67

  • output.Printf always writes to stdout, so printing the "Updated environment ..." line unconditionally will corrupt -o json / -o yaml output (it will prepend a human-readable line before the serialized payload). Gate this message to human output only.
    internal/flink/command_statement_create.go:66
  • GetOrgEnvironment now returns the raw SDK error; returning err.Error() here can surface unformatted API errors and miss the CLI's standard CCloud v2 error parsing. Capture the HTTP response and wrap via errors.CatchCCloudV2Error before building the user-facing error.
    internal/flink/command_shell.go:179
  • GetOrgEnvironment now returns the raw SDK error; using err.Error() directly here can leak unformatted API errors. Capture the HTTP response and wrap via errors.CatchCCloudV2Error so the shell prints consistent CLI errors.
    internal/flink/command_materialized_table_update.go:61
  • This environment existence check now discards the HTTP response from GetOrgEnvironment, and the returned error is the raw SDK error. Wrap it with errors.CatchCCloudV2Error before using it as the primary error message so users get consistent, parsed CCloud v2 errors.
    internal/flink/command_materialized_table_list.go:38
  • GetOrgEnvironment now returns raw SDK errors; using err.Error() here can produce noisy/unparsed output. Capture the HTTP response and wrap the error via errors.CatchCCloudV2Error before surfacing it to the user.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_materialized_table_describe.go:42

  • This path uses err.Error() from the raw SDK error returned by GetOrgEnvironment. Wrap the error with errors.CatchCCloudV2Error (using the HTTP response) to preserve consistent CLI error formatting.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_materialized_table_delete.go:43

  • GetOrgEnvironment now returns a raw SDK error; returning err.Error() here can leak unparsed API error details and be inconsistent with other CCloud v2 error handling. Wrap via errors.CatchCCloudV2Error using the HTTP response.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_materialized_table_create.go:83

  • This environment validation returns err.Error() from the raw SDK error returned by GetOrgEnvironment. Capture the HTTP response and wrap the error via errors.CatchCCloudV2Error so the user gets a parsed, consistent error message.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_connection_update.go:53

  • GetOrgEnvironment now returns raw SDK errors; using err.Error() directly can expose unparsed API errors. Capture the HTTP response and wrap with errors.CatchCCloudV2Error before building the CLI error message.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_connection_list.go:44

  • GetOrgEnvironment now returns a raw SDK error; using err.Error() directly can expose unparsed API errors. Capture the HTTP response and wrap via errors.CatchCCloudV2Error before returning a CLI error.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_connection_describe.go:41

  • This environment lookup now yields raw SDK errors; returning err.Error() can lead to noisy/unparsed messages. Capture the HTTP response and wrap with errors.CatchCCloudV2Error before surfacing it to the user.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_connection_delete.go:43

  • GetOrgEnvironment now returns raw SDK errors; using err.Error() directly can expose unparsed API errors. Capture the HTTP response and wrap with errors.CatchCCloudV2Error so the CLI error is consistent.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/flink/command_connection_create.go:83

  • This environment validation returns err.Error() from the raw SDK error returned by GetOrgEnvironment. Capture the HTTP response and wrap via errors.CatchCCloudV2Error before returning a CLI error.
	if _, _, err := c.V2Client.GetOrgEnvironment(environmentId); err != nil {
		return errors.NewErrorWithSuggestions(err.Error(), fmt.Sprintf(envNotFoundErrorMsg, environmentId))
	}

internal/connect/command_artifact_list.go:49

  • This converts any GetOrgEnvironment failure (including auth/network errors) into a misleading "not found" error. Since GetOrgEnvironment now returns raw SDK errors, keep the original error context to avoid masking real failures.
	if _, _, err = c.V2Client.GetOrgEnvironment(environment); err != nil {
		return fmt.Errorf("environment '%s' not found", environment)
	}

internal/connect/command_artifact_describe.go:48

  • This reports "environment not found" for any failure returned by GetOrgEnvironment, which can mask auth/network issues. Preserve the underlying error so users can diagnose the real cause.
	if _, _, err = c.V2Client.GetOrgEnvironment(environment); err != nil {
		return fmt.Errorf("environment '%s' not found", environment)
	}

internal/connect/command_artifact_delete.go:50

  • This turns all GetOrgEnvironment errors into a "not found" message, which can be inaccurate (e.g., forbidden, network failure). Preserve and wrap the original error instead of rewriting it.
	if _, _, err = c.V2Client.GetOrgEnvironment(environment); err != nil {
		return fmt.Errorf("environment '%s' not found", environment)
	}

internal/connect/command_artifact_create.go:66

  • This rewrites any error from GetOrgEnvironment as "not found", masking other failure modes (auth, transient API errors). Preserve the underlying error context by wrapping it instead.
	if _, _, err = c.V2Client.GetOrgEnvironment(environment); err != nil {
		return fmt.Errorf("environment '%s' not found", environment)
	}

internal/flink/command_artifact_create.go:100

  • This rewrites all GetOrgEnvironment errors as "not found", masking other common failure modes (e.g., forbidden or transient API errors). Wrap and return the original error instead of replacing it.
	if _, _, err = c.V2Client.GetOrgEnvironment(environment); err != nil {
		return fmt.Errorf("environment '%s' not found", environment)
	}

internal/flink/command_compute_pool_create.go:70

  • GetOrgEnvironment now returns raw SDK errors; returning err directly here can leak unparsed API errors and be inconsistent with other V2Client helpers that wrap errors via errors.CatchCCloudV2Error. Consider capturing httpResp from GetOrgEnvironment and returning errors.CatchCCloudV2Error(err, httpResp) instead.
	environment, _, err := c.V2Client.GetOrgEnvironment(environmentId)
	if err != nil {
		return err
	}

internal/flink/command_compute_pool_update.go:66

  • GetOrgEnvironment now returns raw SDK errors; returning err directly here can surface unparsed API errors. Capture the HTTP response from GetOrgEnvironment and wrap via errors.CatchCCloudV2Error for consistent CLI error formatting.
	environment, _, err := c.V2Client.GetOrgEnvironment(environmentId)
	if err != nil {
		return err
	}

internal/flink/command_artifact_list.go:64

  • This reports "environment not found" for any error from GetOrgEnvironment, which can mask auth/network/API failures. Preserve the underlying error context so users can diagnose the real failure mode.
	if _, _, err = c.V2Client.GetOrgEnvironment(environment); err != nil {
		return fmt.Errorf("environment '%s' not found", environment)
	}

Comment thread internal/environment/command_update.go Outdated
StreamGovernancePackage: environment.StreamGovernanceConfig.GetPackage(),
})
return table.Print()
output.Printf(c.Config.EnableColor, "Updated environment \"%s\".\n", id)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This update command has json/yaml output, so printing this message to stdout is a breaking change.

I think we should only print this message for resources that do not contain output.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems ok:

Official version:

channingdong@CLK32PJ63L cli % confluent shell
> confluent env update env-0d1606 --name verify_output -o yaml
is_current: false
id: env-0d1606
name: verify_output
stream_governance_package: ESSENTIALS
> confluent env update env-0d1606 --name verify_output -o json
{
  "is_current": false,
  "id": "env-0d1606",
  "name": "verify_output",
  "stream_governance_package": "ESSENTIALS"
}
> confluent exit

Engineering version:

channingdong@CLK32PJ63L cli % dist/confluent_darwin_arm64_v8.0/confluent shell
> confluent env update env-0d1606 --name engineering_verify_output -o json
Updated environment "env-0d1606".
{
  "is_current": false,
  "id": "env-0d1606",
  "name": "engineering_verify_output",
  "stream_governance_package": "ESSENTIALS"
}
> confluent env update env-0d1606 --name engineering_verify_output -o yaml
Updated environment "env-0d1606".
is_current: false
id: env-0d1606
name: engineering_verify_output
stream_governance_package: ESSENTIALS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The issue is that you cannot parse the json anymore because "Updated environment..." is not json:

confluent environment update env-<redacted> --name "testing" -o json | jq '.name'
jq: parse error: Invalid numeric literal at line 1, column 8

main for comparison:

confluent environment update env-<redacted> --name "testing" -o json | jq '.name'
"testing"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed:

channingdong@CLK32PJ63L cli % dist/confluent_darwin_arm64_v8.0/confluent environment update env-0d1606 --name "testing" -o json | jq '.name'
"testing"

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

Copilot reviewed 49 out of 57 changed files in this pull request and generated no new comments.

Files not reviewed (7)
  • internal/environment/command.go: Generated file
  • internal/environment/command_create.go: Generated file
  • internal/environment/command_delete.go: Generated file
  • internal/environment/command_describe.go: Generated file
  • internal/environment/command_list.go: Generated file
  • internal/environment/command_update.go: Generated file
  • internal/environment/command_use.go: Generated file
Suppressed comments (2)

internal/environment/command_describe.go:46

  • environment describe now returns the raw CCloud V2 error without any guidance on what to do next (unlike environment use, and the previous behavior). For common failures like an unknown environment ID, adding a suggestion to run confluent environment list improves UX consistency.
    test/live/environment_live_test.go:54
  • The live CRUD test no longer verifies that the update actually changed the environment name; it only checks exit code. Re-adding a describe/assert step after the update will catch regressions where the update is accepted but ignored or only partially applied.

@channingdong
Channing Dong (channingdong) merged commit d420791 into main Aug 4, 2026
4 checks passed
@sonarqube-confluent

Copy link
Copy Markdown

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