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

Fix client-size databag hash-mashing #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dalehamel
Copy link

@jkeiser this fixes a compatibility issue with the normal chef server.

The issue is that setting data_bag_item to just the raw data will return a non-serialized data_bag_item.

This will cause the chef-client to load it as a hash instead of loading it as an actual data_bag_item object.

This will limit access of the data bag item to string only, where actual data_bag_item objects are mashes, and will support both string and symbolic access.

The practical problem here is that real cookbooks may use symbols, or a combination of symbols and strings to look up databags, as is the case with some of our cookbooks. This makes it impossible to use chef-zero without monkey patching.

I'm open to a better solution. Perhaps limiting the conditional below so that it will just ignore the GET method?

note this breaks data bag searching according to the tests, and I'm not sure why. There's probably a better fix.

@chef-supermarket
Copy link

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.

GitHub Users Who Are Not Authorized To Contribute

The following GitHub users do not appear to have signed a CLA:

Please sign the CLA here.

@dalehamel
Copy link
Author

cc @xthexder

@dalehamel
Copy link
Author

@chef-supermarket
Copy link

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

@tas50 tas50 added the bug label Jul 19, 2016
@thommay thommay added Type: Bug Does not work as expected. and removed bug labels Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants