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

Wait for task completion in IndexLifecycleRunnerTests #94901

Conversation

DaveCTurner
Copy link
Contributor

These tests submit tasks to the master service and wait for the state to be applied, but not for the publication to complete, and without that wait they may clean up too soon. This commit makes them wait for the master service to finish its work before cleaning up.

Relates #94325
Closes #94900

These tests submit tasks to the master service and wait for the state to
be applied, but not for the publication to complete, and without that
wait they may clean up too soon. This commit makes them wait for the
master service to finish its work before cleaning up.

Relates elastic#94325
Closes elastic#94900
@DaveCTurner DaveCTurner added >test Issues or PRs that are addressing/adding tests :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.8.0 labels Mar 30, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Mar 30, 2023
@elasticsearchmachine
Copy link
Collaborator

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

@gmarouli gmarouli self-requested a review March 30, 2023 12:12
Copy link
Contributor

@gmarouli gmarouli left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this @DaveCTurner, much appreciated. LGTM, I have one comment and a nit :).

As I was going through the change I noticed one more attempt to close things at line 309. Should we add it there too?

Nit: This test already has a set up and a tear down method, I am wondering if we could use them instead of doing the same things in many of these tests. I am happy to look into this as a follow up of this PR, if you think it's a good idea.

@DaveCTurner
Copy link
Contributor Author

As I was going through the change I noticed one more attempt to close things at line 309. Should we add it there too?

Thanks, yes I think that makes sense too. Added in 980f90e.

@DaveCTurner DaveCTurner added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Mar 30, 2023
@DaveCTurner
Copy link
Contributor Author

I am happy to look into this as a follow up of this PR, if you think it's a good idea.

Yes please. In fact I think that it'd be simpler if most of these tests just waited for the master service to complete its work instead of using the per-task latch as done at the moment.

@gmarouli
Copy link
Contributor

I am happy to look into this as a follow up of this PR, if you think it's a good idea.

Yes please. In fact I think that it'd be simpler if most of these tests just waited for the master service to complete its work instead of using the per-task latch as done at the moment.

Makes sense, I will look into it.

@elasticsearchmachine elasticsearchmachine merged commit bec25f0 into elastic:main Mar 30, 2023
@DaveCTurner DaveCTurner deleted the 2023-03-30-IndexLifecycleRunnerTests-wait-for-task-completion branch March 30, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :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 v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] IndexLifecycleRunnerTests testRunStateChangePolicyWithNextStep failing
3 participants