Skip to content

oci: type the manifest 404 as snapshot.ErrManifestNotFound - #13

Merged
CMGS merged 2 commits into
mainfrom
oci-typed-manifest-notfound
Jul 28, 2026
Merged

oci: type the manifest 404 as snapshot.ErrManifestNotFound#13
CMGS merged 2 commits into
mainfrom
oci-typed-manifest-notfound

Conversation

@CMGS

@CMGS CMGS commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

GetManifest callers needing fail-closed semantics (vk-cocoon's hibernate-evidence check, cocoonstack/vk-cocoon#54 follow-up) currently pay a HasManifest HEAD before every GET purely to distinguish clean absence from transport failure. This maps the registry 404 to a contract-level sentinel — snapshot.ErrManifestNotFound on the Downloader interface — so a single GET answers both questions; ignoreNotFound shares the same detection via the extracted isNotFound.

Additive: existing callers that treat any GetManifest error as fall-through (e.g. vk's resolveRunImage) are unaffected; no caller string-matches these errors (checked across the workspace).

  • go test -race ./... green.
  • make lint fails on main already (apis/v1 deprecated scheme.Builder, staticcheck SA1019) — pre-existing, untouched by this PR.

GetManifest callers that need fail-closed semantics (vk-cocoon's
hibernate-evidence check) currently pay a HasManifest HEAD before every
GET purely to distinguish clean absence from transport failure. The 404
now maps to a contract-level sentinel on the Downloader interface, so
one GET answers both questions; ignoreNotFound shares the detection.
@CMGS
CMGS merged commit b0a8b95 into main Jul 28, 2026
4 checks passed
@CMGS
CMGS deleted the oci-typed-manifest-notfound branch July 28, 2026 17:07
CMGS added a commit to cocoonstack/vk-cocoon that referenced this pull request Jul 28, 2026
cocoon-common's typed manifest 404 (cocoonstack/cocoon-common#13) lands
via the pseudo-version bump, so fetchHibernateManifest drops its
HasManifest HEAD: absence comes back as ErrManifestNotFound, every other
error keeps failing closed. One registry round trip per wake and per
create-time evidence check instead of two.
CMGS added a commit to cocoonstack/vk-cocoon that referenced this pull request Jul 28, 2026
…and status reconcile (#57)

* stats: shared scrape sample; startup: parallel probe starts and status reconcile

Follow-ups from the whole-repo efficiency audit. The three scrape
consumers (stats summary, metrics resource, Prometheus collector) each
paid their own /proc+statfs sweep per VM; they now share one 2s-TTL
sample, and CPU+RSS come from a single /proc/<pid>/stat read (RSS field
24 replaces the separate status VmRSS read — same resident-set
definition). StartupReconcile's adopted-pod probe starts move to a
bounded fan-out: each first probe is synchronous with a 3s worst case
and the loop gates node registration. reconcilePodStatuses gets the
same bounded fan-out; the three reconcile paths share reconcileFanOut.

* registry: one GET decides hibernate evidence

cocoon-common's typed manifest 404 (cocoonstack/cocoon-common#13) lands
via the pseudo-version bump, so fetchHibernateManifest drops its
HasManifest HEAD: absence comes back as ErrManifestNotFound, every other
error keeps failing closed. One registry round trip per wake and per
create-time evidence check instead of two.

* review: whole-repo round on the efficiency PR

fanOut collapses the two policy-identical bounded fan-outs (probe
starts inline at the call site, status reconcile's closure drops its
error ceremony); the shared constant splits by lifecycle into
startupFanOut and statusReconcileFanOut so steady-state apiserver
concurrency tunes independently of the boot gate; buildNetworkStats
drops the disjunct the upstream sample already implies; narration
trimmed from the sample/parse/evidence comments. Skipped as adjudicated:
Manager.StartBatch (single-consumer API), a lazily-split sample cache
(codex round-1 rebuttal), a generic TTL-cache type (one instantiation).

* docs: describe shared metrics sampling
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