-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Watcher: Ensure upgrading from 6.x does not break watches checking for hit count #36115
Comments
Pinging @elastic/es-core-features |
We discussed this our area sync and came to the following conclusions:
Will leave this issue open until:
|
The first part is already implemented, see here for the search input and here The second part is partially implemented, see here, when a search request is parsed. We just need to add a proper test for this, but it seems to me that this is already working and the user can set |
It looks like the default for |
|
Many watches check the hit count in their condition (either a
script
condition or acompare
condition) in order to determine if any documents have been returned.As Elasticsearch 7.0 will not return hit counts by default, those watches would break silently on upgrade. We need to come up with a strategy to keep those watches running and/or properly notify the user that a new parameter is required.
A couple of common strategies:
hits.total
, and if that is the case, change the search inputs to include that parameter. Then we can run the upgrade API before upgrading and thus change each watch accordingly. Note that this means, checking all the nested actions in chained actions as well.Also, it might make sense to spill a useful error message, if a user is missing this parameter but specifies hits.total in a watch, to ease the switch from 6.0 to 7.0 - otherwise the user will only notice this new behaviour when checking the watch history or running the execute watch API.
/cc @jakelandis
Relates #36008 #36035 #35849
The text was updated successfully, but these errors were encountered: