Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable resources to return metadata#947

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SteveL-MSFT merged 7 commits intoPowerShell:mainfromSteveL-MSFT:resource-metadata
Jul 9, 2025

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFTSteveL-MSFT commentedJul 8, 2025
edited
Loading

PR Summary

Enable resources to return_metadata object that gets populated into the resourcemetadata field. ReservedMicrosoft.DSC property is ignored, but a warning message is emitted. Works for all operations.

Also some reordering of existing code to keep it in proper order.

PR Context

Fix#467

@SteveL-MSFTSteveL-MSFT requested a review fromtgauthJuly 8, 2025 04:32
@SteveL-MSFTSteveL-MSFT marked this pull request as ready for reviewJuly 8, 2025 04:32
@SteveL-MSFTSteveL-MSFT requested a review fromCopilotJuly 8, 2025 15:40
Copy link
Contributor

@CopilotCopilotAI 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

Enable resources to return a_metadata object that’s merged into the resource’smetadata field, ignoring anyMicrosoft.DSC entries (with a warning), and applied consistently across all operations.

  • AddMetadata struct and CLI support indsctest for emitting metadata
  • Enhanceconfigurator to extract_metadata intoResource*Result.metadata and emit warnings for reserved keys
  • Introduce manifest, locale strings, and end-to-end tests for the new Test/Metadata resource

Reviewed Changes

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

Show a summary per file
FileDescription
tools/dsctest/src/metadata.rsDefineMetadata struct for CLI
tools/dsctest/src/main.rsRegistermetadata subcommand and serialize metadata outputs
tools/dsctest/src/args.rsAddMetadata variant to CLI args
tools/dsctest/metadata.dsc.resource.jsonAdd manifest for Test/Metadata resource
dsc_lib/src/configure/mod.rsExtract_metadata and integrate into resource metadata
dsc_lib/locales/en-us.tomlAdd messages for ignoredMicrosoft.DSC and invalid metadata
dsc/tests/dsc_metadata.tests.ps1Add tests verifying metadata extraction and warning emission
Comments suppressed due to low confidence (2)

dsc/tests/dsc_metadata.tests.ps1:27

  • [nitpick] Consider adding an assertion formetadata.count to ensure thecount property is populated correctly as part of the metadata object.
        $out.results[0].metadata.myNumber | Should -Be 42

tools/dsctest/src/main.rs:134

  • [nitpick] The loop variablei is ambiguous; consider renaming it (e.g.,index) for better readability.
            for i in 0..count {

@SteveL-MSFTSteveL-MSFT added this pull request to themerge queueJul 9, 2025
Merged via the queue intoPowerShell:main with commitbeb05fbJul 9, 2025
4 checks passed
@SteveL-MSFTSteveL-MSFT deleted the resource-metadata branchJuly 9, 2025 15:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@tgauthtgauthtgauth approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Allow resources to return metadata
2 participants
@SteveL-MSFT@tgauth

[8]ページ先頭

©2009-2025 Movatter.jp