Skip to content

Conversation

@ldematte
Copy link
Contributor

@ldematte ldematte commented Oct 27, 2025

When I resumed work on #105641 (now #136853), I had some serverless tests failures.

When we moved away from Version in ESRestTest, we added fallbacks for non-sematic versions, which applied the concept "not a semantic version? We assume everything is "current" and supported", which played well for e.g. serverless.
Down the road we acquired the concept of "version features", but we lost this concept; now tests with e.g. skip: gte_v720 are failing on serverless because it does not have a "7.2.0" node (*)

This PR fixes the problem by re-introducing the non-semver == current version equivalency via a version features predicate.

(*) after applying #136853

@ldematte ldematte added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label labels Oct 27, 2025
@ldematte ldematte requested a review from mosche October 27, 2025 16:31
@ldematte ldematte marked this pull request as ready for review October 27, 2025 16:31
@ldematte ldematte requested a review from a team as a code owner October 27, 2025 16:31
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Oct 27, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@ldematte ldematte requested a review from rjernst October 27, 2025 16:32
Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

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

lgtm, just a minor comment regarding visibility of ESRestTestFeatureService

if (semanticNodeVersions.isEmpty()) {
// Nodes do not have a semantic version (e.g. serverless).
// We assume the cluster is on the "latest version", and all is supported.
return ((featureVersion, any) -> true);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

}

return checkCollection(nodeVersions, v -> v.onOrAfter(extractedVersion), any);
return versionFeaturesPredicate.test(extractedVersion, any);
Copy link
Contributor

Choose a reason for hiding this comment

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

optional nit... it took me a bit to recall what any was, maybe we should rename to anyMatch, matchAny, isAnySufficient ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same :)
At least is consistent all the way, but I'll try and come up with a better name for it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed.
I'm not entirely happy yet, I think I might do a followup that either splits the functions or uses an enum for better clarity (here but mainly in TestFeatureService#clusterHasFeature)

@ldematte ldematte enabled auto-merge (squash) October 28, 2025 09:05
@ldematte ldematte merged commit 772e6a1 into elastic:main Oct 28, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants