appc/spec

App Container Image Discovery requires download of 'latest' to know if it has changed

Open

#415 opened on May 24, 2015

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Go (143 forks)github user discovery
component/discoveryhelp wantedkind/enhancement

Repository metrics

Stars
 (1,253 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Perhaps this is out of scope for what the appc spec should be capable of providing, but one feature I was hoping to get from the discovery process is the case where I want to know if the latest version of an image has changed. Currently, it appears that is not possible - the discovery workflow for latest goes something along these lines:

  • A Linux client is given an image name, along the lines of example.com/foo.
  • Simple discovery attempt happens by querying https://example.com/foo-latest-linux-amd64.aci. Assume this fails.
  • Meta discovery happens by querying https://example.com/foo?ac-discovery=1. Note that this is the same endpoint that is queried when a specific version is used, ie example.com/foo:1.0.0.
  • The image server must now present a template URI that embeds the {version} variable, which is interpolated by the client using version=latest.

The problem with this approach is that at no point the image server is given the opportunity to provide the actual version tag in the template URI (abc123 is never returned to the client). This means there is no way with appc for downstream clients to do things like facilitate automatic deploys after a new version is built.

Would it make sense to amend the spec by allowing the meta discovery process to explicitly pass a query for a particular version? This way the server can do the interpolation and pass back a specific version tag. Concretely, it might mean changing the discovery process from querying example.com/foo?ac-discovery=1 to example.com/foo:latest?ac-discovery=1.

Contributor guide