-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Require acknowledgement to start_trial license #30135
Conversation
This is related to elastic#30134. It modifies the start_trial action to require an acknowledgement parameter in the rest request to actually start the trial license. There are backwards compatibility issues as prior ES versions did not support this parameter. To handle this, it is assumed that a request coming from a node prior to 6.3 is acknowledged. And attempts to write a non-acknowledged request to a prior to 6.3 node will throw an exception. Additionally this PR adds messages about the trial license the user is generating.
Here is the message for a trial that needs to be acknowledge: { { |
Pinging @elastic/es-core-infra |
x-pack/docs/build.gradle.orig
Outdated
@@ -0,0 +1,687 @@ | |||
import org.elasticsearch.gradle.test.NodeInfo |
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.
remove this file
@@ -40,7 +40,7 @@ The following example checks whether you are eligible to start a trial: | |||
|
|||
[source,js] | |||
------------------------------------------------------------ | |||
POST _xpack/license/start_trial | |||
GET _xpack/license/start_trial |
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 we should make start_trial
start with an underscore like other APIs that perform an action (_search
, _authenticate
, etc), so _start_trial
and _start_basic
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.
That was discussed. Also I imagine that this "bug fix" PR to add necessary ack messages to a response would not be the place to modify a route that already exists in prior versions of ES x-pack.
@@ -0,0 +1,67 @@ | |||
/* |
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.
remove this file
@@ -0,0 +1,55 @@ | |||
/* |
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.
remove this file
@@ -0,0 +1,17 @@ | |||
/* |
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.
remove this file
@@ -0,0 +1,48 @@ | |||
/* |
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.
remove this file
@@ -0,0 +1,59 @@ | |||
/* |
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.
remove this file
@@ -0,0 +1,79 @@ | |||
/* |
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.
remove this file
@@ -0,0 +1,113 @@ | |||
/* |
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.
remove this file
@@ -133,7 +133,8 @@ teardown: | |||
|
|||
- do: | |||
catch: forbidden | |||
xpack.license.post_start_trial: {} | |||
xpack.license.post_start_trial: |
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.
should it still be post_start_trial and not changed to get_start_trial? Or just start_trial
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.
No it should be post_start_trial. We're testing that this call fails.
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 one comment, but otherwise LGTM
@@ -57,10 +76,57 @@ public Status getStatus() { | |||
@Override | |||
public void readFrom(StreamInput in) throws IOException { | |||
status = in.readEnum(Status.class); | |||
if (in.getVersion().onOrAfter(Version.V_6_3_0)) { |
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.
the readFrom version is different than the writeTo. Doesn't seem correct to me
run sample packaging tests |
run gradle build tests |
This is related to elastic#30134. It modifies the start_trial action to require an acknowledgement parameter in the rest request to actually start the trial license. There are backwards compatibility issues as prior ES versions did not support this parameter. To handle this, it is assumed that a request coming from a node prior to 6.3 is acknowledged. And attempts to write a non-acknowledged request to a prior to 6.3 node will throw an exception. Additionally this PR adds messages about the trial license the user is generating.
* master: (24 commits) Watcher: Ensure mail message ids are unique per watch action (#30112) REST: Remove GET support for clear cache indices (#29525) SQL: Correct error message (#30138) Require acknowledgement to start_trial license (#30135) Fix a bug in FieldCapabilitiesRequest#equals and hashCode. (#30181) SQL: Add BinaryMathProcessor to named writeables list (#30127) Tests: Use buildDir as base for generated-resources (#30191) Fix SliceBuilderTests#testRandom failures Build: Fix deb version to use tilde with prerelease versions (#29000) Fix edge cases in CompositeKeyExtractorTests (#30175) Document time unit limitations for date histograms (#30177) Add support for field capabilities to the high-level REST client. (#29664) Remove licenses missed by the migration (#30128) [DOCS] Updates docker installation package details (#30110) Fix TermsSetQueryBuilder.doEquals() method (#29629) [Monitoring] Remove unhelpful Monitoring tests (#30144) [Test] Fix RenameProcessorTests.testRenameExistingFieldNullValue() (#29655) add copyright/scope configuration for intellij to Contributing Guide (#29688) [test] include oss tar in packaging tests (#30155) TEST: Update settings should go through cluster state (#29682) ...
This commit is a follow up to elastic#30135. It updates the stream compatibility versions in the start_trial requests and responses to reflect that fact that this work has been backported to 6.3.
* master: (7173 commits) Bump changelog version to 6.4 (elastic#30217) [DOCS] Adds native realm security settings (elastic#30186) Test: Switch painless test to 1 shard CCS: Drop http address from remote cluster info (elastic#29568) Reindex: Fold "from old" tests into reindex module (elastic#30142) Convert FieldCapabilitiesResponse to a ToXContentObject. (elastic#30182) [DOCS] Added 'on a single shard' to description of max_thread_count. Closes 28518 (elastic#29686) [TEST] Redirect links to new locations (elastic#30179) Move repository-s3 fixture tests to QA test project (elastic#29372) Fail snapshot operations early on repository corruption (elastic#30140) Docs: Document `failures` on reindex and friends Build global ordinals terms bucket from matching ordinals (elastic#30166) Watcher: Ensure mail message ids are unique per watch action (elastic#30112) REST: Remove GET support for clear cache indices (elastic#29525) SQL: Correct error message (elastic#30138) Require acknowledgement to start_trial license (elastic#30135) Fix a bug in FieldCapabilitiesRequest#equals and hashCode. (elastic#30181) SQL: Add BinaryMathProcessor to named writeables list (elastic#30127) Tests: Use buildDir as base for generated-resources (elastic#30191) Fix SliceBuilderTests#testRandom failures ...
This commit is a follow up to #30135. It updates the stream compatibility versions in the start_trial requests and responses to reflect that fact that this work has been backported to 6.3.
This is related to #30134. It modifies the start_trial action to require
an acknowledgement parameter in the rest request to actually start the
trial license. There are backwards compatibility issues as prior ES
versions did not support this parameter. To handle this, it is assumed
that a request coming from a node prior to 6.3 is acknowledged. And
attempts to write a non-acknowledged request to a prior to 6.3 node will
throw an exception.
Additionally this PR adds messages about the trial license the user is
generating.