Skip to content

*: warn that the scheduling service ignores label-property (#11448) - #11615

Open
ti-chi-bot wants to merge 3 commits into
tikv:release-nextgen-202609from
ti-chi-bot:cherry-pick-11448-to-release-nextgen-202609
Open

ti-chi-bot wants to merge 3 commits into
tikv:release-nextgen-202609from
ti-chi-bot:cherry-pick-11448-to-release-nextgen-202609

Conversation

@ti-chi-bot

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #11448

What problem does this PR solve?

Issue Number: ref #11443

Label-property has been deprecated since v5.2. The scheduling service has never supported it, but configuration comments and pd-ctl help do not make this limitation clear.

What is changed and how does it work?

Label-property has been deprecated since v5.2, and the scheduling service
has never supported it. Its CheckLabelProperty always returns false.

Document this limitation in the configuration comments and pd-ctl help.
Warn after a label-property setting is persisted successfully when the
scheduling service runs independently. Do not warn on deletion.

Scheduling behavior and API response bodies and status codes are unchanged.

Check List

Tests

  • Unit test: TestLabelPropertyWarning in server checks that the warning is logged only after SetLabelProperty or SetLabelPropertyConfig succeeds while the scheduling service is independent, not after a delete or a failed write, and that a failed write returns the error and keeps the previous configuration.

Validation performed:

  • Build with without_dashboard, selecting packages with non-test source files.
  • golangci-lint run --build-tags without_dashboard --allow-parallel-runners ./server ./pkg/mcs/scheduling/server/config/... passed.
  • go test -tags without_dashboard,deadlock -race ./server -run '^TestLabelPropertyWarning$' -count=5 with failpoints enabled passed in Classic and NextGen (nextgen tag).
  • From tools: golangci-lint run --build-tags without_dashboard --allow-parallel-runners ./pd-ctl/pdctl/command passed.
  • go test -tags without_dashboard ./pkg/mcs/scheduling/server/config/... ./server/config/... -count=1 passed.
  • go test -tags without_dashboard ./tests/server/config/ -run 'TestConfigTestSuite/TestConfigLabelProperty$' -count=1 passed in both classic and microservice environments.
  • From tools: go test -tags without_dashboard ./pd-ctl/tests/config/ -run 'TestConfigTestSuite/TestConfig$' -count=1 passed.
  • The broader go test -tags without_dashboard ./tests/server/config/ -run 'TestConfig' -count=1 failed in TestConfigAll, which waits for the dashboard address to change from auto with the dashboard disabled. The label-property subtest passed in both environments.

Release note

None.

Summary by CodeRabbit

  • Documentation
    • Clarified that label-property configuration is deprecated and unsupported in scheduling microservice mode.
    • Updated command help and configuration guidance to point users to placement rules or evict-leader-scheduler as alternatives.
    • Clarified that the scheduling service does not support the label-property feature.
  • Other Changes
    • Successful label-property updates now log a warning when the scheduling service runs independently.

Label-property has been deprecated since v5.2, and the scheduling service
has never supported it. Its CheckLabelProperty always returns false.

Document this limitation in the configuration comments and pd-ctl help.
Warn after a label-property setting is persisted successfully when the
scheduling service runs independently. Do not warn on deletion.

Scheduling behavior and API response bodies and status codes are unchanged.

Signed-off-by: lhy1024 <19542290+lhy1024@users.noreply.github.com>
Cover independent and embedded scheduling for set, config, and delete
operations with successful and failed persistence. Assert warning level
and current config, unchanged persistence errors, and configuration rollback.
Capture the global pingcap logger with a restored zap observer and inject
persistence failures using the existing persistFail failpoint.

Signed-off-by: lhy1024 <19542290+lhy1024@users.noreply.github.com>
Signed-off-by: lhy1024 <19542290+lhy1024@users.noreply.github.com>
@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-nextgen-202609 labels Nov 17, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be LGTMed and approved by the reviewers firstly.
  2. For pull requests to TiDB-x branches, it must have no failed tests.
  3. AFTER it has lgtm and approved labels, please wait for the cherry-pick merging approval from triage owners.
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.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5917cf4f-07a5-4580-9764-f60755e2e72b
Commits

Reviewing files that changed from the base of the PR and between bff7b9e and bf414d5.

Files selected for processing: 5

  • pkg/mcs/scheduling/server/config/config.go
  • server/config/config.go
  • server/label_property_test.go
  • server/server.go
  • tools/pd-ctl/pdctl/command/config_command.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ti-chi-bot

ti-chi-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@ti-chi-bot: 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-next-gen-1 bf414d5 link true /test pull-unit-test-next-gen-1
pull-unit-test-next-gen-2 bf414d5 link true /test pull-unit-test-next-gen-2

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.

@bufferflies bufferflies left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

test failed

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 17, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bufferflies
Once this PR has been reviewed and has the lgtm label, please assign likidu for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

Details 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 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

[LGTM Timeline notifier]

Timeline:

  • 2026-11-17 09:25:50.388783303 +0000 UTC m=+1781875.013933590: ☑️ agreed by bufferflies.

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

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/cherry-pick-not-approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-nextgen-202609

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants