-
Notifications
You must be signed in to change notification settings - Fork 887
cas: Introduce latest pattern handling for image fetching. #394
Conversation
86736db
to
327efaf
Compare
08ff6d0
to
8a1b95b
Compare
Please rebase |
8a1b95b
to
28f977b
Compare
@iaguis Done! |
LGTM |
I'm good with this. @philips can you ack the latest behaviour is in line with your expectations too? |
Thanks for your review. I'm very interested to know if the behavior is good. This is also referenced in appc/spec#73. |
38b94cc
to
d37eb83
Compare
@sgotti sorry, we have a conflict now - can you please rebase and I'll get this merged? thanks! |
On fetching, if downloaded with the "latest" pattern (no version label specified), the ACI is saved in the store with the "latest" flag. In future, on "rkt fetch" or "rkt run", a way for the user to define if the provided images (by local file or URL) should be saved in the store with the lastest flag, should be provided. For doing this there's the need to find how the user can request this for a specific file/URL as multiple files/URls can be provided.
@jonboulle Done! |
return fetchImageFromEndpoints(ep, ds, ks) | ||
latest := false | ||
// No specified version label, mark it as latest | ||
if _, ok := app.Labels["version"]; !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.
just realised that _, latest := app.Labels["version"]
is a bit simpler
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 mmm. it should be negated. something like this?
_, ok := app.Labels["version"]
latest := !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.
yeah never mind :| needs sleep
lgtm |
cas: Introduce latest pattern handling for image fetching.
The last commit is the interesting one. It's based on #393.
On fetching, if downloaded with the "latest" pattern (no version label
specified), the ACI is saved in the store with the "latest" flag.
In future, on "rkt fetch" or "rkt run", a way for the user to define if the
provided images (by local file or URL) should be saved in the store with the
lastest flag, should be provided. For doing this there's the need to find how
the user can request this for a specific file/URL as multiple files/URls can be
provided.
See appc/spec#73 for my thoughts about the need of the "latest" flag.