tidb icon indicating copy to clipboard operation
tidb copied to clipboard

ddl: make args/DecodeArgs un-exported

Open D3Hunter opened this issue 1 year ago • 5 comments

What problem does this PR solve?

Issue Number: ref #54436

Problem Summary:

What changed and how does it work?

  • make args in job/subjob and DecodeArgs unexported, now caller should use GetXXXArgs function instead
  • remove change fields inside job.decodeArgs
  • remove tests related to MockModifyJobArg failpoint, it only test how we handle corrupted args, and the job is cancelled in this case.

Check List

Tests

  • [x] Unit test, use existing cases to cover it, we mainly rename fields/methods
  • [ ] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] No need to test
    • [ ] I checked and no code files have been changed.

Side effects

  • [ ] Performance regression: Consumes more CPU
  • [ ] Performance regression: Consumes more Memory
  • [ ] Breaking backward compatibility

Documentation

  • [ ] Affects user behaviors
  • [ ] Contains syntax changes
  • [ ] Contains variable changes
  • [ ] Contains experimental features
  • [ ] Changes MySQL compatibility

Release note

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

None

D3Hunter avatar Oct 16 '24 11:10 D3Hunter

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

tiprow[bot] avatar Oct 16 '24 11:10 tiprow[bot]

Codecov Report

Attention: Patch coverage is 90.29126% with 10 lines in your changes missing coverage. Please review.

Project coverage is 58.1706%. Comparing base (c18eaa7) to head (8246ab7). Report is 27 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56687         +/-   ##
=================================================
- Coverage   73.3439%   58.1706%   -15.1734%     
=================================================
  Files          1629       1784        +155     
  Lines        450157     648217     +198060     
=================================================
+ Hits         330163     377072      +46909     
- Misses        99731     246255     +146524     
- Partials      20263      24890       +4627     
Flag Coverage Δ
integration 40.0900% <26.2135%> (?)
unit 73.8172% <90.2912%> (+1.3488%) :arrow_up:

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.7267% <ø> (+18.1604%) :arrow_up:

codecov[bot] avatar Oct 16 '24 12:10 codecov[bot]

@joechenrh: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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/test-infra repository.

ti-chi-bot[bot] avatar Oct 17 '24 05:10 ti-chi-bot[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joechenrh, lance6716, tangenta

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[bot] avatar Oct 22 '24 05:10 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-10-17 05:18:38.679486056 +0000 UTC m=+507515.828395883: :ballot_box_with_check: agreed by lance6716.
  • 2024-10-22 05:59:46.013493473 +0000 UTC m=+330786.710284091: :ballot_box_with_check: agreed by tangenta.

ti-chi-bot[bot] avatar Oct 22 '24 05:10 ti-chi-bot[bot]