-
Notifications
You must be signed in to change notification settings - Fork 96
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
Use new json connections file #374
Conversation
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.
One nit, a second test which verifies precedence on a duplicated connection name would be nice to have.
89bfff5
to
35b3643
Compare
51aec2f
to
bc2d540
Compare
Podman has updated where it will store its system connection information to a new json format file. Add support to podman-py to read from both the new json file and old toml file giving preference to the new json file. Signed-off-by: Urvashi Mohnani <[email protected]>
Signed-off-by: Urvashi Mohnani <[email protected]>
Tests are green! @jwhonce PTAL |
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jwhonce, umohnani8 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 |
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.
A couple of notes:
This is not honouring CONTAINERS_CONF or CONTAINERS_CONF or PODMAN_CONNECTIONS_CONF env overwrites.
It does not support reading containers.conf.d
I am not saying these have to be fixed here but I wanted to list it. I am fine to leave them unfixed until a user complains.
# this elif is only for testing purposes | ||
elif "@@is_test@@" in path: | ||
test_path = path.replace("@@is_test@@", '') | ||
self.path = Path(test_path) / "podman-connections.json" | ||
old_toml_file = Path(test_path) / "containers.conf" |
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.
this sounds like an ugly hack but I am not a python programmer so I don't really care if this is the right thing to solve it.
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 agree, I really dislike it too but I tried everything with the mock Env options but it just wouldn't pick up the env I was setting for XDG_CONFIG_HOME
.
I can look into it further and open a PR in the future if I can figure it out.
Agreed, I think it might be best to call |
Let's see if I have some power here |
Podman has updated where it will store its
system connection information to a new json
format file.
Add support to podman-py to read from both the
new json file and old toml file giving preference
to the new json file.