Skip to content

Conversation

@pygillier
Copy link

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.

@bdangit
Copy link
Owner

bdangit commented Jan 7, 2019

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

@bdangit
Copy link
Owner

bdangit commented Sep 1, 2019

hi @pygillier can run chef exec "rake test:quick"? it should show any lints and styling that is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants