-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Bump TrialLicenseVersion to allow starting new trial on 9.0 #120198
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
Conversation
Pinging @elastic/es-security (Team:Security) |
Hi @jfreden, I've created a changelog YAML for you. |
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.
Left a couple minor comments but no need for another round of review after they're addressed; otherwise LGTM. Thanks!
assertFalse(new TrialLicenseVersion(randomIntBetween(8_00_00_00, TRIAL_VERSION_CUTOVER)).ableToStartNewTrial()); | ||
assertFalse(new TrialLicenseVersion(randomIntBetween(9_00_00_00, TRIAL_VERSION_CUTOVER)).ableToStartNewTrial()); |
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.
We should make sure these tests check trials started in 8.x.
@@ -27,12 +27,9 @@ public class TrialLicenseVersion implements ToXContentFragment, Writeable { | |||
// generic Elasticsearch version. While it's derived from the Elasticsearch version formula for BWC, it is independent of it going | |||
// forward. When we want users to be able to start a new trial, increment this number. | |||
// Pkg-private for testing only. | |||
static final int TRIAL_VERSION_CUTOVER = 8_12_00_99; | |||
static final int TRIAL_VERSION_CUTOVER = 9_00_00_00; |
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.
I think it would be best to rename this at this point; it's not the cutover version anymore, it's the current trial version.
Also I am not asking you to change this but this version number is decoupled from the product version intentionally, so arguably the new trial version number should be 8120100
. That said, I think that's confusing in practice and matching the product version isn't a bad idea.
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.
Thanks! Yes, I agree. I went with keeping it as 9_00_00_00
.
You are allowed to initiate a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v6.0, you cannot start a new trial until v7.0.
LicensesMetadata
is a ClusterState custom that contains the license information for a cluster. If the cluster has exercised a trial there is a trial version field populated. During a major upgrade, we want to allow users to run a new trial to test the features on the new major.This PR updates the trial version in the license to allow to start a new trial on 9.0.
When 9.0 is released we'll have no clusters that has already exercised the trial so this PR also removes some of the BWC handling that was added when trial license version was decoupled from stack version.