Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dangling AwaitsFix #113941

Merged
merged 9 commits into from
Oct 8, 2024
Merged

Conversation

cbuescher
Copy link
Member

The issue referenced seems to be closed, maybe this just wasn't removed properly.

The issue referenced seems to be closed, maybe this just wasn't removed
properly.
@cbuescher cbuescher added >test Issues or PRs that are addressing/adding tests auto-backport-and-merge v8.16.0 :Search Foundations/Search Catch all for Search Foundations v9.0.0 labels Oct 2, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Oct 2, 2024
@cbuescher
Copy link
Member Author

Something in these tests is wrong with the version randomization after the switch to 9.0. Probably didn't matter so far because the tests were muted so long.
I'll take a look and see if or how the tests need to be updated.

@cbuescher
Copy link
Member Author

@ldematte since you seem to have fixed #101932 originally in #101962, would you mind taking a look at my test changes around versions here?

Copy link
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

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

Looks good, but I left a question to check my reasoning

public void testMinimumVersionSameAsNewVersion() throws Exception {
var newVersion = VersionInformation.CURRENT;
var oldVersion = new VersionInformation(
VersionUtils.randomVersionBetween(random(), Version.CURRENT.minimumCompatibilityVersion(), VersionUtils.getPreviousVersion()),
VersionUtils.randomCompatibleVersion(random(), VersionUtils.getPreviousVersion()),
Copy link
Contributor

Choose a reason for hiding this comment

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

So, the in the original test "old" was any random version between minimum compatibility and previous.
The new code defines "old" as any random version which is compatible with previous. "Compatible" is defined as the random version is on or after minimum compatibility of previous, and previous is on or after minimum compatibility of the random version.

Now this boils down to the same for intra-v8 as both the previous and the random version had the same minimum compatibility, while now v9 has a different (higher) minimum compatibility.

Is my reasoning sound? (I'm trying to understand why this is different and now works for any randomly generated version)

Copy link
Member Author

Choose a reason for hiding this comment

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

This test hasn't been running on any major version bump as far as I can tell (it has been muted a long time). On the v8 series, Version.CURRENT.minimumCompatibilityVersion() was always 7.17 and the previous-to-Current has always been some 8.x minor version.
This doesn't work with the major version bump at the moment since Current is 9.0, previous-to-Current is 8.15.2 (!!!) due to 8.16 not having been released yet, and minimum compatible is 8.16. So currently this errors.
I believe what we want in this test is "newVersion" at whatever the main branch is currently on (9.x minors), and oldVersion anything from minimumCompatible up to previous. For now this would only be 8.16, but as soon as we move on to other 9x minor versions we draw from a larger range.
So I think we are good here, but please keep me honest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, your explanation aligns with my understanding, thank you for double-checking this!

@mark-vieira mark-vieira added auto-backport Automatically create backport pull requests when merged and removed auto-backport-and-merge labels Oct 4, 2024
@cbuescher
Copy link
Member Author

@ldematte sorry this didn't move for a bit but I was running into issues with the LeakTracker when unmuting the tests that I also had to fix first. I left a note on why I think the version randomization is correct, the rest of the change now adapts to correct ref-counting on the QuerySearchResult that are now managed and tracked but haven't been adapted because the tests were muted.

@ldematte
Copy link
Contributor

ldematte commented Oct 8, 2024

@cbuescher sitll looks good! Thanks!

@cbuescher cbuescher merged commit 09d5e7f into elastic:main Oct 8, 2024
16 checks passed
@cbuescher cbuescher deleted the remove-awaitsfix-101932 branch October 8, 2024 08:31
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

cbuescher added a commit to cbuescher/elasticsearch that referenced this pull request Oct 8, 2024
The issue referenced seems to be closed, maybe this just wasn't removed
properly.
elasticsearchmachine pushed a commit that referenced this pull request Oct 8, 2024
The issue referenced seems to be closed, maybe this just wasn't removed
properly.
matthewabbott pushed a commit to matthewabbott/elasticsearch that referenced this pull request Oct 10, 2024
The issue referenced seems to be closed, maybe this just wasn't removed
properly.
davidkyle pushed a commit to davidkyle/elasticsearch that referenced this pull request Oct 13, 2024
The issue referenced seems to be closed, maybe this just wasn't removed
properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch >test Issues or PRs that are addressing/adding tests v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants