Skip to content

atelet: coalesce cold credential-provider execs - #3836

Closed
Diamond (diamondburned) wants to merge 1 commit into
agent-substrate:mainfrom
diamondburned:fix/credprovider-singleflight-empty-auth
Closed

Diamond (diamondburned) wants to merge 1 commit into
agent-substrate:mainfrom
diamondburned:fix/credprovider-singleflight-empty-auth

Conversation

@diamondburned

@diamondburned Diamond (diamondburned) commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

Related to #3150, #3583, #3588

Concurrent cold image pulls against the same container registry forked separate credential-provider subprocesses that stampeded node metadata and STS endpoints, and a throttled provider exiting 0 with an empty auth map or blank password poisoned the 1-minute response cache with anonymous credentials.

  • Coalesces concurrent cold credential-provider executions per registry (falling back to per-image flights when a plugin reports Image cache scope), using waiter-counted context cancellation that atomically deletes zero-waiter flights under p.mu so subsequent callers never join a cancelled flight.
  • Filters out blank-password entries before caching so empty/throttled responses are never cached.
  • Sets a 5 s WaitDelay on plugin subprocesses and retries transient HTTP 429/5xx throttling outputs with bounded jittered backoff.

Relationship to #3150 and #3583 / #3588

  • #3150 (local GCS snapshot token minting) vs. #3836: #3150 eliminates per-actor STS calls in objectstore-plugin (gcsissuer), which also removes snapshot STS traffic from competing for the project-wide 6,000/min Cloud STS quota (making our companion snapshot PR #3838 unnecessary once #3150 merges). However, #3150 does not touch atelet's kubelet OCI image-pull credential provider (cmd/atelet/internal/credentialprovider): without #3836, concurrent cold OCI image pulls on a fresh node still fork parallel auth-provider-gcp subprocesses and cache empty auth: {} responses for 60 s (minCacheDuration) on transient metadata/STS blips, causing Unauthenticated pull failures on standard non-streaming OCI pulls. (Priority drops from P0 to a defensive reliability fix once #3150 merges.)
  • #3583 / #3588: Orthogonal (exchangeclient HTTP/2 transport pooling in objectstore-plugin, zero file overlap with cmd/atelet/internal/credentialprovider).

Verification

  • go test -race -count=3 -shuffle=on ./cmd/atelet/internal/credentialprovider/...
  • ./hack/verify/boilerplate.sh && ./hack/verify/gofmt.sh && ./hack/verify/package-deps.sh && ./hack/verify/shellcheck.sh

🤖 PR was made with the use of generative AI.

Concurrent cold pulls against the same container registry forked
separate credential-provider subprocesses that stampeded node metadata
and STS endpoints, and a throttled provider exiting 0 with an empty auth
map or blank password poisoned the 1-minute response cache with
anonymous credentials.

Coalesce concurrent cold misses per registry (falling back to per-image
flights when a plugin reports Image cache scope) with waiter-counted
context cancellation that atomically removes zero-waiter flights under
the plugin mutex so subsequent callers never join a cancelled execution.
Filter out blank-password entries before caching, set a 5s WaitDelay on
plugin commands, and retry transient HTTP 429/5xx throttling with
bounded jittered backoff.
@diamondburned

Copy link
Copy Markdown
Author

Closing as low-priority once #3150 (Fixes #3156) lands:

  • With #3150 replacing per-actor snapshot Cloud STS exchanges with local Tink Credential Access Boundary token minting (and #3588 pooling node-side exchangeclient transports), snapshot traffic no longer contends with cold atelet OCI image pulls for project STS quota, and streaming image plugins bypass atelet OCI credential-provider execs altogether.
  • Leaving the note above on cmd/atelet/internal/credentialprovider caching empty auth: {} responses for minCacheDuration (60 s) on transient provider throttling in case maintainers want to address that separately.

🤖 Automated reply by diamond's Jetski (model: claude-opus-4-6; conv_id: 5873d43) — comment generated verbatim by an AI agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant