-
Notifications
You must be signed in to change notification settings - Fork 147
Conversation
I think by and large this makes sense. One critical omission here: the "apps" field in the "dependencies" list. |
Updated. |
@@ -447,10 +447,10 @@ When evaluating `ac-discovery` tags, the client MUST first ensure that the prefi | |||
|
|||
```bash | |||
urltmpl="https://{name}-{version}-{os}-{arch}.{ext}" | |||
curl $(echo "$urltmpl" | sed -e "s/{name}/$appname/" -e "s/{version}/$version/" -e "s/{os}/$os/" -e "s/{arch}/$arch/" -e "s/{ext}/$ext/") | |||
curl $(echo "$urltmpl" | sed -e "s/{name}/$imgname/" -e "s/{version}/$version/" -e "s/{os}/$os/" -e "s/{arch}/$arch/" -e "s/{ext}/$ext/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be name, I think, not sure why it was appname in the first place?
@yifan-gu sorry, while you're in there.. |
870aa4f
to
f8b6eea
Compare
@jonboulle NW. Updated again. |
These attributes are expressed in the **labels** field of the [Image Manifest](#image-manifest-schema). | ||
App Container Image Discovery prescribes a discovery process to retrieve an image based on the name and these attributes. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
superfluous newline
@yifan-gu Spec change lgtm. Please update the schema alongside this, sorry I forgot to mention that earlier... |
@jonboulle Then I found we need to change a bunch of places as well.... I have changed all the appearances of |
/cc @krobertson any thoughts on this? |
LGTM, make more sense than "app name". |
@@ -762,8 +764,8 @@ JSON Schema for the Image Manifest (app image manifest, ACI manifest), conformin | |||
* **count** (integer, optional, defaults to 1) specifies a range of ports, starting with "port" and ending with "port" + "count" - 1. | |||
* **socketActivated** (boolean, optional, defaults to "false" if unsupplied) if set to true, the application expects to be [socket activated](http://www.freedesktop.org/software/systemd/man/sd_listen_fds.html) on these ports. The ACE must pass file descriptors using the [socket activation protocol](http://www.freedesktop.org/software/systemd/man/sd_listen_fds.html) that are listening on these ports when starting this app. If multiple apps in the same pod are using socket activation then the ACE must match the sockets to the correct apps using getsockopt() and getsockname(). | |||
* **dependencies** (list of objects, optional) dependent application images that need to be placed down into the rootfs before the files from this image (if any). The ordering is significant. See [Dependency Matching](#dependency-matching) for how dependencies are retrieved. | |||
* **app** (string, required) name of the dependent App Container Image. | |||
* **imageID** (string of type [Image ID](#image-id-type), optional) content hash of the dependency. If provided, the retrieved dependency must match the hash. This can be used to produce deterministic, repeatable builds of an App Image that has dependencies. | |||
* **name** (string of type [AC Name](#ac-name-type), required) name of the dependent App Container Image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer to see this as "image". "name" seems to always be confusing because it is often ambiguous as to whether it is a reference to something else, or the name of the object itself (in this case, the name of the dependency).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdaylward my initial argument in favour of name
would be that it is a key reference. But on thinking about it further it seems like:
a) this field should be optional; one might desire a deterministic set of dependencies (i.e. only referencing by ID) and the name field is not then strictly necessary (provided of course the implementation supports lookups based on ID alone)
b) a qualified imageName
/ imageID
might be preferable since these are not actually image objects (rather, dependency objects)
@yifan-gu thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonboulle
For a), if the user also specifies the labels, then we can identify the image deterministically, no? My previous understanding on this is that sha512 is more for machine than for human.
For b), I agree that they are not image objects by definition, but they are still describing images. If that's pretty clear to user, or if images are the dependency object, then I think removing the 'image' part is OK. Furthermore, maybe we can call it "required images" instead of dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yifan-gu There is nothing to guarantee that labels are deterministic, no. They should be, but we can't mandate it without having a centralised repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets see, the content addressed iD presently implies a tar archive, which is an ACI archive.
"Dependencies" could be clarified a bit as "Required Images". This is a common pattern picked up in other packaging formats like RPM ("Requires").
Is there any other type of dependency besides images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other type of dependency besides images?
Nope.
I'm sympathetic to "required images".
lgtm, overall. I will let @jonboulle resolve the image/name discussion with @cdaylward and @yifan-gu |
@jonboulle I am ok with imageName, imageID, (do we need to change to imageLabels as well)? |
"app": "example.com/reduce-worker-base", | ||
"imageID": "sha512-...", | ||
"name": "example.com/reduce-worker-base", | ||
"id": "sha512-...", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps this ID need a more generic name. It is defined as Image ID, but could likely be CAS ID or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbatts I don't really follow, how does this relate to the discussion below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropping this to ID here seems too terse. UUID is an ID as well, but that is not what is meant here. Sorry if it's off-topic, it just seems a little too terse. Like the next step would be to loosen up the requirement to be Image ID formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revert this to "imageID". Right now it does mean something rather strict. If we want to loosen the requirement we can address that separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I already started down this path but forgot to put up a PR - jonboulle@e343fa9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonboulle That looks good. You can send as a PR so I can close this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NV, Let me just pull from you commit
e343fa9
to
3496fda
Compare
Keeps the imageID, and change app to imageName. |
@yifan-gu I don't think you just pulled my commit - the build is broken now :/ |
Also rename dependency.App to dependency.imageName.
@jonboulle I did, and squashed the commits. For some reason we forgot this line :( Now it's fixed |
LGTM. Thanks. |
spec: Rename app name to image name.
Use
app name
in this section seems a little bit out of tune to me. How about changing it toimage name
?/cc @jonboulle @philips