Licenses with explict plan: "" or plan: nil specifiers are not treated as EES
In GitLab 9.4, we introduced many new licensed addons. For EES customers with an older license that doesn't specify a plan explicitly, we set the default plan to be
EES, to ensure nobody lost access to any of their features. The implementation is in bbb67df4
During the 9.4.0rc2 deploy to GitLab.com, we noticed that many licensed features were missing - https://gitlab.com/gitlab-org/gitlab-ce/issues/35082 https://gitlab.com/gitlab-com/infrastructure/issues/2250
Uploading a new license to GitLab.com fixed the problems there, but we weren't sure why the features we unlicensed, given the "default to EES" logic.
It turns out that if the license specifies
plan: "" - and maybe
plan: nil - in the serialized data, then the assumption of EES doesn't happen and the customer (GitLab.com in this case!) loses access to those features!
Steps to reproduce
Insert https://license.gitlab.com/licenses/11131 into a GitLab EE instance and check
What is the current bug behavior?
It returns ""
What is the expected correct behavior?
It should return "starter"
return STARTER_PLAN unless restricted_attr(:plan).present?