Skip to content

pd-ctl: use url to construct the request path of list keyspace #9386

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

Merged
merged 4 commits into from
Jun 12, 2025

Conversation

YuJuncen
Copy link
Contributor

@YuJuncen YuJuncen commented Jun 6, 2025

What problem does this PR solve?

Issue Number: Close #9385

What is changed and how does it work?

Use url to construct the requesting url.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
> bin/pd-ctl keyspace list --page_token=9 -u '127.0.0.1:35657'
{
    "keyspaces": [
        {
            "id": 9,
            "name": "ks-8531587855240960849",
            "state": "ENABLED",
            "created_at": 1749191139,
            "state_changed_at": 1749191139
        },
        {
            "id": 10,
            "name": "ks-13162349455034470458",
            "state": "ENABLED",
            "created_at": 1749191139,
            "state_changed_at": 1749191139
        }
    ],
    "next_page_token": ""
}
  • No code

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

Fixed a bug that caused `pd-ctl keyspace list` returns 404 when only specifing `--page_token`.

@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. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 6, 2025
Signed-off-by: Juncen Yu <[email protected]>
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 6, 2025
Copy link
Contributor

ti-chi-bot bot commented Jun 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bufferflies, okJiang

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 lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 9, 2025
Copy link
Contributor

ti-chi-bot bot commented Jun 9, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-06 07:56:24.968854753 +0000 UTC m=+601271.171200011: ☑️ agreed by okJiang.
  • 2025-06-09 09:31:24.747270553 +0000 UTC m=+261062.975585829: ☑️ agreed by bufferflies.

@YuJuncen
Copy link
Contributor Author

/run-check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot merged commit 57273ac into tikv:master Jun 12, 2025
23 checks passed
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.09%. Comparing base (29ead01) to head (94e8943).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9386      +/-   ##
==========================================
- Coverage   76.10%   76.09%   -0.01%     
==========================================
  Files         478      478              
  Lines       74707    74698       -9     
==========================================
- Hits        56853    56845       -8     
  Misses      14316    14316              
+ Partials     3538     3537       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

pd-ctl: keyspace list may not work properly when limit not specified but page_token specified.
3 participants