-
Notifications
You must be signed in to change notification settings - Fork 5.1k
implement Automation-Update-Metadata.ps1 for inner loop v1. #53458
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
base: main
Are you sure you want to change the base?
implement Automation-Update-Metadata.ps1 for inner loop v1. #53458
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 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 |
|
@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. |
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.
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('\', '/') |
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.
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 |
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.
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.
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