Skip to content

Conversation

@jan-elastic
Copy link
Contributor

No description provided.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

return Void.TYPE;
}).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any());

safeSleep(1200);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this waiting for the doAnswer() call? I'm not sure if this will be flaky but another option could be to add a count down latch and then here we await for the latch to be decremented.

Copy link
Contributor Author

@jan-elastic jan-elastic Mar 20, 2025

Choose a reason for hiding this comment

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

This is waiting for the adaptive allocations background process that makes these calls. That runs every 1s in this test (see constructor above). If within 1200ms nothing has happened, something is wrong.

With 200ms leeway it shouldn't be flaky, and never has been in the past.

I've also run these tests 100x locally without any problems.

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@jan-elastic jan-elastic merged commit a16eaf1 into main Mar 20, 2025
18 checks passed
@jan-elastic jan-elastic deleted the adaptive-allocations-dont-scaledown-recent-startups branch March 20, 2025 16:38
jan-elastic added a commit that referenced this pull request Mar 21, 2025
elasticsearchmachine pushed a commit that referenced this pull request Mar 21, 2025
elasticsearchmachine pushed a commit that referenced this pull request Mar 21, 2025
elasticsearchmachine pushed a commit that referenced this pull request Mar 21, 2025
elasticsearchmachine pushed a commit that referenced this pull request Mar 21, 2025
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request Mar 21, 2025
smalyshev pushed a commit to smalyshev/elasticsearch that referenced this pull request Mar 21, 2025
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml Machine learning >non-issue Team:ML Meta label for the ML team v8.18.1 v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants