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

Add Methods to table view for dsc resource list #309

Closed
SteveL-MSFT opened this issue Feb 6, 2024 · 4 comments
Closed

Add Methods to table view for dsc resource list #309

SteveL-MSFT opened this issue Feb 6, 2024 · 4 comments
Assignees
Labels
Issue-Enhancement The issue is a feature or idea

Comments

@SteveL-MSFT
Copy link
Member

Summary of the new feature / enhancement

It would be useful to config authors to see what methods get, set, test, export are supported by a resource within the table view

Proposed technical implementation details (optional)

No response

@SteveL-MSFT SteveL-MSFT added the Issue-Enhancement The issue is a feature or idea label Feb 6, 2024
@michaeltlombardi
Copy link
Collaborator

Are there any resources that can't support get? Any resource that supports get supports test (either directly implemented or synthetic through DSC), I think.

@tgauth
Copy link
Collaborator

tgauth commented Feb 7, 2024

I don't think there's any that don't support get because it's a required field in the resource manifest but not sure about test as that's still an optional field in the resource manifest

@michaeltlombardi
Copy link
Collaborator

Even when a resource doesn't implement the test command, DSC is able to use synthetic testing to compare the actual state to the desired state:

When this property isn't defined, DSC uses a synthetic test method for the resource. The synthetic test method:

  1. Gets the actual state of the instance using the resource's get method.
  2. Compares every defined property of the instance's desired state to the actual state.
  3. If the desired state of a property isn't equal to the actual state of that property, DSC reports that the instance isn't in the desired state.

Because the synthetic test only checks for equivalency, it can't accurately test resources with properties that can't be evaluated with equivalency alone. For example, if a resource manages package versions and allows setting the version to latest, DSC would report an instance with a version of 3.1.0 as being out of the desired state, even if 3.1.0 is the latest version of the package.

@SteveL-MSFT
Copy link
Member Author

SteveL-MSFT commented Feb 8, 2024

I think the intent of this right now is to simply expose what the resource advertises it implements. So I would expect it to show get, set, test, and/or export. Although get is currently mandatory, that may or may not change in the future and I think it would be confusing ot users to not see it shown. Similarly, although dsc will synthesize test, I think it makes sense to show whether the resource implements it directly and it's via docs that indicate test is available even if the resource doesn't directly implement it as it does have limitations (direct comparison).

Finally, I would suggest this new column to be between Version and Requires.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement The issue is a feature or idea
Projects
None yet
Development

No branches or pull requests

3 participants