Skip to content

Conversation

@fangnx
Copy link
Member

@fangnx fangnx commented Dec 4, 2025

What

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA: https://confluentinc.atlassian.net/browse/DGS-22770

Test & Review

Open questions / Follow-ups

@fangnx fangnx requested a review from a team as a code owner December 4, 2025 19:33
Copilot AI review requested due to automatic review settings December 4, 2025 19:33
@fangnx fangnx requested a review from a team as a code owner December 4, 2025 19:33
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 adds the Confluent-Client-Version header to Schema Registry REST API requests. The version format is "go/{version}" where the version is derived from the librdkafka library version.

  • Introduces a new helper function to generate the client version header value
  • Sets the Confluent-Client-Version header during REST service initialization

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

Comment on lines +89 to +94
// getClientVersionHeaderValue returns the client version header value
// in the format "go/{version}"
// Note: currently the client version is tied to the librdkafka version
func getClientVersionHeaderValue() string {
_, version := kafka.LibraryVersion()
return "go/" + version
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The comment states the version is 'tied to the librdkafka version', but this coupling may be confusing since this is a Schema Registry client. Consider clarifying why the librdkafka version is used for the Schema Registry client version header, or if a dedicated Schema Registry client version should be used instead.

Suggested change
// getClientVersionHeaderValue returns the client version header value
// in the format "go/{version}"
// Note: currently the client version is tied to the librdkafka version
func getClientVersionHeaderValue() string {
_, version := kafka.LibraryVersion()
return "go/" + version
// getClientVersionHeaderValue returns the Schema Registry client version header value
// in the format "go/{version}"
// Note: this version reflects the Schema Registry client, not the Kafka library version.
const schemaRegistryClientVersion = "1.0.0" // TODO: Update this version as needed for releases
func getClientVersionHeaderValue() string {
return "go/" + schemaRegistryClientVersion

Copilot uses AI. Check for mistakes.
@sonarqube-confluent
Copy link

@fangnx fangnx changed the title Add Confluent-Client-Version header to requests to SR Add Confluent-Client-Version header to requests to SR, Golang client Dec 4, 2025
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