Skip to content

Conversation

@bufferflies
Copy link
Contributor

@bufferflies bufferflies commented Apr 23, 2025

What problem does this PR solve?

Issue Number: Close #9285

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Code changes

Side effects

Related changes

Release note

None.

Signed-off-by: 童剑 <1045931706@qq.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 23, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. 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 Apr 23, 2025
@codecov
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.03%. Comparing base (7c3b9a3) to head (1bbc0b1).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9239      +/-   ##
==========================================
+ Coverage   75.96%   76.03%   +0.07%     
==========================================
  Files         472      472              
  Lines       73249    73256       +7     
==========================================
+ Hits        55646    55703      +57     
+ Misses      14131    14099      -32     
+ Partials     3472     3454      -18     
Flag Coverage Δ
unittests 76.03% <100.00%> (+0.07%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bufferflies bufferflies changed the title client: expose cancel schedueler job api client: expose new api to cancel schedueler job Apr 25, 2025
@bufferflies bufferflies changed the title client: expose new api to cancel schedueler job client: expose new api to cancel scheduler job Apr 25, 2025
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 29, 2025
Signed-off-by: 童剑 <1045931706@qq.com>
@bufferflies bufferflies force-pushed the cancel_scheduler_job branch from 92239c0 to c6c2ad7 Compare April 29, 2025 13:04
Signed-off-by: 童剑 <1045931706@qq.com>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 29, 2025
Signed-off-by: 童剑 <1045931706@qq.com>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/needs-linked-issue labels Apr 29, 2025
@bufferflies bufferflies marked this pull request as ready for review April 29, 2025 13:16
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 29, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new API to cancel scheduler jobs in PD and updates the client and integration tests accordingly.

  • Introduces CancelSchedulerJob as a new method in the client interface and its implementation.
  • Adds a URI generator function for the cancel operation in the API layer.
  • Updates integration tests to verify that the scheduler job cancellation behaves as expected.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/integrations/client/http_client_test.go Updates to test job cancellation behavior
client/http/request_info.go Added constant for cancel scheduler job request
client/http/interface.go Introduced method and implementation for canceling a scheduler job
client/http/api.go Added URI function for cancel scheduler job
Comments suppressed due to low confidence (1)

tests/integrations/client/http_client_test.go:615

  • [nitpick] Consider renaming 'checkFn' to a more descriptive name such as 'getJobDetails' to improve test readability.
checkFn := func() map[string]any {

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Apr 30, 2025
@ti-chi-bot ti-chi-bot bot added the approved label Apr 30, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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 and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 30, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 30, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-04-30 04:32:08.625149701 +0000 UTC m=+1021272.436940082: ☑️ agreed by lhy1024.
  • 2025-04-30 06:03:19.218102268 +0000 UTC m=+1026743.029892699: ☑️ agreed by okJiang.

@ti-chi-bot ti-chi-bot bot merged commit 1798400 into tikv:master May 6, 2025
27 of 36 checks passed
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-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

api: expose new api to cancel one job

3 participants