Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make KeyVisualizer disabled by default #1645

Merged
merged 7 commits into from
Feb 23, 2024
Merged

Conversation

smineyev81
Copy link
Contributor

What problem does this PR solve?

KeyVisualizer sends very expensive queries to TiDB, so we had to disable it manually each time deploy Key Vizualizer https://tidb.support.pingcap.com/servicedesk/customer/portal/4/NAID-2058

What is changed and how does it work?

Makes KeyVisualizer disabled by default when tidb-dashboard is created first time

@ti-chi-bot ti-chi-bot bot requested a review from Renkai February 1, 2024 06:33
Copy link

netlify bot commented Feb 1, 2024

Deploy Preview for tidb-dashboard canceled.

Name Link
🔨 Latest commit 1e542c1
🔍 Latest deploy log https://app.netlify.com/sites/tidb-dashboard/deploys/65d788d5fc67380008e947f3

@CLAassistant
Copy link

CLAassistant commented Feb 1, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

ti-chi-bot bot commented Feb 1, 2024

Welcome @smineyev81! It looks like this is your first PR to pingcap/tidb-dashboard 🎉

@ti-chi-bot ti-chi-bot bot added the size/S label Feb 1, 2024
@baurine
Copy link
Collaborator

baurine commented Feb 7, 2024

hi @smineyev81 , thanks for your contribution, but this change may affect other use cases, we need to investigate its influences, or choose a better way to not affect others as possible.

@smineyev81
Copy link
Contributor Author

smineyev81 commented Feb 7, 2024

hi @smineyev81 , thanks for your contribution, but this change may affect other use cases, we need to investigate its influences, or choose a better way to not affect others as possible.

@baurine ,
Would addition of new command line argument (--DisableKeyVisualizer) be a better way of making KeyVisualizer disabled ?

@baurine
Copy link
Collaborator

baurine commented Feb 7, 2024

hi @smineyev81 , thanks for your contribution, but this change may affect other use cases, we need to investigate its influences, or choose a better way to not affect others as possible.

@baurine , Would addition of new command line argument (--DisableKeyVisualizer) be a better way of making KeyVisualizer disabled ?

Yep, that's a better way.

@smineyev81 smineyev81 changed the title Make KeyVisualer disabled by default Make KeyVisualizer disabled by default Feb 7, 2024
@ti-chi-bot ti-chi-bot bot added size/M and removed size/S labels Feb 7, 2024
@smineyev81
Copy link
Contributor Author

hi @smineyev81 , thanks for your contribution, but this change may affect other use cases, we need to investigate its influences, or choose a better way to not affect others as possible.

@baurine , Would addition of new command line argument (--DisableKeyVisualizer) be a better way of making KeyVisualizer disabled ?

Yep, that's a better way.

@baurine, command line arg added. Please re-review

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.27%. Comparing base (b855204) to head (1e542c1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1645      +/-   ##
==========================================
+ Coverage   24.10%   26.27%   +2.17%     
==========================================
  Files         173       97      -76     
  Lines       15715    10519    -5196     
==========================================
- Hits         3788     2764    -1024     
+ Misses      11643     7570    -4073     
+ Partials      284      185      -99     
Flag Coverage Δ
backend_integration ?
backend_ut 26.27% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b855204...1e542c1. Read the comment docs.

@smineyev81
Copy link
Contributor Author

@Renkai, @baurine
review comments addressed. Could you please re-review

@@ -69,6 +69,7 @@ func NewCLIConfig() *DashboardCLIConfig {
flag.BoolVar(&cfg.CoreConfig.EnableExperimental, "experimental", cfg.CoreConfig.EnableExperimental, "allow experimental features")
flag.StringVar(&cfg.CoreConfig.FeatureVersion, "feature-version", cfg.CoreConfig.FeatureVersion, "target TiDB version for standalone mode")
flag.IntVar(&cfg.CoreConfig.NgmTimeout, "ngm-timeout", cfg.CoreConfig.NgmTimeout, "timeout secs for accessing the ngm API")
flag.BoolVar(&cfg.CoreConfig.EnableKeyVisualizer, "keyVisualizer", true, "enable/disable key visualizer(default: true)")
Copy link
Collaborator

Choose a reason for hiding this comment

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

keyVisualizer is better to use keyviz as flag name to keep consistence with other flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@baurine,
pingcap/tidb-operator#5536
tidb-operator PR that uses keyVisualizer name as command line arg already merged :(
changing it to keyviz would require another PR to tidb-operator

let me know if you still want me to rename it or it is ok to keep keyVisualizer

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems tidb-operator use the camel naming style, so keyVisualizer is fine, while tidb-dashboard use the xx-yy naming style, I think it's better to keep the same in one project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@baurine,
renamed to keyviz
please re-review

Copy link
Collaborator

@baurine baurine left a comment

Choose a reason for hiding this comment

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

others LGTM

@smineyev81 smineyev81 requested a review from baurine February 22, 2024 06:03
@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 23, 2024
Copy link
Contributor

ti-chi-bot bot commented Feb 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-23 00:29:34.98794582 +0000 UTC m=+576263.735568924: ☑️ agreed by baurine.

Copy link
Contributor

ti-chi-bot bot commented Feb 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baurine

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

The pull request process is described here

Needs approval from an approver in each of these files:

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 added the approved label Feb 23, 2024
@ti-chi-bot ti-chi-bot bot merged commit b7e594c into pingcap:master Feb 23, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants