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

(PUP-11937) Skip autorequire if exec's param is deferred and lazily evaluated #9152

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

joshcooper
Copy link
Contributor

If an exec's 'command' parameter is deferred and lazily evaluated, then we can't autorequire the file that the command will execute. This is because we won't know what the command is until the exec is evaluated. But that means it's already too late to add a relationship from the file resource to the exec resource. In this situation and explicit relationship is required to ensure the file resource is evaluated before the exec. The same is true for the 'onlyif' and 'unless' exec parameters.

…valuated

If an exec's 'command' parameter is deferred and lazily evaluated, then we can't
autorequire the file that the command will execute. This is because we won't
know what the command will be until the exec is evaluated. But that means it's
already too late to add a relationship from the file resource to the exec
resource. In this situation an explicit relationship must be added to ensure
the file resource is evaluated before the exec. The same is true for the
'onlyif' and 'unless' exec parameters.
@joshcooper joshcooper requested a review from a team as a code owner November 14, 2023 18:45
@joshcooper joshcooper added the bug Something isn't working label Nov 15, 2023
@cthorn42 cthorn42 merged commit 810bf8e into puppetlabs:7.x Nov 15, 2023
12 checks passed
@joshcooper joshcooper deleted the exec_command_defer_11937 branch November 15, 2023 18:15
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.

None yet

2 participants