-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
[ML] Adjust finalize job action to work with documents #34226
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ebab3e0
Adjust job finalise action to work with documents
davidkyle d0da950
Set job finished time in autodetect results processor
davidkyle e647611
Remove unused internal waitForAck field from UpdateJobAction
davidkyle 168fd12
Fix get a single job
davidkyle c097134
Remove finalise job action
davidkyle a0b45d5
Revert "Fix get a single job"
davidkyle c5e05ff
Revert adding finished time field to job update and fix test
davidkyle dbfaba1
Check snapshot is persisted
davidkyle eedbfd2
Revert "Remove finalise job action"
davidkyle 99008ff
Make finalise job action a no-op
davidkyle a157a6e
Fix precommit check
davidkyle deb3087
Add Finalize job action back to ReservedRolesStoreTests
davidkyle 70348fc
Fix BWC on UpdateJobAction request
davidkyle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,6 @@ public static UpdateJobAction.Request parseRequest(String jobId, XContentParser | |
|
||
/** Indicates an update that was not triggered by a user */ | ||
private boolean isInternal; | ||
private boolean waitForAck = true; | ||
|
||
public Request(String jobId, JobUpdate update) { | ||
this(jobId, update, false); | ||
|
@@ -88,14 +87,6 @@ public boolean isInternal() { | |
return isInternal; | ||
} | ||
|
||
public boolean isWaitForAck() { | ||
return waitForAck; | ||
} | ||
|
||
public void setWaitForAck(boolean waitForAck) { | ||
this.waitForAck = waitForAck; | ||
} | ||
|
||
@Override | ||
public ActionRequestValidationException validate() { | ||
return null; | ||
|
@@ -111,10 +102,9 @@ public void readFrom(StreamInput in) throws IOException { | |
} else { | ||
isInternal = false; | ||
} | ||
if (in.getVersion().onOrAfter(Version.V_6_3_0)) { | ||
waitForAck = in.readBoolean(); | ||
} else { | ||
waitForAck = true; | ||
// TODO jindex change CURRENT to specific version when feature branch is merged | ||
if (in.getVersion().onOrAfter(Version.V_6_3_0) && in.getVersion().before(Version.CURRENT)) { | ||
in.readBoolean(); // was waitForAck | ||
} | ||
} | ||
|
||
|
@@ -126,8 +116,9 @@ public void writeTo(StreamOutput out) throws IOException { | |
if (out.getVersion().onOrAfter(Version.V_6_2_2)) { | ||
out.writeBoolean(isInternal); | ||
} | ||
if (out.getVersion().onOrAfter(Version.V_6_3_0)) { | ||
out.writeBoolean(waitForAck); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to read, if writing to a version in between 6.3.0 and the version the feature branch gets merged into should this write |
||
// TODO jindex change CURRENT to specific version when feature branch is merged | ||
if (out.getVersion().onOrAfter(Version.V_6_3_0) && out.getVersion().before(Version.CURRENT)) { | ||
out.writeBoolean(false); // was waitForAck | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need to still read from the wire using something like this?
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 don't know what I was thinking I should have reviewed this before asking for a review sorry. I pushed 2 more commits one addresses this and the other adds the finalize job action back into the security tests.