Skip to content

Proposal: Manifests.(GetByTag) : add digest argument for conditional get #692

Closed

Description

@RichardScothern

There is a need in the repository client to do a conditional get for a manifest. Currently if a client has a manifest and a tag, there is no way to check the remote for a newer version without fetching and hashing it.

I propose adding a functional parameter to Manifests.(GetByTag) which will include the expected digest of the tagged manifest. The implementation of GetByTag will include the digest in the etag header which will be read by the server and acted on accordingly.

The semantics for this call will change in that if a digest is provided which matches the remote tagged manifest, the call will return a nil manifest (and a nil error)

ping @stevvooe @dmcgowan

Activity

  1. changed the title [-]Manifests.(GetByTag) : add digest argument for conditional get[/-] [+]Proposal: Manifests.(GetByTag) : add digest argument for conditional get[/+] on Jul 13, 2015
  2. stevvooe commented on Jul 13, 2015

    @stevvooe
    Collaborator

    @RichardScothern This functionality should be hidden behind the GetByTag interface (this will be TagService.Get at some point. Note that we may want to handle this with some options to Get.

    d, err := Get(tag, Previous(previousDigest))
    

    Although, we may just want to build this right into the client, rather than requiring clients to handle it at a higher level. This may not be possible with the layered approach, as that is likely the source of the proposal.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions