-
Notifications
You must be signed in to change notification settings - Fork 50
pass input metadata to resource #1069
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
pass input metadata to resource #1069
Conversation
There was a problem hiding this 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 modifies the add_metadata()
function to pass input metadata from configuration resources to the actual resource invocations, enabling resources to access metadata during operations.
- Modified
add_metadata()
function to accept an optionalresource_metadata
parameter - For adapters, extend existing metadata with input metadata
- For resources, insert metadata as
_metadata
key in properties
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
dsc_lib/src/configure/mod.rs | Modified add_metadata() function signature and logic to handle resource metadata, updated all call sites to pass resource metadata |
dsc/tests/dsc_metadata.tests.ps1 | Added comprehensive tests for metadata passing across different operations (get, set, test, export) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SteveL-MSFT - looks like the key name is |
@michaeltlombardi should this have a doc-impact label and requires to be documented for resource authors? |
PR Summary
subcommand.rs
into helper function to call from there andadd_metadata()
add_metadata()
to:_metadata
key intoproperties
for resources that permit it in their schemametadata
key for adaptersPR Context