Skip to content

Conversation

nielsbauman
Copy link
Contributor

By doing VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion()), we could also get Version.CURRENT, as that version is also compatible with the previous version (unless we're running right after a major version was released). If the oldVersion variable in these tests is equal to the current version, the tests will fail as their whole goal is to verify behavior with different node versions. Instead, we should get a random version that is at most the previous version, to guarantee that oldVersion always preceeds the current version.

Fixes #135590\

By doing
`VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion())`,
we could also get `Version.CURRENT`, as that version is also compatible
with the previous version (unless we're running right after a major
version was released). If the `oldVersion` variable in these tests is
equal to the current version, the tests will fail as their whole goal is
to verify behavior with different node versions.

Fixes elastic#135590
@nielsbauman nielsbauman added >test Issues or PRs that are addressing/adding tests :Data Management/ILM+SLM Index and Snapshot lifecycle management labels Sep 30, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added Team:Data Management Meta label for data/management team v9.2.0 labels Sep 30, 2025
@nielsbauman nielsbauman enabled auto-merge (squash) September 30, 2025 20:20
@nielsbauman nielsbauman merged commit 712cf9f into elastic:main Sep 30, 2025
32 of 34 checks passed
@nielsbauman nielsbauman deleted the fix-set-single-node branch September 30, 2025 22:16
@nielsbauman
Copy link
Contributor Author

💔 Some backports could not be created

Status Branch Result
9.1
9.0
8.19 Conflict resolution was aborted by the user

Manual backport

To create the backport manually run:

backport --pr 135724

Questions ?

Please refer to the Backport tool documentation

nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Oct 8, 2025
By doing
`VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion())`,
we could also get `Version.CURRENT`, as that version is also compatible
with the previous version (unless we're running right after a major
version was released). If the `oldVersion` variable in these tests is
equal to the current version, the tests will fail as their whole goal is
to verify behavior with different node versions. Instead, we should get a
random version that is at most the previous version, to guarantee that
`oldVersion` always precedes the current version.

Fixes elastic#135590

(cherry picked from commit 712cf9f)
nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Oct 8, 2025
By doing
`VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion())`,
we could also get `Version.CURRENT`, as that version is also compatible
with the previous version (unless we're running right after a major
version was released). If the `oldVersion` variable in these tests is
equal to the current version, the tests will fail as their whole goal is
to verify behavior with different node versions. Instead, we should get a
random version that is at most the previous version, to guarantee that
`oldVersion` always precedes the current version.

Fixes elastic#135590

(cherry picked from commit 712cf9f)
elasticsearchmachine pushed a commit that referenced this pull request Oct 8, 2025
By doing
`VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion())`,
we could also get `Version.CURRENT`, as that version is also compatible
with the previous version (unless we're running right after a major
version was released). If the `oldVersion` variable in these tests is
equal to the current version, the tests will fail as their whole goal is
to verify behavior with different node versions. Instead, we should get a
random version that is at most the previous version, to guarantee that
`oldVersion` always precedes the current version.

Fixes #135590

(cherry picked from commit 712cf9f)
elasticsearchmachine pushed a commit that referenced this pull request Oct 8, 2025
By doing
`VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion())`,
we could also get `Version.CURRENT`, as that version is also compatible
with the previous version (unless we're running right after a major
version was released). If the `oldVersion` variable in these tests is
equal to the current version, the tests will fail as their whole goal is
to verify behavior with different node versions. Instead, we should get a
random version that is at most the previous version, to guarantee that
`oldVersion` always precedes the current version.

Fixes #135590

(cherry picked from commit 712cf9f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v9.0.9 v9.1.6 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] SetSingleNodeAllocateStepTests testPerformActionSomeShardsOnlyOnNewNodes failing
3 participants