Skip to content

SimpleProvider name fixes #302

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

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

seanmil
Copy link
Contributor

@seanmil seanmil commented Oct 25, 2022

The SimpleProvider has some support for composite namevars, but it is incomplete and only works in scenarios where the :is value is supplied. This PR adds more comprehensive unit tests which cover scenarios where :is is not passed and fixes these issues. As a bonus, the SimpleProvider now works for types with any namevar (it no longer is required to be name for the single-valued case). Some additional code cleanups are included.

@seanmil seanmil requested a review from a team as a code owner October 25, 2022 17:30
@seanmil seanmil force-pushed the simple_provider_name_fixes branch from a4f9041 to 9fcde2e Compare October 25, 2022 17:40
@CLAassistant
Copy link

CLAassistant commented Apr 19, 2023

CLA assistant check
All committers have signed the CLA.

@seanmil seanmil force-pushed the simple_provider_name_fixes branch from 9fcde2e to 67fe3ce Compare October 16, 2023 19:25
Expand test coverage for current behavior to encompass scenarios
where ':is' isn't passed and to show problems with how types
using composite namevars are handled.
As of the prior commit the simple provider correctly matches
not only for types with composite namevars, but also types
with arbitrarily named single namevars. Also, update the
comments at the top of the SimpleProvider class to remove
the note about namevar having to be "name".
@LukasAud LukasAud force-pushed the simple_provider_name_fixes branch from 67fe3ce to bb649d1 Compare November 28, 2023 11:57
@LukasAud LukasAud added the bug label Nov 28, 2023
@LukasAud
Copy link
Contributor

@seanmil Apologies for the rebase, I need to make sure this worked on latest.

Copy link
Contributor

@LukasAud LukasAud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LukasAud LukasAud merged commit ef0f655 into puppetlabs:main Nov 28, 2023
@seanmil seanmil deleted the simple_provider_name_fixes branch April 30, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants