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

feat: Add AddHost; Improve types #9

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

pedorich-n
Copy link
Contributor

No description provided.

default = [ ];
example = ["hostname:192.168.10.11"];
description = "--add-host";
property = "AddHost";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Support for AddHost was added in containers/podman#23713

It's available since Podman v5.3.1. The current version in the 24.11 channel is 5.2.3. This makes me wonder if it's worth adding a warning if the version is less than 5.3.1.
But this creates a maintaining burden, to keep track of all the podman versions... 🤔

Copy link
Owner

Choose a reason for hiding this comment

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

LGTM given the default value is safe.

There are too many ways the config could be bad and surely we can't catch all. Thus I don't see this project should be responsible for config check beyond what's trivial to do.

@@ -87,7 +95,7 @@ let
};

environments = quadletUtils.mkOption {
type = types.attrs;
type = types.attrsOf types.str;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might break existing configuration for some users, but IMO it's worth enforcing the str, since toString is unreliable. For example toString with boolean produces "" for false and "1" for true. 🤯
image

Copy link
Owner

Choose a reason for hiding this comment

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

Good catch!

TIL 🤯.

@@ -87,7 +95,7 @@ let
};

environments = quadletUtils.mkOption {
type = types.attrs;
type = types.attrsOf types.str;
Copy link
Owner

Choose a reason for hiding this comment

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

Good catch!

TIL 🤯.

default = [ ];
example = ["hostname:192.168.10.11"];
description = "--add-host";
property = "AddHost";
Copy link
Owner

Choose a reason for hiding this comment

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

LGTM given the default value is safe.

There are too many ways the config could be bad and surely we can't catch all. Thus I don't see this project should be responsible for config check beyond what's trivial to do.

@SEIAROTg SEIAROTg merged commit 495fc0b into SEIAROTg:main Dec 3, 2024
2 checks passed
@pedorich-n pedorich-n deleted the cleanup-improvements branch December 3, 2024 22:55
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.

2 participants