Skip to content

Conversation

@dveeden
Copy link
Contributor

@dveeden dveeden commented Aug 26, 2025

What problem does this PR solve?

close #2588

What is changed and how it works?

Replaces usql (which brings many indirect dependencies) with printing a line that prints the commandline options for MySQL Client.

This fixes:

  • the large number of indirect dependencies of usql
  • the usql behaviour not matching the behavior of TiDB docs (as it follows postgres behavior)
  • tiup client for playground having a different behavior and experience as a tiup cluster or k8s deployed cluster.

We could:

  • Directly call mysql
  • Detect what clients (MySQL Client, MySQL Shell, mycli, usql, DBeaver, etc) are installed and print what is applicable

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

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

Related changes

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

Release notes:

NONE

@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2025
@ti-chi-bot ti-chi-bot bot requested a review from kaaaaaaang August 26, 2025 17:46
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 26, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bb7133 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.

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 requested a review from srstack August 26, 2025 17:46
@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 26, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 1.13636% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.60%. Comparing base (e446891) to head (68360f3).
⚠️ Report is 5 commits behind head on master.

⚠️ Current head 68360f3 differs from pull request most recent head 758d560

Please upload reports for the commit 758d560 to get more accurate results.

Files with missing lines Patch % Lines
pkg/cluster/manager/upgrade.go 0.00% 19 Missing ⚠️
pkg/cluster/spec/pd.go 0.00% 15 Missing ⚠️
pkg/cluster/operation/upgrade.go 0.00% 13 Missing ⚠️
components/client/main.go 0.00% 9 Missing ⚠️
pkg/cluster/api/pdapi.go 0.00% 8 Missing ⚠️
pkg/cluster/operation/action.go 0.00% 3 Missing ⚠️
pkg/tidbver/tidbver.go 0.00% 3 Missing ⚠️
pkg/cluster/spec/cdc.go 0.00% 2 Missing ⚠️
pkg/cluster/spec/scheduling.go 0.00% 2 Missing ⚠️
pkg/cluster/spec/tikv.go 0.00% 2 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2596      +/-   ##
==========================================
- Coverage   40.97%   40.60%   -0.37%     
==========================================
  Files         363      363              
  Lines       37683    38216     +533     
==========================================
+ Hits        15440    15517      +77     
- Misses      20327    20781     +454     
- Partials     1916     1918       +2     
Flag Coverage Δ
tiup 33.89% <ø> (ø)
unittest 16.61% <1.14%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@dveeden
Copy link
Contributor Author

dveeden commented Aug 26, 2025

/cc @xhebox @ottok

@ti-chi-bot ti-chi-bot bot requested a review from xhebox August 26, 2025 17:48
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 26, 2025

@dveeden: GitHub didn't allow me to request PR reviews from the following users: ottok.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @xhebox @ottok

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.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update github.com/xo/usql v0.9.5 -> v0.19.x

2 participants