Skip to content

DGS-24388 - Update schema counts to match UI and billing#3374

Open
tmalik (tmalikconfluent) wants to merge 1 commit into
mainfrom
DGS-24388
Open

DGS-24388 - Update schema counts to match UI and billing#3374
tmalik (tmalikconfluent) wants to merge 1 commit into
mainfrom
DGS-24388

Conversation

@tmalikconfluent
Copy link
Copy Markdown
Contributor

@tmalikconfluent tmalik (tmalikconfluent) commented May 29, 2026

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • Fix schema counts for schema registry to match UI and billing

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

Fix schema counts for schema registry to match UI and billing

Blast Radius

Schema registry schema counts could be broken in worst case.

References

https://confluentinc.atlassian.net/browse/DGS-24388

Test & Review

Added integration tests.

Manual testing:
Created a lsrc with schemas in host and a different psrc.
Before the change:
image

After the change:
image

Copilot AI review requested due to automatic review settings May 29, 2026 21:43
@tmalikconfluent tmalik (tmalikconfluent) requested a review from a team as a code owner May 29, 2026 21:43
@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.

Copy link
Copy Markdown

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 updates Schema Registry cluster describe metrics handling so schema counts match UI/billing behavior for legacy LSRCs spanning multiple PSRCs.

Changes:

  • Builds a raw Metrics API query with time_agg=MAX and agg=SUM for schema_count.
  • Adds a raw metrics client helper for fields unsupported by the typed SDK.
  • Updates test server behavior and golden output to validate the corrected schema count.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/schema-registry/command_cluster_describe.go Switches schema count metrics query to raw JSON with billing-aligned aggregation.
pkg/ccloudv2/metrics.go Adds MetricsDatasetQueryRaw to post custom Metrics API request bodies.
test/test-server/metrics_handlers.go Validates the schema count query shape and returns a multi-PSRC test value.
test/fixtures/output/schema-registry/cluster/describe.golden Updates expected used/available schema counts.

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

@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