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

Remove ActiveDestination method to move into podman #1640

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

cgiradkar
Copy link
Contributor

@cgiradkar cgiradkar commented Sep 6, 2023

The method ActiveDestination was being used only by Podman and there seemed to code complications as the code is split in multiple parts. Hence, moved the code to Podman to make it more readable and efficient.

relates to: #15588

Signed-off-by: Chetan Giradkar cgiradka@redhat.com

@rhatdan
Copy link
Member

rhatdan commented Sep 6, 2023

LGTM
/approve
@giuseppe @vrothberg @ashley-cui @baude PTAL

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 label Sep 6, 2023
pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Going one step back:

Should we consider to ignore the existence of these environment variables here entirely? I feel using them here AND over in Podman is just making the logic more complicated than it needs to.

The function here returns whatever Podman asks for. What Podman asks for is up to Podman code to decide. I may be missing something important. @ashley-cui @rhatdan @cgiradkar what do you think?

@cgiradkar
Copy link
Contributor Author

cgiradkar commented Sep 7, 2023

Going one step back:

Should we consider to ignore the existence of these environment variables here entirely? I feel using them here AND over in Podman is just making the logic more complicated than it needs to.

The function here returns whatever Podman asks for. What Podman asks for is up to Podman code to decide. I may be missing something important. @ashley-cui @rhatdan @cgiradkar what do you think?

Computationally it should not make any difference but it may lead to better code readability. Additionally if the method ActiveDestination is only getting used in Podman repo, then, I think, we can move the logic to Podman.

@cgiradkar cgiradkar force-pushed the Issue-15588 branch 2 times, most recently from 44fb7a0 to c98bdcf Compare September 8, 2023 10:50
pkg/config/config.go Outdated Show resolved Hide resolved
Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Sep 9, 2023

/lgtm
/hold
thanks @cgiradkar

@cgiradkar
Copy link
Contributor Author

@rhatdan can you please re-approve? I pushed a small linter change.

pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config_test.go Outdated Show resolved Hide resolved
@rhatdan
Copy link
Member

rhatdan commented Sep 13, 2023

Please clean this up, we want to get this merged before we cut the release.

@rhatdan rhatdan added the 4.7 label Sep 13, 2023
@Luap99
Copy link
Member

Luap99 commented Sep 13, 2023

Please clean this up, we want to get this merged before we cut the release.

I see no reason to declare this as blocker.

@rhatdan
Copy link
Member

rhatdan commented Sep 13, 2023

No it is not a blocker, but does fix a Bug that would be nice to get fixed before the release. When I mark something as 4.7 it is not a blocker, but something that we should consider for 4.7.

The method ActiveDestination was being used only by Podman and there seemed to code complications as the code is split in multiple parts. Hence, moved the code to Podman to make it more readable and efficient.

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
@cgiradkar cgiradkar changed the title Change precedence of connection flag wrt CONTAINER_HOST env variable Remove ActiveDestination method to move into podman Sep 20, 2023
@cgiradkar
Copy link
Contributor Author

The method ActiveDestination was being used only by Podman and there seemed to code complications as the code is split in multiple parts. Hence, moved the code to Podman to make it more readable and efficient.

@rhatdan
Copy link
Member

rhatdan commented Sep 20, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 20, 2023
@rhatdan
Copy link
Member

rhatdan commented Sep 20, 2023

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 9f7764e into containers:main Sep 20, 2023
6 checks passed
@vrothberg
Copy link
Member

vrothberg commented Sep 21, 2023

This commit won't compile in Podman anymore. Please open a PR against Podman ASAP to clean things up.

@cgiradkar
Copy link
Contributor Author

Opened a PR #20084 in podman, waiting for CI to do its magic.

@cgiradkar cgiradkar deleted the Issue-15588 branch November 20, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants