Skip shard deprecation messages in REST tests #30630
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A 6.x node can send a deprecation message that the default number of shards will change from five to one in 7.0.0. In a mixed cluster, whether or not a create index request sees five or one shard and produces a deprecation message depends on the version of the master node. This means that during BWC tests a test can see this deprecation message depending on the version of the master node. In 6.x when we introduced this deprecation message we assumed that whereever we see this deprecation message is expected. However, in a mixed cluster test we need a similar mechanism but it would only apply if the version of the master node is earlier than 7.0.0. This commit takes advantage of a recent change to expose the version of the master node to do sections of REST tests. With this in hand, we can skip asserting on the deprecation message if the version of the master node is before 7.0.0 and otherwise seeing that deprecation message would be completely unexpected.
Relates #30539, relates #30587, relates #30623