-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
remove systemd::escape
usage for timer_wrapper
#452
Conversation
Question is, is this considered breaking? |
mhm this is probably a breaking change to some users. Should we remove it or should we document that some characters can cause strange unit names? |
I'd still vote for getting rid of the Another possible way: add a new parameter to force a specific name without this behavior? |
systemd::escpae
usage for timer_wrappersystemd::escape
usage for timer_wrapper
The 7.0.0 major release is still pending #447 so we could get it in there .... |
I think this make sense. As a backwards-incompatible change we should indicate explicitly how users can check if they are affected and what they need to do in the first comment of the PR |
I'd also agree that there shouldn't be any automatic escaping. It's very confusing and it makes it hard for other tools which rely on predictable unit names. |
If we're cleaning up unit files created with the escaped name and adding a new one, will this still count as a breaking change? Something like: $unit_name_escaped = systemd::escape($title)
systemd::manage_unit { "${unit_name_escaped}.service":
ensure => absent,
}
systemd::manage_unit { "${unit_name_escaped}.timer":
ensure => absent,
}
systemd::manage_unit { "${title}.service":
...
}
systemd::manage_unit { "${title}.timer":
...
} Edit: maybe this needs some condition, e.g. |
As this feature is quite new, I don't expect a wide usage of it yet. I would like to avoid more complexity here and keep it as is. We have a major release with multiple breaking changes lined up anyway. |
@TheMeier Maybe we should give an example on how to clean it up in the changelog? Something like this should be working:
|
I have updated the MR description |
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.
And much simpler - the point about expectation is super valid.
systemd::escape
usage for timer_wrappersystemd::escape
usage for timer_wrapper
@traylenator can you include that in #447? |
Pull Request (PR) description
Don't treat unit names with
systemd::escape
. If you havesystemd::timer_wrapper
instances with names that contain special characters like slashes and umlauts this will result in a validation error. In such cases you can produce the previous behaviour by usingsystemd::escape yourself
for example:It is possible that this change will create duplicate resources in case the resource name was escaped but the unescaped name is also valid. In those cases make sure to remove the duplicate, e.g. like so:
This Pull Request (PR) fixes the following issues
Fixes #451