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

feat(server): support selfhost licenses #8947

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open

Conversation

forehalo
Copy link
Member

No description provided.

Copy link

graphite-app bot commented Nov 27, 2024

Your org has enabled the Graphite merge queue for merging into canary

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

forehalo commented Nov 27, 2024


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 31.40765% with 843 lines in your changes missing coverage. Please review.

Project coverage is 51.19%. Comparing base (7d0160c) to head (8a8d3c4).

Files with missing lines Patch % Lines
...ages/backend/server/src/plugins/license/service.ts 18.12% 253 Missing ⚠️
...d/server/src/plugins/payment/license/controller.ts 27.70% 167 Missing ⚠️
...end/server/src/plugins/payment/manager/selfhost.ts 29.00% 164 Missing ⚠️
...ages/backend/server/src/plugins/payment/service.ts 17.41% 128 Missing ⚠️
...ckages/backend/server/src/plugins/payment/quota.ts 21.73% 54 Missing ⚠️
...ges/backend/server/src/plugins/payment/resolver.ts 27.27% 24 Missing ⚠️
packages/backend/server/src/base/helpers/url.ts 11.11% 16 Missing ⚠️
...ckages/backend/server/src/base/error/errors.gen.ts 76.27% 14 Missing ⚠️
...ckend/server/src/plugins/payment/manager/common.ts 31.57% 13 Missing ⚠️
...ges/backend/server/src/base/mailer/mail.service.ts 22.22% 7 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           canary    #8947      +/-   ##
==========================================
- Coverage   51.47%   51.19%   -0.28%     
==========================================
  Files        2155     2159       +4     
  Lines       97670    98780    +1110     
  Branches    16388    16391       +3     
==========================================
+ Hits        50275    50575     +300     
- Misses      46046    46557     +511     
- Partials     1349     1648     +299     
Flag Coverage Δ
server-test 76.53% <31.40%> (-1.72%) ⬇️
unittest 31.00% <ø> (-0.06%) ⬇️

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

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

@forehalo forehalo force-pushed the 61/team-workspace-subscription branch 2 times, most recently from 35b17aa to c56895a Compare December 2, 2024 08:04
@forehalo forehalo force-pushed the 61/team-workspace-subscription branch from c56895a to 82be3b9 Compare December 2, 2024 13:10
@forehalo forehalo force-pushed the 61/team-workspace-subscription branch from a8b33b5 to 9777df8 Compare December 5, 2024 07:28
@darkskygit darkskygit force-pushed the 61/team-workspace-subscription branch from 9777df8 to c18107e Compare December 5, 2024 08:15
@forehalo forehalo changed the base branch from 61/team-workspace-subscription to graphite-base/8947 December 5, 2024 08:31
@forehalo forehalo changed the base branch from graphite-base/8947 to canary December 10, 2024 07:29
@forehalo forehalo marked this pull request as ready for review December 10, 2024 07:34
@graphite-app graphite-app bot requested review from CatsJuice, EYHN, JimmFly, pengx17, darkskygit and Brooooooklyn and removed request for darkskygit December 10, 2024 07:34
@forehalo forehalo force-pushed the 61/selfhost-team branch 7 times, most recently from 959abb4 to 957a785 Compare December 16, 2024 01:57
}

const res = await this.fetch<License>(
`/api/team/licenses/${license}/activate`,
Copy link
Member

Choose a reason for hiding this comment

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

/api/team/licenses/ base can move to fetch

Comment on lines +93 to +96
// TODO(@forehalo): we need a way to get the default quota for workspace
if (count > 10) {
throw new WorkspaceMembersExceedLimitToDowngrade({ limit: 10 });
}
Copy link
Member

Choose a reason for hiding this comment

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

QuotaService.getQuota()

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.

3 participants