Skip to content

Fix instances method with simple_get_filter#304

Merged
LukasAud merged 1 commit into
puppetlabs:mainfrom
seanmil:fix_simple_get_filter_instantiation
Nov 28, 2023
Merged

Fix instances method with simple_get_filter#304
LukasAud merged 1 commit into
puppetlabs:mainfrom
seanmil:fix_simple_get_filter_instantiation

Conversation

@seanmil

@seanmil seanmil commented Oct 28, 2022

Copy link
Copy Markdown
Contributor

Per issue #303, the Puppet Specification for Resource API indicates that a provider get() method when simple_get_filter is enabled should return all instances when the second/names parameter is set to 'nil'.

Currently, if a Resource API provider is implemented per specification and uses the simple_get_filter feature it will never return any resources for the instances() method, which prevents things such a resource purging from working.

@seanmil seanmil requested a review from a team as a code owner October 28, 2022 13:08
@seanmil

seanmil commented Oct 29, 2022

Copy link
Copy Markdown
Contributor Author

So, after sleeping on this, I'm not sure that changing the behavior in the code to match the documentation is the right change. It could be a functionally breaking change for someone who wrote code based on the actual implementation and not the documented behavior.

Instead maybe it makes sense to update the documentation. I put up a PR for the Puppet Specifications at puppetlabs/puppet-specifications#155 but the Puppet docs on the docs website would also need to be fixed.

@CLAassistant

CLAassistant commented Apr 19, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@LukasAud

Copy link
Copy Markdown
Contributor

Closing and re-opening to re-kick testing.

@LukasAud LukasAud closed this Nov 23, 2023
@LukasAud LukasAud reopened this Nov 23, 2023
Per issue puppetlabs#303, the Puppet Specification for Resource API
indicates that a provider get() method when simple_get_filter
is enabled should return all instances when the second/names
parameter is set to 'nil'.

Currently, if a Resource API provider is implemented per
specification and uses the simple_get_filter feature it
will never return any resources for the `instances()`
method, which prevents things such a resource purging
from working.
@LukasAud LukasAud force-pushed the fix_simple_get_filter_instantiation branch from 1f06330 to ecefc34 Compare November 28, 2023 11:57

@LukasAud LukasAud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@LukasAud LukasAud added the bug label Nov 28, 2023
@LukasAud LukasAud merged commit 46aa687 into puppetlabs:main Nov 28, 2023
@LukasAud

Copy link
Copy Markdown
Contributor

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

@seanmil seanmil deleted the fix_simple_get_filter_instantiation 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