-
Notifications
You must be signed in to change notification settings - Fork 99
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
Allow passing labels to volumes #140
Allow passing labels to volumes #140
Conversation
Signed-off-by: Jankowiak Szymon-PRFJ46 <[email protected]>
/assign @mwhahaha |
/assign @TomSweeneyRedHat |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: msisj, mwhahaha 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 |
@msisj can you add a test for this? |
My brain isn't parsing why your change changed the behavior here. Definitely want @jwhonce to take a looksee here. |
Input attribute for the volume create call is "Label" not "Labels" per the docs https://docs.podman.io/en/latest/_static/api.html#operation/VolumeCreateLibpod |
It looks to be a discrepancy between the compat and libpod volumes api libpod has input.Label compat as input.Labels |
We should fix this in Podman to support Labels and Label in libpod mode and only document Labels. |
@rhatdan Sounds good. /lgtm |
As of Podman 4.0 and with containers/podman#12133 podman now takes either key. We can merge this now and then revert in future. |
wfm |
Since containers/podman#12133 has merged, I think we can close this PR and thank @msisj for their work here. |
Yes I would rather get another Podman release out. |
I would highlight that unless you plan on backporting that fix in podman, this means podman-py can't be used with podman 3.x which is less than ideal. |
Yes I am going to ask @mheon to back port and create a new podman 3.4.* release. |
Signed-off-by: Jankowiak Szymon-PRFJ46 [email protected]
Before changes :
After changes :
Tested on:
I had to modify the test case since it failed on assertion (Labels vs Label), but I'm wondering how this test even passed when it allegedly compared labels from create volume (https://github.com/containers/podman-py/blob/main/podman/tests/unit/test_volumesmanager.py#L77-L82).