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

[Response Ops][Alerting] Backfill jobs should be deleted when originating rule is deleted #182240

Closed
ymao1 opened this issue May 1, 2024 · 1 comment · Fixed by #183770
Closed
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@ymao1
Copy link
Contributor

ymao1 commented May 1, 2024

When a rule is deleted, any in progress backfill jobs for that rule should also be deleted to avoid using task manager cycles on un-needed backfills.

@ymao1 ymao1 added Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels May 1, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@ymao1 ymao1 self-assigned this May 9, 2024
ymao1 added a commit that referenced this issue May 30, 2024
…is deleted (#183770)

Resolves #182240

## Summary

Queries for and deletes any pending backfill tasks for a rule when a
rule is deleted.

## To Verify

1. Create a detection rule
2. Schedule a backfill for the rule with a long time interval that will
take a while to run

```
POST /internal/alerting/rules/backfill/_schedule
[
  {
    "rule_id": <ruleId>,
    "start": "2024-05-01T12:00:00.000Z",
    "end": "2024-05-10T12:00:00.000Z",
  }
]
```

3. Make sure you can retrieve the backfill info: `GET
kbn:/internal/alerting/rules/backfill/{backfillId}`
4. Delete the rule via the UI or API
5. Try to get the backfill info again. The job should be deleted

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants