Skip to content

fix(ateapi): mark atelet churn unavailable - #710

Open
NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
agent-substrate:mainfrom
orangeCatDeveloper:issue-646-atelet-unavailable
Open

fix(ateapi): mark atelet churn unavailable#710
NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
agent-substrate:mainfrom
orangeCatDeveloper:issue-646-atelet-unavailable

Conversation

@orangeCatDeveloper

@orangeCatDeveloper NekoPunch (orangeCatDeveloper) commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #646

Summary

When the atelet DaemonSet pod on a node is being replaced (routine during node upgrades), DialForWorker fails with a plain fmt.Errorf, so the interceptor defaults it to codes.Internal — clients are told not to retry an error that self-heals in seconds (#646). The two transient paths (atelet pod count ≠ 1, no assigned IPs) now return codes.Unavailable: the interceptor extracts the code through %w wrapping, the router parks and retries per docs/request-parking.md, and unrecoverable cases surface as 503 with Retry-After: 1 (added to the router's immediate responses, 503 only).

Scope, per #646's own dedup notes: worker-pod-side lookups ("expected 1 pod match") stay as-is (#600's territory), credential/connection build failures remain Internal, and the full workflow-step audit is the inverse direction of #605.

Test plan

  • dialer: fake-informer scenarios (zero atelets, two atelets, atelet without IPs) assert Unavailable; a wrapping test asserts the code survives fmt.Errorf("...: %w", err) as the workflows wrap it; ErrWorkerPodNotFound sentinel unaffected
  • router: retry-after: 1 present on 503 immediate responses, absent on 500/504/403; RawValue encoding pinned

@maxsmythe

Copy link
Copy Markdown
Collaborator

Bowei Du (@bowei) to evaluate networking impact and/or route review

@orangeCatDeveloper
NekoPunch (orangeCatDeveloper) force-pushed the issue-646-atelet-unavailable branch 4 times, most recently from b11b3c0 to f0b203c Compare August 11, 2026 23:38
@orangeCatDeveloper
NekoPunch (orangeCatDeveloper) force-pushed the issue-646-atelet-unavailable branch 9 times, most recently from 94216d2 to 00c5690 Compare August 19, 2026 01:07
@orangeCatDeveloper
NekoPunch (orangeCatDeveloper) force-pushed the issue-646-atelet-unavailable branch 4 times, most recently from 621b92b to d2fdbf6 Compare August 25, 2026 03:32
@orangeCatDeveloper NekoPunch (orangeCatDeveloper) changed the title ateapi: classify atelet churn as Unavailable fix(ateapi): mark atelet churn unavailable Aug 25, 2026
@orangeCatDeveloper
NekoPunch (orangeCatDeveloper) force-pushed the issue-646-atelet-unavailable branch 3 times, most recently from 4e963ef to e6275a5 Compare August 29, 2026 19:06
@orangeCatDeveloper
NekoPunch (orangeCatDeveloper) force-pushed the issue-646-atelet-unavailable branch 2 times, most recently from dfb16c5 to 2192003 Compare September 4, 2026 06:27
Transient worker dial failures surfaced as internal errors, telling clients not to retry conditions that recover quickly. Mark control-plane dial churn unavailable so the router can park and retry. Worker-pod lookups retain their existing classification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/network kind/bug Something isn't working / bugfixes

Projects

None yet

2 participants