Skip to content

Scriptfield test: set number of shards to 1#80026

Merged
stu-elastic merged 1 commit intoelastic:masterfrom
stu-elastic:pain_yaml_unsupported
Oct 28, 2021
Merged

Scriptfield test: set number of shards to 1#80026
stu-elastic merged 1 commit intoelastic:masterfrom
stu-elastic:pain_yaml_unsupported

Conversation

@stu-elastic
Copy link
Copy Markdown
Contributor

The 20_scriptfield:"Scripted Field with error accessing an
unsupported field via the script fields api" test expects to fail because
the field is not yet supported in the fields API.

However, if the number of shards in the target index is randomly more
than one, the empty shard will succeed leading to a 200 response rather
than the expected 400 response.

This change forces the number of shards to 1 to avoid this scenario.

Fixes: #79986

The 20_scriptfield:"Scripted Field with error accessing an
unsupported field via the script fields api" test expects to fail because
the field is not yet supported in the fields API.

However, if the number of shards in the target index is randomly more
than one, the empty shard will succeed leading to a 200 response rather
than the expected 400 response.

This change forces the number of shards to 1 to avoid this scenario.

Fixes: elastic#79986
@stu-elastic stu-elastic added >test Issues or PRs that are addressing/adding tests :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Oct 28, 2021
@stu-elastic stu-elastic requested a review from jdconrad October 28, 2021 15:24
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 28, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Copy Markdown
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@stu-elastic stu-elastic merged commit 9511c54 into elastic:master Oct 28, 2021
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 80026

stu-elastic added a commit to stu-elastic/elasticsearch that referenced this pull request Oct 28, 2021
The 20_scriptfield:"Scripted Field with error accessing an
unsupported field via the script fields api" test expects to fail because
the field is not yet supported in the fields API.

However, if the number of shards in the target index is randomly more
than one, the empty shard will succeed leading to a 200 response rather
than the expected 400 response.

This change forces the number of shards to 1 to avoid this scenario.

Fixes: elastic#79986
Backport: 9511c54
stu-elastic added a commit that referenced this pull request Oct 28, 2021
The 20_scriptfield:"Scripted Field with error accessing an
unsupported field via the script fields api" test expects to fail because
the field is not yet supported in the fields API.

However, if the number of shards in the target index is randomly more
than one, the empty shard will succeed leading to a 200 response rather
than the expected 400 response.

This change forces the number of shards to 1 to avoid this scenario.

Fixes: #79986
Backport: 9511c54
@stu-elastic
Copy link
Copy Markdown
Contributor Author

master (v8.1): 9511c54
8.0: 28d0446

Copy link
Copy Markdown
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v8.0.0-beta1 v8.1.0

Projects

None yet

6 participants