-
Notifications
You must be signed in to change notification settings - Fork 881
rkt: get name from ImageManifest #1701
rkt: get name from ImageManifest #1701
Conversation
|
Oh yeah. It even has tests. :) |
|
Good found @blixtra ! I will make the same change in the api service :) |
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.
Any particular reason for changing 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.
I changed this because earlier in the file, in getApps it was doing it this way so I want to make it perform the same task the same way. But your comment got me looking at it a bit closer and I've now removed the body of getAppCount completely and reuse getApps. Thanks!
|
LGTM except a small nit. Also it would be helpful to have something like |
1635617 to
f5e1d16
Compare
I've added a function |
rkt/pods.go
Outdated
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.
How about use a pointer *schema.ImageManifest?
Currently we are relying on an optional field in the PodManifest to get the images name and version when running `rkt list` because, since one has been able to remove referenced images, there was no guarantee that the ImageManifest in the cas would be available. However, little did we know, there is a copy of the ImageManifest of the pod in the pod's appinfo directory. This commit makes use of that. fixes rkt#1659
Adds tests for `rkt list` to insure that assumed fields are displayed.
f5e1d16 to
4fd5652
Compare
|
LGTM |
…manifest rkt: get name from ImageManifest
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.
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.
can we actually have something like getAppImageManifest to get a single image manifest?
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.
For the record, done in #1938
|
@yifan-gu I'll have a look. |
Noticed in rkt#1701 that it appeared to have gained a superfluous modifier and the docstring was out of sync with the function name
Noticed in rkt#1701 that it appeared to have gained a superfluous modifier and the docstring was out of sync with the function name
Noticed in rkt#1701 that it appeared to have gained a superfluous modifier and the docstring was out of sync with the function name
Currently we are relying on an optional field in the PodManifest to get
the images name and version when running
rkt listbecause, since onehas been able to remove referenced images, there was no guarantee that
the ImageManifest in the cas would be available.
However, little did we know, there is a copy of the ImageManifest of the
pod in the pod's appinfo directory. This commit makes use of that.
Should close #1659.