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

Change attributes attribute to inputs #360

Open
clintoncwolfe opened this issue Feb 26, 2019 · 2 comments · May be fixed by #401
Open

Change attributes attribute to inputs #360

clintoncwolfe opened this issue Feb 26, 2019 · 2 comments · May be fixed by #401
Assignees
Labels
Aspect: Integration Works correctly with other projects or systems. Type: Breaking Change Changes the way existing features work in a way that affects users.

Comments

@clintoncwolfe
Copy link
Contributor

Cookbook version

7.4.0, current, proposing to change the name in 8.0

Chef-client version

any

Platform Details

n/a

Scenario:

InSpec Attributes have long been a source of confusion, because people assume they are closely related to Chef Attributes (they aren't). So, on inspec/inspec#3802, we're renaming InSpec Attributes to InSpec Inputs.

That means that the way you pass things into InSpec should be renamed - the Chef Attribute default['audit']['attributes'] should be renamed to the Chef Attribute default['audit']['inputs'].

It will still expect a Hash (mapping input names to input values), and you can still get values for that Hash from anywhere you like, including Chef Attributes (we hope to have a more direct way of doing that soon - stay tuned!).

Refs #261
Attn @btm

@clintoncwolfe clintoncwolfe added Aspect: Integration Works correctly with other projects or systems. Type: Breaking Change Changes the way existing features work in a way that affects users. labels Feb 26, 2019
@welcomebot
Copy link

Hey There
It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you.
Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

@apple-sauce
Copy link

With this bug, is the error below what's expected? Just wondering if my bug is the same as what the issue was created for.

Running handlers:
[2020-02-28T10:25:08-08:00] WARN: DEPRECATION: InSpec Attributes are being renamed to InSpec Inputs to avoid confusion w
ith Chef Attributes. Use :inputs in your kitchen.yml verifier config instead of :attributes.

  • Chef::Handler::AuditReport

I changed my code in the policyfile from:
default['Policygroup']['audit']['reporter'] = 'chef-server-automate'
To: default['Policygroup']['audit']['inputs'] = { 'reporter': 'chef-server-automate' }

As well as changed my kitchen.yml to use inputs (see below) but still get the error above.
verifier:
inspec_tests:
- test/integration/default
inputs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: Integration Works correctly with other projects or systems. Type: Breaking Change Changes the way existing features work in a way that affects users.
Development

Successfully merging a pull request may close this issue.

4 participants