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: adapt to new tiproxy #4821

Merged
merged 8 commits into from
Jan 4, 2023
Merged

fix: adapt to new tiproxy #4821

merged 8 commits into from
Jan 4, 2023

Conversation

xhebox
Copy link
Contributor

@xhebox xhebox commented Jan 3, 2023

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

What problem does this PR solve?

Ref pingcap/tiproxy#161. For convenient, tiproxy has changed its config format to TOML.

What is changed and how does it work?

  1. Change to TOML config.
  2. Removed PVC since new tiproxy does not require a storage volume.
  3. Remove Proxy *ProxyServerOnline config in Spec/Status. Instead, *GenericConfig is used.
  4. Three logging increased verbosity: since they are in the loop, logs will be output frequently. Pretty much useless but annoying.

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.


Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 3, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • KanShiori
  • csuzhangxc

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@@ -1132,7 +1132,7 @@ outer:
}

if zoneLabel == "" {
klog.Infof("zone labels not found in pd location-labels %v, skip set labels", config.Replication.LocationLabels)
klog.V(4).Infof("zone labels not found in pd location-labels %v, skip set labels", config.Replication.LocationLabels)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increased verbosity.

@@ -206,7 +170,7 @@ security:
})
}

klog.Info("get tiproxy in use config map name: ", inUseName)
klog.V(4).Info("get tiproxy in use config map name: ", inUseName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increased verbosity.

@@ -66,7 +71,9 @@ func (p VolumePhase) String() string {

func (p *podVolModifier) getVolumePhase(vol *ActualVolume) VolumePhase {
if err := p.validate(vol); err != nil {
klog.Warningf("volume %s/%s modification is not allowed: %v", vol.PVC.Namespace, vol.PVC.Name, err)
if !errors.Is(err, ErrChangeDefaultStorageClass) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increased verbosity: PD defaults to the default class, and it will report this useless warning all the time.

@@ -323,7 +323,7 @@ function hack::ensure_go117() {
patch -d $ROOT -NRp1 -i $ROOT/hack/go117_1.patch -r .rej --no-backup-if-mismatch || true
patch -d $ROOT -NRp1 -i $ROOT/hack/go117_2.patch -r .rej --no-backup-if-mismatch || true
patch -d $ROOT -NRp1 -i $ROOT/hack/go117_3.patch -r .rej --no-backup-if-mismatch || true
rm -rf .rej
rm -rf .rej .rej.orig
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In some rare cases, .rej.orig will be created.

hack/localtest/test.sh Outdated Show resolved Hide resolved
Signed-off-by: xhe <xw897002528@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2023

Codecov Report

Merging #4821 (3bf2765) into master (5bc322a) will increase coverage by 8.67%.
The diff coverage is 11.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4821      +/-   ##
==========================================
+ Coverage   59.96%   68.64%   +8.67%     
==========================================
  Files         224      228       +4     
  Lines       25318    28300    +2982     
==========================================
+ Hits        15183    19426    +4243     
+ Misses       8707     7429    -1278     
- Partials     1428     1445      +17     
Flag Coverage Δ
e2e 53.03% <2.77%> (?)
unittest 60.10% <11.11%> (+0.13%) ⬆️

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>
@xhebox
Copy link
Contributor Author

xhebox commented Jan 4, 2023

/test pull-e2e-kind-br
/test pull-e2e-kind-across-kubernetes

@csuzhangxc
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 3bf2765

@ti-chi-bot ti-chi-bot merged commit 09fb85e into pingcap:master Jan 4, 2023
@xhebox xhebox deleted the tiproxy_1 branch January 6, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants