-
Notifications
You must be signed in to change notification settings - Fork 474
checkpoint_harmony_endpoint: fix typo when calculating next start time #13642
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
checkpoint_harmony_endpoint: fix typo when calculating next start time #13642
Conversation
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportTo see the full report comment with |
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.
This fix avoids assuming we've seen everything from the requested range. The end of the requested range may have some data that wasn't ready this time but will be visible next time.
I think it would be good to also adjust the other place this is relevant: the Done case.
diff --git a/packages/checkpoint_harmony_endpoint/data_stream/antibot/agent/stream/cel.yml.hbs b/packages/checkpoint_harmony_endpoint/data_stream/antibot/agent/stream/cel.yml.hbs
index 86b1c631a0..71ce9bfa4e 100644
--- a/packages/checkpoint_harmony_endpoint/data_stream/antibot/agent/stream/cel.yml.hbs
+++ b/packages/checkpoint_harmony_endpoint/data_stream/antibot/agent/stream/cel.yml.hbs
@@ -169,20 +169,21 @@ program: |
: (body.data.state == "Done") ?
// 'Done' (Results empty) - Clear the task ID and end the sequence.
state.with(
{
"events": [],
"want_more": false,
"cursor": state.cursor.with(
{
"auth_data": auth_data,
"task_id": null,
+ "next_startTime": state.cursor.current_startTime,
}
),
}
)
: (body.data.state == "Canceled") ?
// 'Canceled' (Error or timeout) - Clear the task ID and reset the sequence for the same timeframe.
state.with(
{
"events": [],
"want_more": false,
What do you think?
Yeah, that makes sense and it is harmless for other cases when receiving |
|
💚 Build Succeeded
History
|
Package checkpoint_harmony_endpoint - 0.7.1 containing this change is available at https://epr.elastic.co/package/checkpoint_harmony_endpoint/0.7.1/ |
Proposed commit message
Fix a typo that avoids reading properly the last timestamp from received data, as the incoming JSON body contains an array called
records
instead ofresults
.Note
All data streams have identical
cel.yml.hbs
files.Checklist
changelog.yml
file.