ateapi: classify atelet churn as Unavailable - #710
Open
NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
Open
ateapi: classify atelet churn as Unavailable#710NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
NekoPunch (orangeCatDeveloper) wants to merge 1 commit into
Conversation
DialForWorker's transient failures (atelet pod being replaced, IP not yet assigned) surfaced as the interceptor's Internal default, telling clients not to retry an error that self-heals in seconds. Unavailable lets the router park and retry; its 503s now carry Retry-After: 1. Worker-pod-side lookups keep their current classification (agent-substrate#600), and a full workflow-step audit is agent-substrate#605's inverse direction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the atelet DaemonSet pod on a node is being replaced (routine during node upgrades),
DialForWorkerfails with a plainfmt.Errorf, so the interceptor defaults it tocodes.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 returncodes.Unavailable: the interceptor extracts the code through%wwrapping, the router parks and retries per docs/request-parking.md, and unrecoverable cases surface as 503 withRetry-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.
Fixes #646
Test plan
Unavailable; a wrapping test asserts the code survivesfmt.Errorf("...: %w", err)as the workflows wrap it;ErrWorkerPodNotFoundsentinel unaffectedretry-after: 1present on 503 immediate responses, absent on 500/504/403; RawValue encoding pinned