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

config, balance: add config for labels #536

Merged
merged 1 commit into from
May 11, 2024

Conversation

djshow832
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #535

Problem Summary:
To implement label-based balance, we must add labels for TiProxy.

What is changed and how it works:

  • Add labels in config
  • Pass the config from namespace to router to balancePolicy to factors

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

- Add `labels` in configurations.

@ti-chi-bot ti-chi-bot bot requested review from bb7133 and xhebox May 11, 2024 03:29
@ti-chi-bot ti-chi-bot bot added the size/XL label May 11, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 56.25000% with 7 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@4fb56d7). Click here to learn what that means.

Files Patch % Lines
pkg/balance/factor/factor_balance.go 66.66% 2 Missing ⚠️
pkg/balance/policy/simple_policy.go 0.00% 2 Missing ⚠️
pkg/balance/factor/factor_conn.go 0.00% 1 Missing ⚠️
pkg/balance/factor/factor_cpu.go 0.00% 1 Missing ⚠️
pkg/balance/factor/factor_health.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #536   +/-   ##
=======================================
  Coverage        ?   65.71%           
=======================================
  Files           ?       71           
  Lines           ?     6461           
  Branches        ?        0           
=======================================
  Hits            ?     4246           
  Misses          ?     1895           
  Partials        ?      320           
Flag Coverage Δ
unit 65.71% <56.25%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

ti-chi-bot bot commented May 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xhebox

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 lgtm label May 11, 2024
Copy link

ti-chi-bot bot commented May 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-11 03:41:58.149821097 +0000 UTC m=+1279071.906956666: ☑️ agreed by xhebox.

@ti-chi-bot ti-chi-bot bot added the approved label May 11, 2024
@ti-chi-bot ti-chi-bot bot merged commit 0493bc8 into pingcap:main May 11, 2024
5 checks passed
@djshow832 djshow832 deleted the label_based branch May 11, 2024 03:43
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.

Add the config for labels
3 participants