Closed
Description
Currently, an invalid license prevents any users to sign up. An installation with an invalid license should not be in a worse position than an installation with no license at all.
We have this behavior already to some extent so that we don't return an invalid license but a default license for some cases, e.g. here:
gitpod/components/licensor/ee/pkg/licensor/replicated.go
Lines 117 to 119 in 896fe39
However, there are some cases where we don't have a valid license, e.g. when the license server from Replicated is not reachable etc.
I would propose to change the implementation like this:
- Don't return the default license in
newReplicatedEvaluator()
but return the invalid license with the proper reason/explanation why the license is invalid. - In the function
HasEnoughSeats
, don't respond withfalse
when the license is invalid but callHasEnoughSeats
from the default license in that case (same for other methods likeEnabled(...)
).
That has the following advantages:
- We still have the proper (invalid) license in place and could e.g. log why the license is invalid.
- We could add a dashboard that shows the (invalid) license (see [licensing] Add a license page to the admin dashboard #8413) .
- No installation acts worse than the default license behavior.