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

Podman CLI --add-host with multiple host for a single IP #23802

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

jerome59
Copy link
Contributor

Hello,

Fixes #23770

I didn't update any tests because I don't know which one I should update and how to update them without breaking them.
It would be nice if someone creates the tests for me or give me some explanation on where and how I can create a test case.

Does this PR introduce a user-facing change?

--add-host option now supports multiple hostnames

@jerome59 jerome59 marked this pull request as draft August 29, 2024 08:28
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 29, 2024
@@ -252,7 +253,8 @@ func parseExtraHosts(extraHosts []string, hostContainersInternalIP string) (Host
}
ip = hostContainersInternalIP
}
e := HostEntry{IP: ip, Names: []string{values[0]}}
Copy link
Member

Choose a reason for hiding this comment

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

you cannot change vendor code directly, this must be first submitted as PR in /~https://github.com/containers/common then we can update the dependency here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I've seen that, that's why I just opened this PR : containers/common#2139

So on this repository, I should just remove my changes from hosts.go ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the PR has been merged, how do we proceed to include a version of the common library into this code ?
I've seen that it is defined there /~https://github.com/containers/podman/blob/main/go.mod#L16 and /~https://github.com/containers/podman/blob/main/vendor/modules.txt#L174

I guess someone from the core team has to create a new tag 0.60.3 and includes the commit in it and then we can refer to it in the previous files

Copy link
Member

Choose a reason for hiding this comment

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

I let you know once we updated it in podman, likely sometime next week. We generally vendor based of the main branch during development so we do not need a new tag there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @Luap99, any news on the previous point ?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry I was on PTO so I forget to update you here. Yes, you can rebase the change is vendored now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I'm missing something here :

I don't see any new release of the common lib : /~https://github.com/containers/common/releases
And the dependency seems to still be defined in 0.60.1 : /~https://github.com/containers/podman/blob/main/go.mod#L16

Copy link
Member

Choose a reason for hiding this comment

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

We vendor by commit during dev time on main, we only cut releases of the libs when we cut a new podman.
For example b9fe409.
You can check in the vendor/ directory your changes are in there.

Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

Signed-off-by: Jerome degroote <jeromedu59230@gmx.fr>
@jerome59 jerome59 marked this pull request as ready for review September 17, 2024 08:25
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 17, 2024
@jerome59 jerome59 requested a review from Luap99 September 17, 2024 08:25
@jerome59
Copy link
Contributor Author

I've rebased + added some tests so I guess the PR is now ready for review

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Sep 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerome59, Luap99

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 Sep 17, 2024
@rhatdan
Copy link
Member

rhatdan commented Sep 17, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 17, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 3f0483f into containers:main Sep 17, 2024
80 checks passed
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Dec 17, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Dec 17, 2024
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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman CLI --add-host with multiple host for a single IP
3 participants