Watcher API watcher_get_settings
does not return "X-elastic-product" header
#102928
Labels
watcher_get_settings
does not return "X-elastic-product" header
#102928
Elasticsearch Version
8.12
Installed Plugins
No response
Java Version
bundled
OS Version
N/A
Problem Description
I was fixing an error that omitted the elastic product header checks for V8 (
elasticsearch/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/DoSection.java
Lines 366 to 369 in 8be0446
However, by doing that WatcherYamlRestIT » test {p0=watcher/update_settings/10_update_watcher_settings/Test update and get watch settings api} starts to fail.
The "X-elastic-product" header is really missing from the headers. I suspect this bug is due to these lines:
elasticsearch/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/TransportGetWatcherSettingsAction.java
Lines 65 to 73 in f77c16b
That clear up the context in the response.
Steps to Reproduce
The bug is present in all versions from 8.8.0 to current; to trigger it is sufficient to call the API and observer the resulting response, and see that the product header is not there.
A way to do that is to remove the
if
here (elasticsearch/test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/DoSection.java
Lines 366 to 369 in 8be0446
./gradlew ':x-pack:plugin:watcher:qa:rest:yamlRestTest' --tests "org.elasticsearch.smoketest.WatcherYamlRestIT.test {p0=watcher/update_settings/10_update_watcher_settings/Test update and get watch settings api}"
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: