Skip to content

[V2] Fix pod owner reference to enable watch-triggered reconciles#7167

Merged
pingsutw merged 2 commits intov2from
fix-pod-owner-ref-controller
Apr 8, 2026
Merged

[V2] Fix pod owner reference to enable watch-triggered reconciles#7167
pingsutw merged 2 commits intov2from
fix-pod-owner-ref-controller

Conversation

@pingsutw
Copy link
Copy Markdown
Member

@pingsutw pingsutw commented Apr 8, 2026

Summary

  • Set Controller: true on the pod owner reference so that controller-runtime's Owns(&corev1.Pod{}) recognizes pods as controller-owned
  • Without this, pod status changes (Pending → Running → Succeeded) never triggered reconciles if task runtime is less than 5 seconds, and intermediate phases like RUNNING were missed in action events
    TaskActionDefaultRequeueDuration = 5 * time.Second

Before: Screenshot 2026-04-07 at 5 28 42 PM

After: Screenshot 2026-04-07 at 5 30 06 PM

Test plan

  • Deploy executor and run a task that takes >2s
  • Verify action events in DB contain phase 4 (RUNNING) between INITIALIZING and SUCCEEDED
  • main
    • Flyte 2 #6583
      • [V2] Fix pod owner reference to enable watch-triggered reconciles 👈

The pod owner reference was missing Controller: true, which meant
controller-runtime's Owns(&corev1.Pod{}) did not recognize pods as
controller-owned. Pod status changes (Pending → Running → Succeeded)
never triggered reconciles, causing intermediate phases like RUNNING
to be missed in action events.

Signed-off-by: Kevin Su <pingsutw@apache.org>
@github-actions github-actions bot mentioned this pull request Apr 8, 2026
3 tasks
Signed-off-by: Kevin Su <pingsutw@apache.org>
Copy link
Copy Markdown
Member

@machichima machichima left a comment

Choose a reason for hiding this comment

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

LGTM!

@pingsutw pingsutw merged commit f5d7b79 into v2 Apr 8, 2026
25 of 26 checks passed
@pingsutw pingsutw deleted the fix-pod-owner-ref-controller branch April 8, 2026 00:51
@pingsutw pingsutw added the flyte2 label Apr 8, 2026
@pingsutw pingsutw added this to the V2 GA milestone Apr 8, 2026
@pingsutw pingsutw self-assigned this Apr 8, 2026
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.

2 participants