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

Fix(e2e): run a mysql client in kind to test graceful shutdown case #6005

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

fgksgf
Copy link
Member

@fgksgf fgksgf commented Dec 23, 2024

What problem does this PR solve?

The e2e case should be able to gracefully shutdown tidb is not stable, because we use port-forward to connect to tidb.

According to kubectl port-forward doc:

If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun of the command is needed to resume forwarding.

https://kubernetes.io/docs/reference/kubectl/generated/kubectl_port-forward/#synopsis

What is changed and how does it work?

This PR adds a binary and deploy it to KinD to test the graceful shutdown case. The binary acts as a mysql client, it connects to the tidb cluster via k8s service's cluster IP.

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.14%. Comparing base (3a93897) to head (6f60ab1).

Additional details and impacted files
@@             Coverage Diff             @@
##           feature/v2    #6005   +/-   ##
===========================================
  Coverage       21.14%   21.14%           
===========================================
  Files             152      152           
  Lines           10379    10379           
===========================================
  Hits             2195     2195           
  Misses           7972     7972           
  Partials          212      212           
Flag Coverage Δ
unittest 21.14% <ø> (ø)

@csuzhangxc
Copy link
Member

/run-pull-e2e-kind-v2

1 similar comment
@fgksgf
Copy link
Member Author

fgksgf commented Dec 23, 2024

/run-pull-e2e-kind-v2

Copy link
Contributor

ti-chi-bot bot commented Dec 23, 2024

@csuzhangxc: 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-sigs/prow repository.

Copy link
Contributor

ti-chi-bot bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: csuzhangxc

The full list of commands accepted by this bot can be found 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

@csuzhangxc csuzhangxc merged commit 43de8f5 into pingcap:feature/v2 Dec 23, 2024
7 of 8 checks passed
@fgksgf fgksgf deleted the huaxi/fix-e2e branch December 24, 2024 02:31
@liubog2008 liubog2008 added the v2 for operator v2 label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants