-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor podman system connection #6938
Refactor podman system connection #6938
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jwhonce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@rhatdan wdyt? |
I don't see the reason for rename, I would just tell them to edit the file. Or Remove and re-add. |
1699d6d
to
42934a8
Compare
42934a8
to
a505c38
Compare
Blocked on #7000 |
#7000 merged. |
a505c38
to
7fa8c87
Compare
d9b8729
to
1c95f1b
Compare
Ouch - I see the reason for the test failure now. As it is now, this command breaks precedent because it is the only Super-unfortunately, this is nonintuitive because the $ podman something --help
Usage:
podman something [command] One way around this is to special-case the Another way, which I lean toward, is to add |
I like the idea of ls |
cf30df2
to
be827fe
Compare
* Add support to manage multiple connections * Add connection * Remove connection * Rename connection * Set connection as default * Add markdown/man pages * Fix recursion in hack/xref-helpmsgs-manpages Signed-off-by: Jhon Honce <[email protected]>
be827fe
to
964d330
Compare
lFlags.BoolVarP(&opts.Remote, "remote", "r", false, "Access remote Podman service (default false)") | ||
lFlags.StringVar(&opts.URI, "url", defaultURI, "URL to access Podman service (CONTAINER_HOST)") | ||
lFlags.StringVar(&opts.Identity, "identity", custom.Engine.RemoteIdentity, "path to SSH identity file, (CONTAINER_SSHKEY)") | ||
lFlags.StringVar(&opts.URI, "url", uri, "URL to access Podman service (CONTAINER_HOST)") |
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'm feeling pretty squicked out by the interchange of URI and URL. I think that will lead to maintenance headaches. From my (limited) understanding, I believe URL (l as in Lima) is the correct term. Would you consider replacing the code instances of uri
(i as India) to url
for consistency?
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.
Yes let's stick with URL
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.
uri was chosen for a reason. url is a golang package name. There is a lot of code that uses the url package to process the "uri" variable. We would be forced to alias the package name or make up longer names which I deemed to be a large maintenance headache. I attempt to use uri for internals and URL for user facing so everyone is happy.
As a url is a uri this naming simplifies the coding and is correct naming.
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.
Would calling it path
be a good compromise? It's less specific as to what exact type of path it is, and only one character longer.
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.
@mheon Path is an element of the url/uri, so that would be confusing to see path.Path.
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 we call everything URI and drop URL, if we want to still support the --url for backwards compatibility just make it an alias.
LGTM |
/lgtm |
Signed-off-by: Jhon Honce [email protected]