Skip to content

Conversation

@haiyuazhang
Copy link
Member

@haiyuazhang haiyuazhang commented Oct 23, 2025

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

The issue page: Azure/azure-sdk-tools#12389

@haiyuazhang haiyuazhang requested a review from hallipr as a code owner October 23, 2025 15:48
@Copilot Copilot AI review requested due to automatic review settings October 23, 2025 15:48
Copy link
Contributor

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 implements the Automation-Update-Metadata.ps1 script for the inner loop automation process. The script extracts service names from package paths and calls the existing Export-API.ps1 script to update metadata.

Key changes:

  • Added a new PowerShell script that processes SDK package paths and invokes API export functionality
  • Configured the swagger-to-sdk automation to reference this new metadata update script

Reviewed Changes

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

File Description
eng/swagger_to_sdk_config.json Added configuration entry pointing to the new metadata update script
eng/scripts/Automation-Update-Metadata.ps1 New script that extracts service names from paths and calls Export-API.ps1

@jsquire jsquire requested a review from m-redding October 23, 2025 16:04
@jsquire
Copy link
Member

jsquire commented Oct 23, 2025

@haiyuazhang: Please be sure to get approval from @m-redding on any work related to Inner Loop tasks and do not merge without explicit sign-off from either Maddy or I.

Also, the spec for this tool is not yet completed and signed-off by all languages. There should not be work taking place for it until that happens.

//cc: @ArthurMa1978

@haiyuazhang
Copy link
Member Author

@haiyuazhang: Please be sure to get approval from @m-redding on any work related to Inner Loop tasks and do not merge without explicit sign-off from either Maddy or I.

Also, the spec for this tool is not yet completed and signed-off by all languages. There should not be work taking place for it until that happens.

//cc: @ArthurMa1978

sure, will follow.

Copy link
Member

@jsquire jsquire left a comment

Choose a reason for hiding this comment

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

The implementation looks good to me, but I'd prefer that we wait to merge until after the spec gets finalized. There's still open discussion on whether we need/want a wrapper script.

}

# Step 2: Remove repo root from package path to get relative path
$fullRepoPath = $fullRepoPath.TrimEnd('\', '/')
Copy link
Member

Choose a reason for hiding this comment

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

We should try to use some of the existing helpers we have instead of parsing the paths independently. See https://github.com/Azure/azure-sdk-for-net/blob/main/eng/scripts/Language-Settings.ps1#L12 which depends on msbuild properties like https://github.com/Azure/azure-sdk-for-net/blob/main/eng/Directory.Build.Common.targets#L387, we could even call msbuild on the project path to get the service directory if we need it.

Write-Host "Calling Export-API.ps1 with package path: $packagePath"

try {
& $exportApiScript $packagePath
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this script looking for the service directory? It is kind of hard to figure out what the parsing code is doing but if it is the service directory then we should update the variable. We should also explicitly list the script parameter name here, so it is clear what we are passing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants