elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.54k stars 24.61k forks source link

'Test typed keys parameter for suggesters' in CoreWithSecurityClientYamlTestSuiteIT fails with an assertion error. #31698

Closed jtibshirani closed 6 years ago

jtibshirani commented 6 years ago

I haven't been able to reproduce this failure locally, but it's come up twice in the last week. Given the assertion error, it may have the same underlying cause as the failures in https://github.com/elastic/elasticsearch/issues/31116.


Link to the build: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+matrix-java-periodic/ES_BUILD_JAVA=java10,ES_RUNTIME_JAVA=java8,nodes=virtual&&linux/135/console

Command to reproduce:

./gradlew :x-pack:qa:core-rest-tests-with-security:integTestRunner \
  -Dtests.seed=F4C38CCFC8C542E8 \
  -Dtests.class=org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT \
  -Dtests.method="test {yaml=suggest/40_typed_keys/Test typed keys parameter for suggesters}" \
  -Dtests.security.manager=true \
  -Dtests.locale=sr-BA \
  -Dtests.timezone=SystemV/YST9 \
  -Dtests.rest.blacklist=cat.aliases/10_basic/Empty cluster,index/10_with_id/Index with ID,indices.get_alias/10_basic/Get alias against closed indices,indices.get_alias/20_empty/Check empty aliases when getting all aliases via /_alias,cat.templates/10_basic/No templates,cat.templates/10_basic/Sort templates,cat.templates/10_basic/Multiple template

Relevant excerpt from the logs:

FAILURE 0.21s | CoreWithSecurityClientYamlTestSuiteIT.test {yaml=suggest/40_typed_keys/Test typed keys parameter for suggesters} <<< FAILURES!
   > Throwable #1: java.lang.AssertionError: Failure at [suggest/40_typed_keys:21]: did not get expected warning header [
   >    The ability to index a suggestion with no context on a context enabled completion field is deprecated and will be removed in the next major release.
   > ]
   >    at __randomizedtesting.SeedInfo.seed([21EAC823C8CE8E82:A9BEF7F96632E37A]:0)
   >    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:394)
   >    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:362)
   >    at java.lang.Thread.run(Thread.java:748)
   > Caused by: java.lang.AssertionError: did not get expected warning header [
   >    The ability to index a suggestion with no context on a context enabled completion field is deprecated and will be removed in the next major release.
   > ]
   >    at org.elasticsearch.test.rest.yaml.section.DoSection.checkWarningHeaders(DoSection.java:323)
   >    at org.elasticsearch.test.rest.yaml.section.DoSection.execute(DoSection.java:256)
   >    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:387)
   >    ... 37 more
elasticmachine commented 6 years ago

Pinging @elastic/es-search-aggs

elasticmachine commented 6 years ago

Pinging @elastic/es-security

jaymode commented 6 years ago

My guess is there is a bug with security enabled that drops the response headers when restoring a thread context

jaymode commented 6 years ago

This fails without security https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+periodic/6534/console so I think it might be something else with restoring contexts. Maybe in the transport layer

colings86 commented 6 years ago

We think this might be the same issue as https://github.com/elastic/elasticsearch/issues/31116. Jim is going to look into both of these issues

jimczi commented 6 years ago

This test was removed some time ago because the deprecation (and removal) is already tested in another rest test (see https://github.com/elastic/elasticsearch/issues/31116), hence I am closing this issue.