Skip to content

DGS-25000 Add exporter cluster-link config describe command - #3462

Open
tmalik (tmalikconfluent) wants to merge 1 commit into
confluentinc:mainfrom
tmalikconfluent:dgs-25000-exporter-association-filter-config
Open

DGS-25000 Add exporter cluster-link config describe command#3462
tmalik (tmalikconfluent) wants to merge 1 commit into
confluentinc:mainfrom
tmalikconfluent:dgs-25000-exporter-association-filter-config

Conversation

@tmalikconfluent

@tmalikconfluent tmalik (tmalikconfluent) commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Release Notes

New Features

  • Add confluent schema-registry exporter configuration cluster-link describe to derive the Cluster Link config(s) that replicate a schema exporter's subject/context translation.

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

Confluent Cloud only. Adds a new CLI command, confluent schema-registry exporter configuration cluster-link describe <name>, which calls the new SR management endpoint GET /exporters/{name}/config/clusterlink (confluentinc/schema-registry-plugins#2134) and prints the derived Cluster Link config(s) for that exporter, so they don't have to be hand-copied.

Blast Radius

New, additive command under schema-registry exporter configuration; no existing commands or behavior are changed.

References

JIRA: DGS-25000
Backend: confluentinc/schema-registry-plugins#2134
SDK: schema-registry-sdk-go@v0.1.3-0.20260812213011-262e9f97627b

Test & Review

Added CLI integration test coverage (test/schema_registry_test.go, JSON/YAML golden fixtures) and test-server route/handler for the new endpoint.

Adds `confluent schema-registry exporter configuration cluster-link describe`,
which calls the new SR `GET /exporters/{name}/config/clusterlink` endpoint
(confluentinc/schema-registry-plugins#2134) to derive the Cluster Link
config(s) that replicate a schema exporter's subject/context translation.
@tmalikconfluent
tmalik (tmalikconfluent) requested a review from a team as a code owner August 20, 2026 21:28
Copilot AI lite review requested due to automatic review settings August 20, 2026 21:28

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

Adds a new Schema Registry exporter subcommand to fetch and print the derived Cluster Link configuration for an exporter, backed by a new Schema Registry SDK endpoint, and validated via CLI integration tests + test-server wiring.

Changes:

  • Add confluent schema-registry exporter configuration cluster-link describe <name> command that calls GET /exporters/{name}/config/clusterlink.
  • Extend the Schema Registry client to call the new SDK method for the cluster-link config endpoint.
  • Add test-server route/handler and CLI integration tests with JSON/YAML golden fixtures.

Reviewed changes

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

Show a summary per file
File Description
test/test-server/schema_registry_router.go Adds a mock route for /exporters/{name}/config/clusterlink.
test/test-server/schema_registry_handlers.go Adds a handler returning a representative derived Cluster Link config map.
test/schema_registry_test.go Adds integration test cases for JSON/YAML output of the new command.
test/fixtures/output/schema-registry/exporter/configuration/cluster-link-describe-yaml.golden Adds YAML golden output for the new command.
test/fixtures/output/schema-registry/exporter/configuration/cluster-link-describe-json.golden Adds JSON golden output for the new command.
pkg/schemaregistry/client.go Adds GetExporterClusterLinkConfig client wrapper method.
internal/schema-registry/command_exporter_configuration.go Wires the new cluster-link subtree under exporter configuration.
internal/schema-registry/command_exporter_configuration_cluster_link.go Introduces the cluster-link command group (needs Cloud gating).
internal/schema-registry/command_exporter_configuration_cluster_link_describe.go Implements the describe command (currently exposes on-prem flags; should be Cloud-only).
go.mod Bumps schema-registry-sdk-go to the referenced version with the new endpoint.
go.sum Adds checksums for the bumped schema-registry-sdk-go version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +11 to +30
func (c *command) newExporterConfigurationClusterLinkDescribeCommand(cfg *config.Config) *cobra.Command {
cmd := &cobra.Command{
Use: "describe <name>",
Short: "Describe the schema exporter's Cluster Link config.",
Long: "Derive the Cluster Link config(s) that replicate a schema exporter's subject/context translation, so they don't have to be hand-copied.",
Args: cobra.ExactArgs(1),
RunE: c.exporterConfigurationClusterLinkDescribe,
}

pcmd.AddContextFlag(cmd, c.CLICommand)
if cfg.IsCloudLogin() {
pcmd.AddEnvironmentFlag(cmd, c.AuthenticatedCLICommand)
} else {
addCaLocationAndClientPathFlags(cmd)
}
addSchemaRegistryEndpointFlag(cmd)
pcmd.AddOutputFlagWithDefaultValue(cmd, output.JSON.String())

return cmd
}
Comment on lines +3 to +18
import (
"github.com/spf13/cobra"

"github.com/confluentinc/cli/v4/pkg/config"
)

func (c *command) newExporterConfigurationClusterLinkCommand(cfg *config.Config) *cobra.Command {
cmd := &cobra.Command{
Use: "cluster-link",
Short: "Manage the schema exporter's Cluster Link config.",
}

cmd.AddCommand(c.newExporterConfigurationClusterLinkDescribeCommand(cfg))

return cmd
}
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.

2 participants