acoustic-carpenter-78188
04/01/2026, 2:35 AMk8sClient.Watch to reduce the loading for k8s API server, and do not need to maintain resource version manually
What changes were proposed in this pull request?
• Add informer cache with worker pool. Informer cache will add element to queue when the objects are added/updated, background workers will take them out from the queue and send RPC request to run service to persist them.
• Add label <http://flyte.org/terminal-status-recorded|flyte.org/terminal-status-recorded>: true after successfully persisted the status through UpdateActionStatus to run service. The later watch will skip the object with this label.
How was this patch tested?
• Update unit test
• Run sandbox locally and submit examples. Ensure:
• no "slow SQL" warning exists
• the terminal status sync label is added
❯ k describe taskactions -n flytesnacks-development rg9ntsvzhrpkmxnk9fbf-a0 | grep -A 9 "Labels"
Labels: flyte.org/action=a0
flyte.org/action-type=task
flyte.org/completed-time=2026-04-01.01-46
flyte.org/domain=development
flyte.org/is-root=true
flyte.org/org=localhost
flyte.org/project=flytesnacks
flyte.org/run=rg9ntsvzhrpkmxnk9fbf
flyte.org/terminal-status-recorded=true # label added here
flyte.org/termination-status=terminated
Labels
Please add one or more of the following labels to categorize your PR:
• added: For new features.
• changed: For changes in existing functionality.
• deprecated: For soon-to-be-removed features.
• removed: For features being removed.
• fixed: For any bug fixed.
• security: In case of vulnerabilities
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
Related PRs
Docs link
• main
• #6583
• [v2] Informer cache 👈
flyteorg/flyteacoustic-carpenter-78188
04/01/2026, 2:35 AMacoustic-carpenter-78188
04/01/2026, 8:22 AM