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

*: move all util relative package to utils #5764

Merged
merged 5 commits into from
Dec 8, 2022

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Dec 7, 2022

Signed-off-by: nolouch nolouch@gmail.com

What problem does this PR solve?

Issue Number: Ref #5838

What is changed and how does it work?

This is an adjustment of code organization, for microservice-orient, pkg package should be as clear as possible.

*: move all util relative package to utils

Check List

Tests

  • Unit test

Release note

None

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

ti-chi-bot commented Dec 7, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • rleungx

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.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 7, 2022
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
@rleungx
Copy link
Member

rleungx commented Dec 8, 2022

If we are going to put these functions under utils/, some package names might delete the suffix, e.g., utils/logutil -> utils/log.

@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Base: 75.68% // Head: 75.53% // Decreases project coverage by -0.15% ⚠️

Coverage data is based on head (31da4cf) compared to base (8c5c666).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5764      +/-   ##
==========================================
- Coverage   75.68%   75.53%   -0.16%     
==========================================
  Files         329      329              
  Lines       32965    32965              
==========================================
- Hits        24950    24899      -51     
- Misses       5874     5917      +43     
- Partials     2141     2149       +8     
Flag Coverage Δ
unittests 75.53% <ø> (-0.16%) ⬇️

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

Impacted Files Coverage Δ
pkg/audit/audit.go 91.66% <ø> (ø)
pkg/autoscaling/calculation.go 58.41% <ø> (ø)
pkg/autoscaling/service.go 100.00% <ø> (ø)
pkg/autoscaling/types.go 19.56% <ø> (ø)
pkg/cache/cache.go 64.28% <ø> (ø)
pkg/cache/fifo.go 100.00% <ø> (ø)
pkg/cache/ttl.go 97.93% <ø> (ø)
pkg/dashboard/adapter/manager.go 79.31% <ø> (+4.59%) ⬆️
pkg/dashboard/adapter/redirector.go 91.30% <ø> (ø)
pkg/election/leadership.go 75.25% <ø> (-2.07%) ⬇️
... and 157 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Conflicts:
	server/core/basic_cluster.go
	server/core/region.go
	server/encryptionkm/key_manager.go
	server/tso/global_allocator.go
	server/tso/local_allocator.go
	server/tso/tso.go
@nolouch
Copy link
Contributor Author

nolouch commented Dec 8, 2022

@rleungx I think we can keep the suffix for a short time, some reasons:

  • the changes is too much
  • the package name maybe more general than util, like utils/api, utils/log, the package name is api or log. Its' too general, we may need to alias it in some scenario.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 8, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 8, 2022
@nolouch
Copy link
Contributor Author

nolouch commented Dec 8, 2022

/merge

@ti-chi-bot
Copy link
Member

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

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

Commit hash: 31da4cf

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 8, 2022
@ti-chi-bot ti-chi-bot merged commit 8227cdb into tikv:master Dec 8, 2022
@nolouch nolouch deleted the move-utils branch December 8, 2022 09:32
Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

reviewed

Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

reviewed

Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

reviewed

Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants