-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run by shortname #182
Run by shortname #182
Conversation
libpod/runtime_img.go
Outdated
@@ -370,8 +370,7 @@ func (k *Image) GetLocalImageName() (string, error) { | |||
} | |||
} | |||
} | |||
fqname, _ := k.GetFQName() | |||
return fqname, nil | |||
return "", nil |
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.
Should this be an error?
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.
fixed
The ways it is being used, an empty string means it didn't find the image locally so this is correct I believe. |
The function says it should return an error in that case - can you return ErrNoSuchImage and check for that as an indication it's not present locally? |
sorry, i misread the question ... yes it should return an error ... fixed now. |
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.
LGTM and happy green tests.
LGTM |
libpod/runtime_img.go
Outdated
@@ -370,8 +370,7 @@ func (k *Image) GetLocalImageName() (string, error) { | |||
} | |||
} | |||
} | |||
fqname, _ := k.GetFQName() | |||
return fqname, nil | |||
return "", errors.Errorf("unable to find image locally") |
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.
Should we return
errors.Wrapf(storage.ErrImageUnknown, "unable to find image locally")
Also you should probably be consistent on the error message. Above you obtain, here you find. I think we should just stick to find.
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.
done on both
While pulling by shortname (fedora-minimal) worked, running a container by the short name did not due to a logic error. Signed-off-by: baude <[email protected]>
📌 Commit bd8bdaf has been approved by |
⚡ Test exempted: merge already tested. |
- run --userns=keep-id: confirm that $HOME gets set (containers#8013) - inspect: confirm that JSON output is a sane number of lines (10 or more), not an unreadable one-liner (containers#8011 and containers#8021). Do so with image, pod, network, volume because the code paths might be different. - cgroups: confirm that 'run' preserves cgroup manager (containers#7970) - sdnotify: reenable tests, and hope CI doesn't hang. This test was disabled on August 18 because CI jobs were hanging and timing out. My suspicion was that it was containers#7316, which in turn seems to have hinged on conmon containers#182. The latter was merged on Sep 16, so let's cross our fingers and see what happens. Also: remove inaccurate warning from a networking test. And, wow, fix is_cgroupsv2(), it has never actually worked. Signed-off-by: Ed Santiago <[email protected]>
While pulling by shortname (fedora-minimal) worked, running a container
by the short name did not due to a logic error.
Signed-off-by: baude [email protected]