tiup icon indicating copy to clipboard operation
tiup copied to clipboard

playground: auto tiproxy sign certs

Open xhebox opened this issue 1 year ago • 2 comments

What problem does this PR solve?

User needs to manually set session-xxxxx for tidb, to make tiproxy migration works. However, we could just generate a self-signed cert automatically. There is no security implication: the only requirement for this cert, is that, it should be same on all tidb instances.

Check List

Tests

  • Unit test
  • Integration test
  • [x] Manual test (add detailed scripts or steps below)
[2024/01/29 15:59:00.527 +08:00] [INFO] [session_token.go:198] ["signing cert is loaded successfully"] ["cert path"=/Users/xhe/.tiup/data/U2jjZcE/tiproxy.crt] ["key path"=/Users/xhe/.tiup/data/U2jjZcE/tiproxy.key]
  • 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:

Enable tiproxy connection migration by default on playground

xhebox avatar Jan 29 '24 08:01 xhebox

[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 kaaaaaaang for approval. For more information see the Kubernetes Code Review Process.

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 Jan 29 '24 08:01 ti-chi-bot[bot]

Codecov Report

Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (271d5ea) 50.19% compared to head (6059a2d) 55.30%.

:exclamation: Current head 6059a2d differs from pull request most recent head c0e1bee. Consider uploading reports for the commit c0e1bee to get more accurate results

Files Patch % Lines
components/playground/instance/tiproxy.go 0.00% 27 Missing :warning:
components/playground/instance/tidb_config.go 50.00% 3 Missing and 1 partial :warning:
components/playground/playground.go 25.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2372      +/-   ##
==========================================
+ Coverage   50.19%   55.30%   +5.11%     
==========================================
  Files         328      329       +1     
  Lines       35009    35059      +50     
==========================================
+ Hits        17571    19389    +1818     
+ Misses      15118    13334    -1784     
- Partials     2320     2336      +16     
Flag Coverage Δ
playground 15.32% <22.73%> (-0.01%) :arrow_down:
tiup 33.60% <ø> (ø)
unittest 22.24% <0.00%> (?)

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.

codecov-commenter avatar Jan 29 '24 08:01 codecov-commenter