Skip to content

Conversation

@PeteGillinElastic
Copy link
Member

In 8.x, setting input.search.request.types to an empty array was allowed, although it resulted in a deprecation warning and had no effect (and any value other than an empty array would result in an error).

In 9.x, support for this field is entirely removed, and the empty array will also result in an error.

We have already introduced a script to be run as part of the upgrade which removes the field from existing watches in
#120371.

@elasticsearchmachine
Copy link
Collaborator

Hi @PeteGillinElastic, I've created a changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

In 8.x, setting the `input.search.request.types` field in the payload when creating a watcher to an empty array was allowed, although it resulted in a deprecation warning and had no effect (and any value other than an empty array would result in an error). In 9.x, support for this field is entirely removed, and the empty array will also result in an error. We have already introduced a script to be run as part of the upgrade which removes the field from existing watches in elastic#120371. This also removes an unrelated TODO in passing, because we are not going to do that (the functionality it refers to exists and is not deprecated so cannot be removed).
@PeteGillinElastic PeteGillinElastic force-pushed the remove-watcher-types-support-removal branch from a2b438b to 70b6a91 Compare January 24, 2025 13:31
@PeteGillinElastic PeteGillinElastic marked this pull request as ready for review January 24, 2025 14:36
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jan 24, 2025
ElasticsearchParseException.class,
() -> WatcherSearchTemplateRequest.fromXContent(parser, randomFrom(SearchType.values()))
);
assertThat(e.getMessage(), is("could not read search request. unexpected array field [types]"));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure whether to keep these tests and assert that parsing fails or not. I'm open to removing them if anyone would prefer it.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PeteGillinElastic PeteGillinElastic merged commit fac9bb4 into elastic:main Jan 24, 2025
16 checks passed
@PeteGillinElastic PeteGillinElastic deleted the remove-watcher-types-support-removal branch January 24, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants