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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributes: Rename 'default' option #3756

Closed
clintoncwolfe opened this issue Jan 25, 2019 · 0 comments 路 Fixed by #3759
Closed

Attributes: Rename 'default' option #3756

clintoncwolfe opened this issue Jan 25, 2019 · 0 comments 路 Fixed by #3759
Labels
Aspect: UI-UX Component: Inputs Parameter Input system (formerly attributes) Type: Deprecation Removal of existing features

Comments

@clintoncwolfe
Copy link
Contributor

馃帥 Description

Currently, to set the value of an attribute in control code, you say:

attribute('user', default: 'bob')

Likewise, in the metadata file, if you set a value, you use:

attributes:
  user:
    default: bob

In addition, in control code, we have the value= method...

attribute('user').value = 'susan'

This sets up a scenario where it might imply that there is some kind of precedence going on, like the Chef Client's default/normal/override/automatic. That has been a major source of confusion in the chef community, which we'd like to avoid.

Moving forward, we want to be clear that while there may be multiple sources for an attribute's value (--attrs, metadata, inline in code) the precedence is entirely determined by the source, not by some additional precedence level dimension.

馃實 InSpec and Platform Version

v3.2.x

馃拋 Possible Solutions

Introduce 'value' as the only accepted option. Deprecate 'default' over the next two major versions.

Refs #3748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: UI-UX Component: Inputs Parameter Input system (formerly attributes) Type: Deprecation Removal of existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants