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

refactor(utils): add hasher pkg and add more uts for toml #5992

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

liubog2008
Copy link
Member

  • move GenerateHash to hasher pkg
  • add more UTs for toml pkg

@ti-chi-bot ti-chi-bot bot added the size/XXL label Dec 20, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 20, 2024

@fgksgf: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 20.36%. Comparing base (fce4a79) to head (24e170a).

Additional details and impacted files
@@              Coverage Diff               @@
##           feature/v2    #5992      +/-   ##
==============================================
+ Coverage       20.04%   20.36%   +0.31%     
==============================================
  Files             151      152       +1     
  Lines           10365    10371       +6     
==============================================
+ Hits             2078     2112      +34     
+ Misses           8079     8052      -27     
+ Partials          208      207       -1     
Flag Coverage Δ
unittest 20.36% <76.00%> (+0.31%) ⬆️

Signed-off-by: liubo02 <[email protected]>
// and generates a hash of the resulting configuration. The hash is then
// encoded into a safe string format and returned.
// If the order of keys in the TOML string is different, the hash will be the same.
func GenerateHash(tomlStr v1alpha1.ConfigFile) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

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

As this function only works for TOML, should we include toml in the name?

Copy link
Member Author

Choose a reason for hiding this comment

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

LGTM, but may add it when a new similar function is added?

Signed-off-by: liubo02 <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Dec 20, 2024

@csuzhangxc: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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.

Copy link
Contributor

ti-chi-bot bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: csuzhangxc, fgksgf

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

@csuzhangxc csuzhangxc merged commit 6397aed into pingcap:feature/v2 Dec 20, 2024
6 of 7 checks passed
@liubog2008 liubog2008 added the v2 for operator v2 label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL v2 for operator v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants