Skip to content

Add support for using get if resource doesn't implement export #1035

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SteveL-MSFT
Copy link
Member

PR Summary

Enable exporting a configuration that specifies resources that only implement get. This change also makes the OSInfo resource only implement get (since export literally did the same operation). Added a new test resource to help validate the case where input is provided as a filter and where none is provided.

PR Context

Fix #428

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables exporting configurations for resources that only implement get when they don't implement export. The change removes the redundant export implementation from OSInfo resource and adds a new Test/Get resource to validate the fallback behavior.

  • Adds fallback logic to use get when export is not available
  • Removes redundant export implementation from OSInfo resource
  • Adds new Test/Get resource for testing get-only scenarios

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
dsc_lib/src/dscresources/command_resource.rs Implements fallback logic to use get when export is unavailable
osinfo/osinfo.dsc.resource.json Removes redundant export implementation
tools/dsctest/src/get.rs Adds new Get struct for test resource
tools/dsctest/src/main.rs Implements Get subcommand and schema handling
tools/dsctest/src/args.rs Adds Get command line arguments
tools/dsctest/dscget.dsc.resource.json Adds Test/Get resource manifest
dsc/tests/dsc_export.tests.ps1 Adds tests for export fallback scenarios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synthetic export using get
1 participant