-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow encrypting a previously unencrypted data bag #8077
Allow encrypting a previously unencrypted data bag #8077
Conversation
296c5c3
to
d7aacf9
Compare
d7aacf9
to
5f07d30
Compare
5f07d30
to
436b4b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lamont-granquist review?
It "smells" a little that it's such a simple fix, but this looks fine. I dug around and I can't find a clear direct regression, but you commented on #4815 that there may have been changes to the data bag hash that caused this.
I do wonder if we could craft up a test in spec/integration/knife/data_bag_show_spec.rb
for this condition.
We had a little further discussion at code review and we could add a missing set of tests to |
yeah if we had functional tests this would probably break those for the other use case. and the correct patch should look like a patch to the object model itself, not to knife. so Chef::DataBagItem would need to probably have but then that also needs to get done for data bags, roles, and environments at a minimum. and there needs to be some attention made to DRY'ing up this code. |
ah, i think i see now. i think this fixes #8282 which i just cut, and i deleted all the comments in #4815 which had nothing to do with the original issue. my prior comment only makes sense in the context of where i thought this was addressing what is now #4815. so, yes, this might fix #8282 could really use some func or integration tests though. |
2e71955
to
b8b4454
Compare
Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
- Added specs for data_bag_create_specs - Added specs for data_bag_edit_specs - Added specs for data_bag_show_specs - Ensured chefstyle Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
b8b4454
to
2113866
Compare
This has functional tests now. Should be good to go. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
After creating an unencrypted data bag, and trying to edit/encrypt, It was raising exception as shown below.
There was a minor miss while editing. If data is not encrypted, we should be returning data only instead of returning the entire item.
Issues Resolved
Fixes #8282
Check List