Skip to content

feat: cascade kill active TriggerRuns on pipeline delete#1110

Open
ishtoo1 wants to merge 1 commit intofeat/cascade-delete-wire-managersfrom
feat/cascade-delete-kill-trs
Open

feat: cascade kill active TriggerRuns on pipeline delete#1110
ishtoo1 wants to merge 1 commit intofeat/cascade-delete-wire-managersfrom
feat/cascade-delete-kill-trs

Conversation

@ishtoo1
Copy link
Copy Markdown
Contributor

@ishtoo1 ishtoo1 commented Apr 22, 2026

What type of PR is this? (check all applicable)

  • Feature

What changed?

  • In handleDeletion, after listing children and before the terminal-delete step, list active TRs and issue KillTriggerRun on each (best-effort).
  • Requeue after kill so the controller can wait for TRs to reach a terminal state before proceeding.
  • Add TestCascadeDelete_ActiveTriggerRuns.

Why?
Addressing #1091.
The correct cascade order is kill → wait → delete. This PR handles the kill step for TriggerRuns.

How did you test it?

Potential risks

  • Kill is best-effort per the TR. If every kill fails, the controller requeues indefinitely. Timeout handling is added in the metrics PR later in the stack.

Release notes
N/A (cumulative user-visible change lands in feat/cascade-delete-children).

Documentation Changes
N/A.


Stacked on top of #1109.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 22, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Go Coverage Report (Bazel)

Total Coverage: 63.2%

Coverage Policy:

  • Baseline (existing code): ≥60% (current coverage)
  • New/changed code: ≥90% ✅ STRICTLY ENFORCED
  • Long-term goal: Improve baseline to 90%

View detailed HTML report in artifacts

@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-wire-managers branch from 72fc393 to 1b5ed29 Compare April 23, 2026 20:54
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-kill-trs branch from 5e0bf31 to 28a170c Compare April 23, 2026 20:54
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-wire-managers branch from 1b5ed29 to c52415a Compare April 23, 2026 22:01
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-kill-trs branch from 28a170c to 97085c9 Compare April 23, 2026 22:01
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-wire-managers branch from c52415a to 725de61 Compare April 23, 2026 22:54
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-kill-trs branch from 97085c9 to 851521f Compare April 23, 2026 22:54
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-wire-managers branch from 725de61 to c92d26d Compare April 24, 2026 22:09
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-kill-trs branch from 851521f to 2cbba97 Compare April 24, 2026 22:09
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-wire-managers branch from c92d26d to 2cd0884 Compare April 25, 2026 03:50
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-kill-trs branch from 2cbba97 to 9e54a13 Compare April 25, 2026 03:50
Summary:
Intent:
- Kill active TriggerRuns before deleting them during pipeline cascade delete

Changes:
- Add kill-active-TriggerRuns step in handleDeletion: lists active TRs, sets KILL action on each (best-effort), requeues
- Add TestCascadeDelete_ActiveTriggerRuns verifying KILL action set on running TR and requeue

Test Plan:
- go test ./components/pipeline/... -v -count=1 (all tests pass)

Revert Plan:
Revert this PR via git revert.

Jira Issues:
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-wire-managers branch from 2cd0884 to fec99fa Compare April 25, 2026 05:57
@ishtoo1 ishtoo1 force-pushed the feat/cascade-delete-kill-trs branch from 9e54a13 to 59f65d6 Compare April 25, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants