-
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
[ML] Send autodetect config updates as JSON #67721
[ML] Send autodetect config updates as JSON #67721
Conversation
Send configuration updates to model plot, scheduled events, detector rules and filters as JSON formatted strings. Remove any now unneeded supporting code.
Pinging @elastic/ml-core (:ml) |
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.
LGTM Just a double-checking question :-)
writeMessage(stringBuilder.toString()); | ||
} | ||
|
||
public void writeUpdateScheduledEventsMessage(List<ScheduledEvent> events, TimeValue bucketSpan) throws IOException { | ||
StringBuilder stringBuilder = new StringBuilder(); | ||
stringBuilder.append(UPDATE_MESSAGE_CODE).append("[scheduledEvents]\n"); | ||
if (events.isEmpty()) { | ||
stringBuilder.append("clear = true\n"); |
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.
So if we now have an empty list of events, c++ will receive an empty events
array. Will this clear any existing events?
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.
Yes, the C++ code has been adjusted such that an empty events array, generating the message u{"events":[]}
will clear out any existing events.
jenkins retest this please |
Send configuration updates to model plot, scheduled events, detector rules and filters as JSON formatted strings. Remove any now unneeded supporting code.
* Expect configuration update requests to be received in JSON formatted strings. * Remove support for old, ini file parsing. Relates elastic/elasticsearch#67721, #1253
* Expect configuration update requests to be received in JSON formatted strings. * Remove support for old, ini file parsing. Relates elastic/elasticsearch#67721, elastic#1253
* Expect configuration update requests to be received in JSON formatted strings. * Remove support for old, ini file parsing. Relates elastic/elasticsearch#67721, #1253 Backports #1682
Send configuration updates to model plot, scheduled events, detector
rules and filters as JSON formatted strings.
Remove any now unneeded supporting code.
Note that a handful of test cases have been muted. This is only temporary and the tests will be re-enabled when the supporting C++ code is merged and available.