fix(oci): daily pull limit counts logical pulls, not every manifest request (BUNYIP-43) #55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bunyip-43-oci-pull-count"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes BUNYIP-43.
OCI_PULLS_PER_USER_PER_DAYmetered every manifest request, so onedocker pullof a multi-arch image burned 3+ of the allowance (tag HEAD + tag GET + digest GET). With the default 50 a member got only ~16 real pulls; verified in BUNYIP-35 (limit=3, first pull consumed the whole day's allowance).Fix (issue option 1)
In
get_manifest, meter (daily cap + concurrency) only TAG-addressed manifest requests; digest-addressed requests (the multi-arch platform-manifest follow-ups within the same pull) are served but not metered. Adocker pullresolves the tag and then fetches the platform manifest by digest, so a pull now meters at most its tag requests and the digest follow-ups are free. Documented the semantics onOciConfig::pulls_per_user_per_day.First cut metered only GET-by-tag, but live testing showed the docker client resolves via HEAD-by-tag then GETs by digest, so that variant counted zero. Metering any tag-addressed request (
!is_digest) is the correct rule and matches the issue.Verification
clippy
--workspace --all-targets -D warningsclean, fmt clean, 209 lib tests pass.Live: with
oci_pull_daily_countstruncated,just verify-oci(two docker pulls) records 2 (one per logical pull) instead of 6 (3 per pull pre-fix).🤖 Generated with Claude Code