Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Run by shortname #182

wants to merge 1 commit into from

Conversation

baude
Copy link
Member

@baude baude commented Jan 3, 2018

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]

@@ -370,8 +370,7 @@ func (k *Image) GetLocalImageName() (string, error) {
}
}
}
fqname, _ := k.GetFQName()
return fqname, nil
return "", nil
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@baude
Copy link
Member Author

baude commented Jan 3, 2018

The ways it is being used, an empty string means it didn't find the image locally so this is correct I believe.

@mheon
Copy link
Member

mheon commented Jan 3, 2018

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?

@baude
Copy link
Member Author

baude commented Jan 3, 2018

sorry, i misread the question ... yes it should return an error ... fixed now.

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a 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.

@mheon
Copy link
Member

mheon commented Jan 4, 2018

LGTM

@@ -370,8 +370,7 @@ func (k *Image) GetLocalImageName() (string, error) {
}
}
}
fqname, _ := k.GetFQName()
return fqname, nil
return "", errors.Errorf("unable to find image locally")
Copy link
Member

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.

Copy link
Member Author

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]>
@rhatdan
Copy link
Member

rhatdan commented Jan 4, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit bd8bdaf has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⚡ Test exempted: merge already tested.

@baude baude deleted the run_shortname branch December 22, 2019 19:10
edsantiago added a commit to edsantiago/libpod that referenced this pull request Oct 14, 2020
 - 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]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants