chef-influxdb
chef-influxdb copied to clipboard
[Continuous query] Fix attribute naming
Under at least Chef 14, cookbook run fails when updating a CQ resource :
NameError
---------
undefined local variable or method `name' for #<#<Class:0x0000000003f915e8>:0x0000000003f53450>
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/influxdb/resources/continuous_query.rb:27:in `block in class_from_file'
By explicitely using new_resource
variable, error is fixed.
Hi @pygillier thanks for the PR. There is a styling error that rubocop detected:
export WERCKER_STEP_ROOT="/pipeline/script-3d3f9213-1cda-423f-9e23-1278e4b2e1e0"
export WERCKER_STEP_ID="script-3d3f9213-1cda-423f-9e23-1278e4b2e1e0"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-3d3f9213-1cda-423f-9e23-1278e4b2e1e0/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-3d3f9213-1cda-423f-9e23-1278e4b2e1e0/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-3d3f9213-1cda-423f-9e23-1278e4b2e1e0/artifacts"
source "/pipeline/script-3d3f9213-1cda-423f-9e23-1278e4b2e1e0/run.sh" < /dev/null
Running RuboCop...
Inspecting 27 files
...........................
27 files inspected, no offenses detected
Starting Foodcritic linting...
Checking 16 files
..........x.....
FC085: Resource using new_resource.updated_by_last_action to converge resource: /pipeline/source/resources/continuous_query.rb:25
hi @pygillier can run chef exec "rake test:quick"
? it should show any lints and styling that is required.