| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is a pretty common first error message to experience with Chef. Let's point the users to a helpful location so they can quickly get up and running. Add some YARD comments while I was in the config class
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Give more details on why people are seeing these problems so they can fix them.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reset the global resource and provider handler maps before each and
every test.
note that mutation through the top-level keys will get preserved so
this is not perfect, but deep-duping through every single test we run
becomes expensive.
this is sufficient to flush out the global state of all the test lwrp fixtures
that we setup.
it discovered several usage bugs where we either relied on this feature
or where we were testing different fixtures from the ones we thought we
were.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| | |
Hide sensitive properties in converge_if_changed.
|
| |
| |
| |
| | |
Signed-off-by: Chris Arnold <cma.arnold@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
| |
| |
| |
| | |
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
|/
|
|
| |
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
This forces everyone to starting using new_resource.property_name
instead of just property_name.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
|
|
|
|
|
| |
Fixes: #6051
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
| |
Signed-off-by: Thom May <thom@may.lt>
|
|
|
|
|
|
|
|
| |
make sure that we fail if we can see info logs at least (halfway
decent check that we're not getting the logger when we're going
through a pipe / not through a tty)
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
closes #2514
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| | |
Remove use_inline_resources
|
| |
| |
| |
| | |
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
|
|/
|
|
|
|
| |
This adds a new phase in the compilation of the run context.
Signed-off-by: Thom May <thom@chef.io>
|
|\
| |
| | |
Make Standardized Exit Codes The Default Behavior
|
| |
| |
| |
| | |
Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
|
|\ \
| |/
|/| |
Add real support for rb files (at least roles) in knife-serve
|
| |
| |
| |
| |
| | |
Change-Id: I4788cac16864c7eb5a876890e9fe41485af80d46
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
|
| |
| |
| |
| |
| | |
Change-Id: I1076b918e9153f21b4c49d77054899111106eb74
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ic28361e506643f55f588c7ddb22a27800b634f96
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
|
| |
| |
| |
| |
| | |
Change-Id: I0ddb921a30daf33007b37483b163fc76117441c7
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implements RFC 67, which removes cookbook segments, and moves to a
single list of all the files contained in a cookbook. This allows us to
move forward with better audit modes and also proper shipping of ohai
plugins.
Signed-off-by: Thom May <thom@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
this also deprecates the multi-resource notification syntax where
`foo[a,b]` would attempt to notify both `foo[a]` and `foo[b]` because
that is hella ambiguous.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes nameless resources work in the DSL:
```ruby
apt_update
```
It does it by giving it an empty-string name of ""
It also drops support for multi-arg resources, that has been deprecated
for some time:
```ruby
some_resource "foo", "bar", "baz"
```
Note that multipackage package resources do not use multiple args, but a
single argument which is an arry:
```ruby
package [ "lsof", "strace", "tcpdump" ]
```
So this change does not affect that usage. Multi-arg has been
deprecated for some time now and its not clear that it was ever used by
anyone.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| | |
I think this nukes descendants tracker, although might need to clean it
up in a few more spots.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old action_class code was doing some magical stuff with the provider
accessor in order to determine if the class was supposed to be a custom
resource or not and have the action_class autovivifying accessor return nil
in cases when the resource wasn't a custom resource and implementing
inheritance by walking back up the tree in ways that were difficult to
grok.
This removes the magic from the provider so that there's no longer any
accessor that magically short-circuits to nil if the resource is not
supposed to be a custom resource.
There is now a simple inherited API for `Chef::Resource.custom_resource?`
which just defines if the class is a custom resource or not. Since both
`action` and `action_class` call `define_action_class` they both wind up
setting this boolean on the class, which is then inherited to subclasses
automatically, which eliminates the need to walk up the hierarchy.
The superclass.respond_to?(:action_class) checks have also been rendered
unnecessary by removing the code that walked up the inheritance
hierarchy and also because Chef::Resource is never going to be a
custom resource itself, so will never call `define_action_class` so from
inside of `define_action_class` you can always rely on the superclass
being a resource and implementing `custom_resource?` and `action_class`.
The wiring for picking the provider is now moved explicitly to the
ProviderResolver -- even though custom resources hardcode a 1:1
resource-to-provider mapping. This reads much clearer to me than the
magical wiring to the provider accessor off of the instance.
The bug that this fixes was that the way the magical accessor
nil-or-action_class was implemented the old way of defining action
helpers with class_eval broke:
```ruby
action_class.class_eval << EOM
def a
"foo"
end
EOM
```
If that came before any action_class-with-a-block or action declaration
and the resource did not inherit from another custom resource then the
action_class would not be created and it would return nil, which was an
API which the magical wiring in the provider accessor required.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
we did actually have tests around creating actions with spaces and
hyphens in their names. we had fallback code for properties, but it
was broken and threw a "private method define_resource called" and then
it created a closure and didn't have the `name` in the binding so it
called itself and blew up the stack.
this change walks that back. it does prove that we still support
UTF-8 in property names, actions and DSL names, which i'd argue is
more than enough.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| | |
forgot to branch and need more coffee
This reverts commit 02ec917f9356d999c44aceb7f1ff43957b0fe832.
|
| |
| |
| |
| |
| |
| |
| | |
I think this nukes descendants tracker, although might need to clean it
up in a few more spots.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| | |
Switch over the Chef-12.0 ProviderResolver is now completed.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|/
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
circular deps are poor form, but allowed, so we still need to check.
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>
|
|
|
|
|
|
| |
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
make sure that if we have a metadata.rb that is not valid to read that
we never parse that and use compiled metadata.json instead.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| | |
Properly deprecate old Chef::Platform methods
|
| |
| |
| |
| |
| |
| |
| |
| | |
These should have been deprecated formally in 12.5.1 after the
Dynamic Provider-Resolver'ing of the internal chef resources
was completed.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\ \
| | |
| | | |
Chefstyle updates
|
| | |
| | |
| | |
| | | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |/
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|