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

subscribes does not validate the resource spec #8908

Open
mrhopeman opened this issue Sep 20, 2019 · 1 comment

Comments

@mrhopeman
Copy link

commented Sep 20, 2019

Description

When missing a closing ] at a subscription, the subscription will be silently ignored. While notifies checks the syntax and raises an error.

Chef Version

chef-client 12.22.5 but also in master not fixed

Platform Version

Ubuntu 16.04

Replication Case

# ensure we always get a changed resource
file '/tmp/blubb' do
  action :delete
end

file '/tmp/blubb' do
  action :create
end

# subcribing resource
file '/tmp/mark' do
  action :nothing
  subscribes :create, 'file[/tmp/blubb', :immediately
end

Client Output

Recipe: (chef-apply cookbook)::(chef-apply recipe)
  * file[/tmp/blubb] action delete (up to date)
  * file[/tmp/blubb] action create
    - create new file /tmp/blubb
  * file[/tmp/mark] action nothing (skipped due to action :nothing)

/tmp/mark is not created and there is no error raised.

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2019

Think this is a dup, although I couldn't turn it up with a quick search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.