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

systemd::timer: fix before's argument to use the proper syntax #315

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

simondeziel
Copy link
Contributor

I was reading the code and vim wouldn't highlight that line properly...

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Oh, good catch. I wonder if Unit_File is every really valid. If not, perhaps it's a lint rule or even syntax rule that could catch this.

What I'm also surprised about is that the unit tests didn't catch this. We have it covered here:

expect(subject).to contain_systemd__unit_file('foobar.service').with(
content: "[Service]\nExecStart=/bin/touch /tmp/foobar"
).that_comes_before('Systemd::Unit_file[foobar.timer]')

@ekohl ekohl added the bug Something isn't working label Jan 30, 2023
@simondeziel
Copy link
Contributor Author

What I'm also surprised about is that the unit tests didn't catch this.

I'm not up to date on how Puppet (and rspec) evaluates manifests theses days. I vaguely remember that at some point it stopped doing a random order to switch to the more natural top to bottom order. But maybe I am misremembering.

@jhoblitt
Copy link
Member

jhoblitt commented Jan 30, 2023

Yikes. We obviously have an acceptance test coverage problem.

@jhoblitt jhoblitt merged commit fd0dd76 into voxpupuli:master Jan 30, 2023
@simondeziel simondeziel deleted the fix-typo branch January 30, 2023 20:19
@jhoblitt
Copy link
Member

The fixed will be included in the #317 release.

@ekohl
Copy link
Member

ekohl commented Jan 31, 2023

I recall that Puppet was case insensitive about some of these matters (pretty sure that was true for type aliases), but then not all tooling understands that. So it may be valid, but not the preferred style. Personally I think there should just be a single valid style and enforce that

@alexjfisher
Copy link
Member

I'm not up to date on how Puppet (and rspec) evaluates manifests theses days. I vaguely remember that at some point it stopped doing a random order to switch to the more natural top to bottom order. But maybe I am misremembering.

The ordering parameter was removed in Puppet 6.0 and is now always top to bottom unless there's explicit ordering. That said, I'm fairly certain the implementation doesn't create actual relationships in the resource graph, so rspec puppet wouldn't see these. I'm guessing it's just a case insensitivity thing in Puppet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants