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

*: add lint CI #99

Merged
merged 7 commits into from
Sep 28, 2022
Merged

*: add lint CI #99

merged 7 commits into from
Sep 28, 2022

Conversation

xhebox
Copy link
Collaborator

@xhebox xhebox commented Sep 27, 2022

Signed-off-by: xhe xw897002528@gmail.com

What problem does this PR solve?

Issue Number: close None

Problem Summary: As title.

What is changed and how it works: Notables:

  1. updateAuthInfoFromSessionStates is removed/unused.
  2. Logger is unified between tiproxycli/tiproxy. BuildLogger is moved to ./lib.
  3. Teak CI cache

Check List

Tests

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

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has weirctl change
  • Other user behavior changes

Release note

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

None

Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
lib/util/cmd/logger.go Show resolved Hide resolved
// The original db in the auth info may be dropped during the session, so we need to authenticate with the current db.
// The user may be renamed during the session, but the session cannot detect it, so this will affect the user.
// TODO: this may be a security problem: a different new user may just be renamed to this user name.
func (mgr *BackendConnManager) updateAuthInfoFromSessionStates(sessionStates []byte) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a mistake that it's not used. It should be called, or the default db should be set to "" in the second handshake.

Copy link
Collaborator Author

@xhebox xhebox Sep 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind fixing it in another PR? Then I don't need to write related tests.

Copy link
Collaborator

@djshow832 djshow832 Sep 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Please revert this function. I will do it after the proxy protocol PR is merged.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, /cc @djshow832

@djshow832 djshow832 merged commit 0ef11e1 into pingcap:main Sep 28, 2022
@xhebox xhebox deleted the lint_1 branch September 28, 2022 08:16
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 7, 2023
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants