Skip to content

grafana: render stacked nulls as zero#5008

Merged
ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
nizheming:fix/grafana-stacked-null-as-zero
May 8, 2026
Merged

grafana: render stacked nulls as zero#5008
ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
nizheming:fix/grafana-stacked-null-as-zero

Conversation

@nizheming
Copy link
Copy Markdown
Contributor

@nizheming nizheming commented May 8, 2026

Summary

Issue Number: close #5009

  • set stacked Grafana graph panels to render null points as zero
  • avoid misleading stacked visualizations when a series has data gaps

Test

  • make generate-next-gen-grafana
  • parsed dashboard JSON files
  • verified every stack: true graph panel has nullPointMode: "null as zero"
Fix TiCDC Grafana stacked memory usage panels to render null datapoints as zero.

@ti-chi-bot ti-chi-bot Bot added do-not-merge/needs-linked-issue do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels May 8, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 8, 2026

Hi @nizheming. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 8, 2026

Welcome @nizheming!

It looks like this is your first PR to pingcap/ticdc 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to pingcap/ticdc. 😃

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates the Memory Usage graph panel configuration in two Grafana dashboards. The nullPointMode setting is changed from "null" to "null as zero", modifying how missing data points are rendered in both the standard and next-generation TiCDC monitoring dashboards.

Changes

Grafana Dashboard Null Point Mode Updates

Layer / File(s) Summary
Dashboard Null Point Mode Configuration
metrics/grafana/ticdc_new_arch.json, metrics/nextgengrafana/ticdc_new_arch_next_gen.json
Memory Usage panel nullPointMode changed from "null" to "null as zero" so missing/null datapoints render as zero.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nudged one line in JSON bright,
So empty gaps become a light,
Now stacked charts stack without a fear,
Zeros hop in, the view is clear,
A tiny tweak — a joyful byte.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'grafana: render stacked nulls as zero' accurately and concisely describes the main change: configuring Grafana stacked panels to handle null values as zero.
Linked Issues check ✅ Passed The PR successfully addresses issue #5009 by updating nullPointMode from 'null' to 'null as zero' in both specified Grafana dashboard files for stacked panels as required.
Out of Scope Changes check ✅ Passed All changes are scoped to Grafana dashboard JSON files and directly address the objective of fixing stacked panel null value rendering, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description includes the issue number, clear summary of changes, test verification steps, and a properly formatted release note as required by the template.

✏️ 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 May 8, 2026
@pingcap-cla-assistant
Copy link
Copy Markdown

pingcap-cla-assistant Bot commented May 8, 2026

CLA assistant check
All committers have signed the CLA.

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 updates the nullPointMode configuration from null to null as zero in two Grafana dashboard JSON files. The reviewer suggests adopting a templating tool like Grafonnet to manage these dashboards more efficiently and reduce the risk of inconsistencies during manual updates.

"links": [],
"maxPerRow": 3,
"nullPointMode": "null",
"nullPointMode": "null as zero",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

I notice this same change is applied to metrics/nextgengrafana/ticdc_new_arch_next_gen.json. Having to update multiple dashboard JSON files manually for the same change can be error-prone and increases maintenance overhead.

To improve long-term maintainability, it might be worth exploring generating these Grafana dashboards from a template using a tool like Grafonnet or a custom script. This would reduce duplication and ensure consistency between the dashboard files.

@ti-chi-bot ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels May 8, 2026
@nizheming
Copy link
Copy Markdown
Contributor Author

Issue Number: ref #5009

Update the source Grafana dashboard and regenerate next-gen dashboards with make generate-next-gen-grafana.

This keeps metrics/nextgengrafana output generated from metrics/grafana/ticdc_new_arch.json instead of editing the generated file by hand.
@nizheming nizheming force-pushed the fix/grafana-stacked-null-as-zero branch from 093e85d to cf6d8eb Compare May 8, 2026 07:53
@nizheming
Copy link
Copy Markdown
Contributor Author

Thanks for pointing this out. I reset the generated next-gen JSON, kept the source change in metrics/grafana/ticdc_new_arch.json, then ran make generate-next-gen-grafana from the repo root. The generated output is the same, and I force-pushed an amended commit documenting that flow.

Verification:

  • make generate-next-gen-grafana
  • parsed metrics/grafana/ticdc_new_arch.json, metrics/nextgengrafana/ticdc_new_arch_next_gen.json, and metrics/nextgengrafana/ticdc_new_arch_with_keyspace_name.json
  • verified all stacked graph panels in those files use nullPointMode: "null as zero"

@ti-chi-bot ti-chi-bot Bot added the lgtm label May 8, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 8, 2026

[APPROVALNOTIFIER] This PR is APPROVED

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

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,tenfyzhong]

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 May 8, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 8, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-05-08 07:45:55.899579083 +0000 UTC m=+426628.772929055: ☑️ agreed by 3AceShowHand.
  • 2026-05-08 07:58:53.249978535 +0000 UTC m=+427406.123328507: ☑️ agreed by tenfyzhong.

@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-linked-issue do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 8, 2026
@tenfyzhong
Copy link
Copy Markdown
Collaborator

/ok-to-test

@ti-chi-bot ti-chi-bot Bot added the ok-to-test Indicates a PR is ready to be tested. label May 8, 2026
@ti-chi-bot ti-chi-bot Bot removed the needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. label May 8, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 8, 2026

@nizheming: The following test 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-cdc-kafka-integration-light cf6d8eb link unknown /test pull-cdc-kafka-integration-light

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.

@ti-chi-bot ti-chi-bot Bot merged commit 6ca33f4 into pingcap:master May 8, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grafana stacked panels should render null values as zero

3 participants