Skip to content

metrics,scripts: keep TiCDC dashboard titles consistent#4765

Merged
ti-chi-bot[bot] merged 4 commits intopingcap:masterfrom
tenfyzhong:metrics/dashboard-title-variable-4764
Apr 8, 2026
Merged

metrics,scripts: keep TiCDC dashboard titles consistent#4765
ti-chi-bot[bot] merged 4 commits intopingcap:masterfrom
tenfyzhong:metrics/dashboard-title-variable-4764

Conversation

@tenfyzhong
Copy link
Copy Markdown
Collaborator

@tenfyzhong tenfyzhong commented Apr 8, 2026

What problem does this PR solve?

Issue Number: close #4764

TiCDC dashboards still hardcode test-cluster in their titles, and the next-gen metrics generator can silently miss required title or label substitutions when the base title template changes.

What is changed and how it works?

  • Updates metrics/grafana/ticdc_new_arch.json and metrics/nextgengrafana/ticdc_new_arch_next_gen.json to use ${DS_TEST-CLUSTER}-TiCDC-New-Arch.
  • Updates metrics/nextgengrafana/ticdc_new_arch_with_keyspace_name.json to use ${DS_TEST-CLUSTER}-TiCDC-New-Arch-KeyspaceName.
  • Updates scripts/generate-next-gen-metrics.sh so the keyspace-title replacement matches the current base title.
  • Adds fail-fast checks to require -KeyspaceName in the generated user dashboard and sharedpool_id in the generated shared dashboard.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Manual test steps:

  • bash ./scripts/generate-next-gen-metrics.sh
  • jq empty metrics/grafana/ticdc_new_arch.json metrics/nextgengrafana/ticdc_new_arch_next_gen.json metrics/nextgengrafana/ticdc_new_arch_with_keyspace_name.json
  • grep -F -- '-KeyspaceName' metrics/nextgengrafana/ticdc_new_arch_with_keyspace_name.json
  • grep -F -- 'sharedpool_id' metrics/nextgengrafana/ticdc_new_arch_next_gen.json
  • git diff --check

Questions

Will it cause performance regression or break compatibility?

No.

Do you need to update user documentation, design documentation or monitoring documentation?

No additional documentation is needed.

Release note

None

Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

Three Grafana dashboard JSON files are updated to use a templated datasource variable in the title field instead of a hardcoded cluster name. The title pattern changes from test-cluster-TiCDC-New-Arch to ${DS_TEST-CLUSTER}-cluster-TiCDC-New-Arch, enabling dynamic title rendering based on the selected datasource.

Changes

Cohort / File(s) Summary
Grafana Dashboard Title Updates
metrics/grafana/ticdc_new_arch.json, metrics/nextgengrafana/ticdc_new_arch_next_gen.json, metrics/nextgengrafana/ticdc_new_arch_with_keyspace_name.json
Updated title field to use ${DS_TEST-CLUSTER} variable, replacing hardcoded test-cluster reference with templated datasource variable for dynamic cluster name resolution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

lgtm, approved

Suggested reviewers

  • wk989898

Poem

🐇 Hop hop, the titles now dance with the light,
No more hardcoded clusters, just variables bright!
Each datasource now gets its proper name,
TiCDC dashboards play the templating game!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully implements the solution proposed in issue #4764: all three affected dashboard title fields now interpolate ${DS_TEST-CLUSTER} as required.
Out of Scope Changes check ✅ Passed All changes are scoped to updating the title fields of three Grafana dashboard JSON files as specified in issue #4764; no extraneous modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change—updating TiCDC dashboard titles to use a datasource variable instead of hardcoding 'test-cluster'.
Description check ✅ Passed The description includes issue reference, detailed change explanation, manual test steps, and answers to all required template questions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 8, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the hardcoded "test-cluster" prefix with the "${DS_TEST-CLUSTER}" variable in several Grafana dashboard titles. Feedback suggests removing the redundant "-cluster" suffix from the titles, as the variable likely already includes it, to avoid repetitive naming like "test-cluster-cluster".

Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 8, 2026
Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 8, 2026
Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
@tenfyzhong tenfyzhong changed the title metrics: use datasource variable in TiCDC dashboard titles metrics,scripts: keep TiCDC dashboard titles consistent Apr 8, 2026
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 8, 2026
@ti-chi-bot ti-chi-bot bot added the lgtm label Apr 8, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 8, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, lidezhu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [3AceShowHand,lidezhu]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Apr 8, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 8, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-04-08 07:32:43.063664483 +0000 UTC m=+941568.269024540: ☑️ agreed by 3AceShowHand.
  • 2026-04-08 08:05:50.499662937 +0000 UTC m=+943555.705022984: ☑️ agreed by lidezhu.

@tenfyzhong
Copy link
Copy Markdown
Collaborator Author

/tide

@ti-chi-bot ti-chi-bot bot merged commit 0a418b4 into pingcap:master Apr 8, 2026
29 of 31 checks passed
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 8, 2026

@tenfyzhong: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-unit-test cf6ef50 link unknown /test pull-unit-test
pull-cdc-pulsar-integration-light cf6ef50 link unknown /test pull-cdc-pulsar-integration-light
pull-cdc-mysql-integration-light-next-gen cf6ef50 link unknown /test pull-cdc-mysql-integration-light-next-gen

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Keep TiCDC dashboard titles consistent in next-gen metrics

3 participants