| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This will provide callers (such as event dispatch handlers)
with a means to capture node data that has been filtered based
on attribute whitelist/blacklist rules.
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
|
|
|
|
|
|
|
| |
This adds a new AttributeWhitelistConfiguration deprecation
so that we don't report use of whitelist as blacklist.
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
This is an overdue change. These are not terms we should be using as a company or community. To quote our Code of Conduct (https://community.chef.io/code-of-conduct/). "Be careful in the words that you choose. Be kind to others. Practice empathy." This change aims to do exactly that, while maintaining a level of backwards compatibility so we can transition existing users off the legacy configs.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
| |
The consumption of ohai attributes by the ohai segment plugin code
was breaking this feature.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
Legally incredibly dubious, particularly since we don't follow it
strictly as policy, and we have git history instead, which does it right.
This is just a waste of time and a cargo cult.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
| |
`node[:platform_version] =~ "~> 1.2"` will now just work.
This might conceivably be breaking if people are doing really weird
things by the class changing (Chef::VersionString still inherits from
String though, so it'll have to be weirdness on par with the bad
`thing.class.to_s == "Mash"` kind of comparisons that were in ohai).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
closes #8817
Note that if any calling code winds up seeing this error message:
```
NoMethodError: undefined method `set_cookbook_attribute' for nil:NilClass
```
That means that the cookbook_collection was set before the node was
set on the run_context. That wouldn't be a bug in core chef, that must
be fixed in the caller to reverse the order of operations.
Since I only made the positional arguments to the run_context constructor
optional in Chef-15.0 though I don't expect this breaks any existing code
written in the past month or two, but if anything crops up in the future,
consider this a definitive statement that the caller must reverse the
order of their operations and this error being thrown is a feature not
a bug to be fixed.
(The fact that we silently aborted rather than threw a NoMethodError on
NilClass meant that we shipped this defect -- sometimes defensive
programming can be overly defensive and swallow real errors).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have four different versions of this now, and this converts to
just using the one convention in `lib/chef/constants.rb`
Interestingly `Chef::NIL_ARGUMENT` is used nowhere in the codebase, that
probably got refactored out in 12.5.1.
Node objects still use `NIL` but that is a different kind of `Object.new`
which really is semantically private to the implementation of
attributes.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Layout/MultilineMethodCallBraceLayout
- Layout/ClosingParenthesisIndentation
- Layout/IndentFirstArgument
EnforcedStyle: consistent
- Layout/BlockEndNewline
the first of these autocorrected to horrible looking code which exposed
that we really needed the other three as well, which also cleaned up a
bunch of other terrible looking code.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
enforce pretzels.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
convert kind_of? to is_a?
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is using:
Layout/AlignArguments:
Enabled: true
EnforcedStyle: with_fixed_indentation
the default style can use really excessive whitespace. on starting
lines which are already long, it fully indents across to where the
arguments start and then begins the line there.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
| |
Stops the kernel from scanning through all the activated gems every time in order
to resolve names into pathnames.
See rubygems/rubygems#2762
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
This gives a speed boost since rubygems does not have to scan through
every gem in the gemset in order to find the file.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
looks like these have been broken for some time, the tests were only
testing automatic level (which has no "combined" hash version) and
the specs were injecting a plain old hash, so were failing to catch
this error on multiple different levels.
since the automatic level worked and since mostly people use automatic
blacklisting to remove junk from ohai it was very uncommon to hit
this bug.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this was not possible. Now you can do this:
```
chef-client -o "" ./foo.rb
```
And it will only run foo.rb and not any of the recipes in your
run_list at all. Node will not be saved at the end.
Useful to one-shot something like keyrotation (which still needs
keys and needs to talk to the chef server API, so this is a
different use case from simple chef-apply).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
See the PR for details on this change.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
includes backcompat for 2.5
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the
floor of that gem is bumped up.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
| |
This means it understands nested roles, avoiding a common footgun.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
|\
| |
| | |
Save the node's UUID as an attribute
|
| |
| |
| |
| |
| |
| |
| | |
We generate the UUID as part of the data collector report, but we didn't
make that available to the node or the chef server otherwise.
Signed-off-by: Thom May <thom@chef.io>
|
|/
|
|
|
|
| |
meaning that we can have inheritable metadata
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
|
|
|
| |
We also now set chef_environment the same as policy group when that's
appropriate
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
|
|
| |
been deprecated since late-12.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
This adds a new phase in the compilation of the run context.
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
| |
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
| |
Signed-off-by: Robert Mullins <rmullins@secureworks.com>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
This adds URLs to each class of deprecation, and correctly prints and
formats them for maximum user efficiency. We also provide the URL to the
data collector for Visibility to ingest.
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
| |
- fixes *_unless behavior and set_unless_value_present hack from Chef 12
- simplifies rm_* code
- introduces functional read/write/unlink/exist? API
- deprecates method_missing access to attributes for Chef 13
- deprecates set/set_unless aliases for Chef 14
- removes MultiMash mess that I wrote for Chef 13
https://github.com/chef/chef/pull/5029 for more details
|
|
|
|
| |
this is for DSL methods that get mixed in everywhere.
|
|
|
|
| |
no enforced trailing comma on arguments...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
252 Style/TrailingCommaInLiteral
84 Style/TrailingCommaInArguments
15 Style/SpaceAroundKeyword
--
351 Total
We already dealt with SpaceAroundKeyword under its old name
SpaceBeforeModifierKeyword, it looks like it got stricter about
spaces after keywords.
TrailingComma also got split, and it looks like the
TrailingCommaInArguments behavior is new?
|
| |
|
|
|
|
|
|
|
|
|
| |
Style/NegatedWhile
Style/ParenthesesAroundCondition
Style/WhileUntilDo
Style/WordArray
Performance/ReverseEach
Style/ColonMethodCall
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
|
|
|
| |
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
|