Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

cas: Introduce latest pattern handling for image fetching. #394

Merged
merged 1 commit into from
Mar 12, 2015

Conversation

sgotti
Copy link
Contributor

@sgotti sgotti commented Jan 19, 2015

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.

@iaguis
Copy link
Member

iaguis commented Feb 23, 2015

Please rebase

@sgotti
Copy link
Contributor Author

sgotti commented Feb 24, 2015

@iaguis Done!

@iaguis
Copy link
Member

iaguis commented Feb 26, 2015

LGTM

@jonboulle
Copy link
Contributor

I'm good with this. @philips can you ack the latest behaviour is in line with your expectations too?

@sgotti
Copy link
Contributor Author

sgotti commented Mar 9, 2015

Thanks for your review. I'm very interested to know if the behavior is good. This is also referenced in appc/spec#73.

@sgotti sgotti force-pushed the latestpattern branch 2 times, most recently from 38b94cc to d37eb83 Compare March 10, 2015 10:07
@jonboulle
Copy link
Contributor

@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.
@sgotti
Copy link
Contributor Author

sgotti commented Mar 10, 2015

@jonboulle Done!

return fetchImageFromEndpoints(ep, ds, ks)
latest := false
// No specified version label, mark it as latest
if _, ok := app.Labels["version"]; !ok {
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

@jonboulle jonboulle added this to the v0.5.0 milestone Mar 11, 2015
@philips
Copy link
Contributor

philips commented Mar 11, 2015

lgtm

jonboulle added a commit that referenced this pull request Mar 12, 2015
cas: Introduce latest pattern handling for image fetching.
@jonboulle jonboulle merged commit 08a1b08 into rkt:master Mar 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants