[typespec-go] Refine SDK regenerate pipeline#2021
Open
JiaqiZhang-Dev wants to merge 13 commits into
Open
Conversation
…on, optional spec PR
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the SDK regeneration automation to avoid committing regeneration result JSON, preserve Go module paths after regeneration, and optionally open a spec PR to update tspconfig.yaml module suffixes when regeneration bumps module versions.
Changes:
- Stop committing
regenerate-sdk-result.json; instead log it and publish it as a pipeline artifact. - Record each package’s original Go module path from
go.modand restore it across package files after regeneration to avoid unintended/vNbumps. - Add an optional (
CreateSpecPR) workflow to updatetspconfig.yamlmodule entries inazure-rest-api-specsand open an automated PR.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| eng/scripts/sdk_regenerate.py | Adds module-path capture/restore, artifact output, and optional spec PR creation logic. |
| eng/pipelines/sdk-regenerate.yml | Adds CreateSpecPR parameter, checks out azure-rest-api-specs, publishes the result JSON artifact, and wires new script flags. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
|
We are working on the repo migration. Could you put the regen pipeline into this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refinements to the SDK regenerate pipeline:
regenerate-sdk-result.jsonto the PR, just print it to logs and publish it as a pipeline artifact.CreateSpecPRparameter. When enabled, the pipeline will open a PR toazure-rest-api-specsto bump the go module suffix in tspconfig.yaml for packages whose module version changed.About the module suffix in tspconfig.yaml, there is an existing discussion about it: #1644
Test