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

[8.x] [Reporting] Delete the task from Task Manager when deleting a report (#192417) #194758

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…lastic#192417)

## Summary

Closes elastic#191676

This PR ensures that when a user deletes a report, if there is a backing
Task Manager task that references the report job, that task is deleted
as well. With these changes, the report job will truly be "cancelled"
when a report is deleted.

The risk of not cancelling the Task Manager task when deleting a report
is evident in server logs and in task monitoring, when automated tests
are run on the reporting features.

### How to test
Primarily, the API Integration test for the Reporting Datastream
exercises the changes in this PR.

### Checklist

- [x] Ensure the API/Functional tests are using the delete report
endpoint rather than directly deleting reports from the ES store.
* **To prevent this PR from becoming very large, this assurance is only
needed for serverless tests, and for tests that do not wait for the
report job to be completed before deleting the report document.**
* Those constrictions narrow the changes down to just the test on the
Reporting Datastream
- [x] Handle scenario of report document deleted before task begins or
completes
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit dfee928)
@kibanamachine kibanamachine merged commit 69f3b54 into elastic:8.x Oct 2, 2024
23 checks passed
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @tsullivan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants