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

change baseCount to common module for account charge #3673

Merged
merged 2 commits into from Aug 14, 2023

Conversation

yxxchange
Copy link
Contributor

@yxxchange yxxchange commented Aug 14, 2023

🤖 Generated by Copilot at 83588b1

Summary

📄🔥♻️

This pull request introduces a new count package that defines a constant BaseCount for account base count. It also updates the license issuer controller to use this package for license validation and recharge logic, and removes redundant code from the util package.

To avoid any confusion or doubt
We moved BaseCount to a new route
From util to count
We made the switch count
And updated the files that use BaseCount

Walkthrough

  • Extract the constant BaseCount for account base count to a new file count.go in the controllers/common/account package (link)
  • Import the count package and use count.BaseCount instead of util.BaseCount in the collect.go and license.go files, which handle the cluster usage fee and license validation logic for license issuer (link, link, link, link, link)
  • Remove the redundant definition of BaseCount from the util package (link)

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Aug 14, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 885
✅ Successful 348
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 536
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4efb22a) 67.77% compared to head (5cdbcf5) 67.77%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3673   +/-   ##
=======================================
  Coverage   67.77%   67.77%           
=======================================
  Files           8        8           
  Lines         661      661           
=======================================
  Hits          448      448           
  Misses        171      171           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lingdie lingdie requested a review from bxy4543 August 14, 2023 03:21
@lingdie lingdie merged commit 72e5d94 into labring:main Aug 14, 2023
40 of 41 checks passed
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.

None yet

3 participants