You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Skill Discovery E2E test intermittently fails because the controller's status update for linkedSkills hits a Kubernetes optimistic concurrency conflict and does not retry. This causes the linkedSkills field to never be populated, and the test times out after 180s.
Affected: main branch — all recent CI runs fail on this test. Impact: 1 test fails, 5 skip (cascading from same Describe block).
Root Cause
During reconciliation of an AgentRuntime with skill annotations, the controller attempts to update .status.linkedSkills. If another reconciliation loop modifies the same AgentRuntime object concurrently (e.g., adding labels, updating config-hash), the status update fails with:
Operation cannot be fulfilled on agentruntimes.agent.kagenti.dev "skill-discovery-agent":
the object has been modified; please apply your changes to the latest version and try again
The controller does not retry the status update after this conflict error. The reconciler returns the error, gets requeued, but the next reconciliation may take a different code path (object already has labels/hash), skipping the linkedSkills update.
Evidence
From CI run 27253451563 (branch fix/webhook-readiness-420, June 10 2026):
Test polls for linkedSkills from 04:57:42 to 05:01:20 (4+ minutes)
Controller logs show conflict error at 04:58:20Z
The linkedSkills field is never populated after the conflict
Same failure on main branch: runs 27249800636, 27249348694, 27249047484 all fail.
Summary
The Skill Discovery E2E test intermittently fails because the controller's status update for
linkedSkillshits a Kubernetes optimistic concurrency conflict and does not retry. This causes thelinkedSkillsfield to never be populated, and the test times out after 180s.Affected:
mainbranch — all recent CI runs fail on this test.Impact: 1 test fails, 5 skip (cascading from same Describe block).
Root Cause
During reconciliation of an AgentRuntime with skill annotations, the controller attempts to update
.status.linkedSkills. If another reconciliation loop modifies the same AgentRuntime object concurrently (e.g., adding labels, updating config-hash), the status update fails with:The controller does not retry the status update after this conflict error. The reconciler returns the error, gets requeued, but the next reconciliation may take a different code path (object already has labels/hash), skipping the linkedSkills update.
Evidence
From CI run
27253451563(branchfix/webhook-readiness-420, June 10 2026):linkedSkillsfrom 04:57:42 to 05:01:20 (4+ minutes)linkedSkillsfield is never populated after the conflictSame failure on
mainbranch: runs27249800636,27249348694,27249047484all fail.Relationship to #420
Issue #420 identified two problems causing the Skill Discovery test failure:
PR #421 resolves problem 1. This issue tracks problem 2.
Proposed Fix
In the Skill Discovery reconciliation path, when updating
.status.linkedSkills:client.Status().Patch()instead ofclient.Status().Update()to reduce conflict surfaceretry.RetryOnConflict()fromk8s.io/client-go/util/retryExample pattern
Where to look
linkedSkillsorLinkedSkillsis set in the statusretry.RetryOnConflictLabels
buge2epriority/high