Bump TrialLicenseVersion to allow starting new trial on 9.0#120198
Bump TrialLicenseVersion to allow starting new trial on 9.0#120198elasticsearchmachine merged 4 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-security (Team:Security) |
|
Hi @jfreden, I've created a changelog YAML for you. |
gwbrown
left a comment
There was a problem hiding this comment.
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.
We should make sure these tests check trials started in 8.x.
| // 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.
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.
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.
LicensesMetadatais 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.