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

docker inspect: add support for swarm configs #5573

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

thaJeztah
Copy link
Member

The docker inspect command did not inspect configs. This patch adds support for it, and while at it, also sorts the list of objects in runInspect.

Before this patch:

docker config create myconfig ./codecov.yml
danpeyh8qzb30vgdj9fr665l1

docker inspect --format='{{.ID}}' myconfig
[]
Error: No such object: myconfig

docker inspect --format='{{.ID}}' --type=config myconfig
"config" is not a valid value for --type

With this patch:

docker inspect --format='{{.ID}}' myconfig
danpeyh8qzb30vgdj9fr665l1

docker inspect --format='{{.ID}}' --type=config myconfig
danpeyh8qzb30vgdj9fr665l1

- What I did

- How I did it

- How to verify it

- Description for the changelog

docker inspect now also allows inspecting swarm configs

- A picture of a cute animal (not mandatory but encouraged)

The docker inspect command did not inspect configs. This patch adds support for
it, and while at it, also sorts the list of objects in runInspect.

Before this patch:

    docker config create myconfig ./codecov.yml
    danpeyh8qzb30vgdj9fr665l1

    docker inspect --format='{{.ID}}' myconfig
    []
    Error: No such object: myconfig

    docker inspect --format='{{.ID}}' --type=config myconfig
    "config" is not a valid value for --type

With this patch:

    docker inspect --format='{{.ID}}' myconfig
    danpeyh8qzb30vgdj9fr665l1

    docker inspect --format='{{.ID}}' --type=config myconfig
    danpeyh8qzb30vgdj9fr665l1

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 59.60%. Comparing base (61baf2a) to head (e9ae9f7).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5573      +/-   ##
==========================================
+ Coverage   59.21%   59.60%   +0.38%     
==========================================
  Files         342      345       +3     
  Lines       29083    29103      +20     
==========================================
+ Hits        17222    17346     +124     
+ Misses      10889    10788     -101     
+ Partials      972      969       -3     

@thaJeztah thaJeztah requested a review from a team October 24, 2024 16:48
@thaJeztah thaJeztah merged commit 32ff200 into docker:master Oct 25, 2024
107 checks passed
@thaJeztah thaJeztah deleted the inspect_add_configs branch October 25, 2024 15:38
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.

3 participants