-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
(PUP-12077) Respect rich_data setting in base context #9471
Conversation
b284a3e
to
ae55600
Compare
Should I create a PUP ticket and follow the old processes for ticketing issues? Haven't done work in this repo since the JIRA migration and unclear if this got migrated to github issues. |
I applied the |
ae55600
to
8d38cb8
Compare
Since Puppet 6.0 "datafication" has inspected the context for the value of rich_data. However, in only some code paths does the value in the context get overridden with a value taken from the settings. This means in some cases the rich_data value will always be true or always be false, regardless of how the user has configured the rich_data setting. And, in the case the simply calling `to_data_hash` on a resource the rich_data value will always be false. This updates the base_context to set rich_data to the settings value, ensuring that the default value for rich_data in the context is the value users have set. Additional changes are primarily where tests still assumed the default value of rich_data was false, with one exception - YAML serialization in the resource application will break if the internal rich_data `__pcore` values are output. This forces rich_data to be false for that code path in the resource application. Fixes GH puppetlabs#9470
8d38cb8
to
91961bc
Compare
Updated the commit to follow style guidelines and, you know, actually be useful. Wasn't sure if we still adhere to those guidlines for branch names and changing the branch name would require a new PR. But happy to open a new PR from a branch that follows our old naming conventions if they're still used. |
Let me know if there's anything you need from me on this |
Since Puppet 6.0 "datafication" has inspected the context for the value
of rich_data. However, in only some code paths does the value in the
context get overridden with a value taken from the settings. This means
in some cases the rich_data value will always be true or always be
false, regardless of how the user has configured the rich_data setting.
And, in the case the simply calling
to_data_hash
on a resource therich_data value will always be false.
This updates the base_context to set rich_data to the settings value,
ensuring that the default value for rich_data in the context is the
value users have set.
Additional changes are primarily where tests still assumed the default
value of rich_data was false, with one exception - YAML serialization in
the resource application will break if the internal rich_data
__pcore
values are output. This forces rich_data to be false for that code path
in the resource application.
Fixes GH #9470