google / google/go-containerregistry

ggcr: use ETags in pkg/v1/remote

Open
#1,333 4 comments 0 reactions 0 assignees View on GitHub
bug lifecycle/frozen
Dominant language
Go
Stars
4k
Forks
686
Avg merge
2d 12h
Merged PRs (30d)
26

Description

When pulling a manifest by tag, if the response includes an `ETag` header, we should hold on to it, and pass it in any future updates to that tag using the `If-Match` header, as described in this proposal: https://github.com/opencontainers/distribution-spec/issues/250

This prevents race conditions, especially when appending a manifest to an index.

@jonjohnsonjr

Contributor guide

Open the contributing guide

Research direction

Start in pkg/v1/remote and trace manifest-by-tag reads and later tag updates. Verify that an ETag from a pull is retained and sent as If-Match on future updates, covering the race-prevention behavior described in the linked distribution-spec proposal.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.