Skip to content

Conversation

@robmry
Copy link
Contributor

@robmry robmry commented Jul 16, 2025

- What I did

If the daemon returns FirewallBackend in its Info response, include it in the output.

- How I did it

- How to verify it

Updated unit tests, see golden output.

Also tested locally against a current daemon, with and without firewalld, and against a 27.5.1 daemon that doesn't report FirewallBackend.

- Human readable description for the release notes

- For Linux, `docker info` now reports the firewall backend if available.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Comment on lines +132 to +134
Info: [][2]string{
{"ReloadedAt", "2025-07-16T16:59:14Z"},
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I missed when we added this, but was there a specific reason for choosing [][2]string instead of map[string]string?

Copy link
Member

Choose a reason for hiding this comment

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

This was the same format as we used for "driver info" (storage drivers); mostly to keep it consistent with that, and to provide a format that's not a formal contract for the API ("anything / any key/value pair goes!"), but in a format that can still be parsed for those wanting to.

Copy link
Contributor Author

@robmry robmry Jul 17, 2025

Choose a reason for hiding this comment

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

It followed a long discussion in Slack ... but the very short summary is we didn't want to use a map because, although it avoids duplicate keys, the ordering would change in CLI output when iterating, so @thaJeztah suggested it should be like this DriverStatus field.

Copy link
Member

Choose a reason for hiding this comment

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

A map[string]string probably would've been fine as well, but this was consistent with the other one. (Besides the maps and randomising order - perhaps we should look at a sorted map for some of these)

Copy link
Member

Choose a reason for hiding this comment

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

Ah, Jinx! 😂 ❤️

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, that makes sense now, thanks for the context!

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 74042f5 into docker:master Jul 17, 2025
116 of 118 checks passed
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.

5 participants