tiup icon indicating copy to clipboard operation
tiup copied to clipboard

Remove usql

Open dveeden opened this issue 4 months ago • 4 comments

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

dveeden avatar Aug 26 '25 17:08 dveeden

[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[bot] avatar Aug 26 '25 17:08 ti-chi-bot[bot]

Codecov Report

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

:warning: 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 :warning:
pkg/cluster/spec/pd.go 0.00% 15 Missing :warning:
pkg/cluster/operation/upgrade.go 0.00% 13 Missing :warning:
components/client/main.go 0.00% 9 Missing :warning:
pkg/cluster/api/pdapi.go 0.00% 8 Missing :warning:
pkg/cluster/operation/action.go 0.00% 3 Missing :warning:
pkg/tidbver/tidbver.go 0.00% 3 Missing :warning:
pkg/cluster/spec/cdc.go 0.00% 2 Missing :warning:
pkg/cluster/spec/scheduling.go 0.00% 2 Missing :warning:
pkg/cluster/spec/tikv.go 0.00% 2 Missing :warning:
... 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%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Aug 26 '25 17:08 codecov-commenter

/cc @xhebox @ottok

dveeden avatar Aug 26 '25 17:08 dveeden

@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.

ti-chi-bot[bot] avatar Aug 26 '25 17:08 ti-chi-bot[bot]