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

Adding dial-stdio CLI cmd #11819

Merged
merged 1 commit into from
Oct 11, 2021
Merged

Conversation

trynaeat
Copy link
Contributor

Signed-off-by: Jake Parks jamesparks10@gmail.com

What this PR does / why we need it:

Fixes #11668

How to verify it

Which issue(s) this PR fixes:

Fixes #11668

Special notes for your reviewer:

@rhatdan
Copy link
Member

rhatdan commented Oct 1, 2021

You have to add tests, if possible otherwise add [no tests needed]

Copy link
Member

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

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

ctx := registry.Context()
ctx, cancel := context.WithCancel(ctx)
defer cancel()
bindCtx, err := bindings.NewConnection(ctx, "unix:///var/run/docker.sock")
Copy link
Member

Choose a reason for hiding this comment

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

Is this configurable at all?

Copy link
Member

Choose a reason for hiding this comment

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

we should default to same as the podman remote connection, so unix:///run/podman/podman.sock and unix:///run/user/<UID>/podman/podman.sock as rootless
if they run a podman command we should talk to the podman socket and not docker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I've updated it to grab the URI from the config which handles it as you say (unix:///run/podman/podman.sock for root, unix:///run/user//podman/podman.sock for rootless by default)

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 1, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, trynaeat

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 1, 2021
@trynaeat trynaeat changed the title WIP: Adding dial-stdio CLI cmd Adding dial-stdio CLI cmd Oct 1, 2021
@rhatdan
Copy link
Member

rhatdan commented Oct 1, 2021

LGTM

@TomSweeneyRedHat
Copy link
Member

All kinds of test unhappiness @trynaeat

@trynaeat trynaeat force-pushed the dial-stdio branch 2 times, most recently from 3bee687 to 2b84e6f Compare October 4, 2021 19:50
@trynaeat
Copy link
Contributor Author

trynaeat commented Oct 5, 2021

Fixed the failing integration tests on my part. Any insight into the last failing CI job, @rhatdan ? Some kind of error from the package manager before it even gets to the test job.

}

// Below portion taken from original docker CLI
// https://github.com/docker/cli/blob/master/cli/command/system/dial_stdio.go
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to use permalink

i.e., s/master/v20.10.9/

@Luap99
Copy link
Member

Luap99 commented Oct 6, 2021

Fixed the failing integration tests on my part. Any insight into the last failing CI job, @rhatdan ? Some kind of error from the package manager before it even gets to the test job.

You have to rebase to the latest main branch to fix this test.

Adding dial-stdio CLI cmd

Signed-off-by: Jake Parks <jamesparks10@gmail.com>

Made dial-stdio URI configurable

Slight refactors

Signed-off-by: Jake Parks <jamesparks10@gmail.com>

Added simple test for existence of `podman system dial-stdio` command

Fix 'system dial-stdio' integration tests

Changed link in comment to permalink
@jwhonce
Copy link
Member

jwhonce commented Oct 11, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2021
@openshift-merge-robot openshift-merge-robot merged commit b1a2657 into containers:main Oct 11, 2021
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. 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.

Compatability with docker client
7 participants