Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Parse prefixed Capability values #2418

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Sigmonia
Copy link

@Sigmonia Sigmonia commented Apr 4, 2025

Parse "CAP_" prefixed capability values. The most recent docker version has the normalized values for CapAdd/CapDrop prefixed. This results in the inspection response json failing to parse.

#1980
#2365

@Sigmonia Sigmonia requested a review from a team as a code owner April 4, 2025 01:36
@riebecj
Copy link

riebecj commented Apr 14, 2025

Could you add

Capability compatibleCapability = JSONTestHelper.getMapper().readValue("\"CAP_ALL\"", Capability.class);
assertEquals(Capability.ALL, compatibleCapability);

to deserializeCapability() in docker-java/src/test/java/com/github/dockerjava/api/model/CapabilityTest.java to check for future regressions?

@Sigmonia
Copy link
Author

Test added.

@riebecj
Copy link

riebecj commented Apr 15, 2025

@eddumelendez , Could you or one of the team review? I have a pending PR I want to submit that is dependant on this that implements #1980

@yaohwu
Copy link

yaohwu commented Apr 18, 2025

Looking forward to this PR being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants