-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make the licensing match what's advertised #8593
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8593 +/- ##
=======================================
Coverage 11.17% 11.17%
=======================================
Files 18 18
Lines 993 993
=======================================
Hits 111 111
Misses 880 880
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
4f94924
to
73d4261
Compare
11b0cca
to
7cf438e
Compare
7cf438e
to
ab60dfa
Compare
15da68d
to
96104e4
Compare
/werft run 👍 started the job as gitpod-build-sje-licensing.12 |
8fdfc65
to
4e958d8
Compare
@geropl I kept the caching of the |
Great progress, @mrsimonemms! 🙏 SuggestionI'm totally fine with moving this suggestion to a follow-up PR (since this PR is already a minimum viable change). However, in order to fix #8412 I would suggest the following change:
With this, we can display the result of gitpod/components/licensor/ee/pkg/licensor/licensor.go Lines 158 to 165 in dd508e3
in the admin dashboard and users know why the license is invalid and they still have basic functionality (as you would have with no license). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Licensor part looks good to me.
ℹ️ I would like to leave the final review of the server part to Team WebApp.
@corneliusludmann I'll remove the "Fixes" for #8412 and we can continue the discussion there |
The previous Gitpod and Replicated evaluators were functionally identical anyway as all the logic happens in the constructors
The admin dashboard is now an essential part of administering Gitpod so it makes no sense to block it for users.
…ures The Enabled function now has knowledge of the number of seats in use. If this is still within range, the features are checked against the loaded license. If not, they will be checked against the fallback license. The fallback is optional, based upon the license type - Gitpod licenses always disable fallback. Replicated licenses disable fallback if it's a paid license. This is so paying customers aren't inconvenienced by losing features - instead, they will be unable to add additional users, as is the current behaviour.
dd508e3
to
a9fb138
Compare
|
||
protected readonly timeout: number = 60 * 1000; // Cache data for 1 minute | ||
|
||
get count(): number | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we usually do not use null
but undefined
instead. But ignore this for how, we'll have a lint for it shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geropl Would you like me to change this? I don't mind - normally, I use undefined
as well so I can't understand why I used null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @mrsimonemms , looks good to me!
Did not test the self-hosted setup, though. 😉
Description
The self-hosted licensing now matches what we advertise, namely:
This introduces the concept of a fallback license, in addition to the default license. It also adds the number of seats to the
Enabled
call in the licensor. As a workflow, if the license exceeds the number of seats requested in the call, it will try again with the fallback license, which is the community license.Fallback rules
This table shows the fallback rules. It is done so that a user who is paying for Gitpod will have additional users rejected rather than having their service downgraded. It would be a pretty poor user experience if someone was paying for Gitpod, had an additional user sign up and then everyone lost all their premium services.
Gitpod licenses are always considered "paid". Now we are moving to Replicated for most licensing, Gitpod licenses will only be issued to paying customers who cannot use Replicated (eg, SaaS). Replicated has the concept of a community license - if their license is marked as "community", it will allow for fallback.
Related Issue(s)
Fixes #8328
Fixes #6932
How to test
Deploy to a self-hosted instance with a Replicated license. Tests already done:
Release Notes
Documentation