Skip to content

[typespec-go] Refine SDK regenerate pipeline#2021

Open
JiaqiZhang-Dev wants to merge 13 commits into
mainfrom
refine-regen-pipeline
Open

[typespec-go] Refine SDK regenerate pipeline#2021
JiaqiZhang-Dev wants to merge 13 commits into
mainfrom
refine-regen-pipeline

Conversation

@JiaqiZhang-Dev

@JiaqiZhang-Dev JiaqiZhang-Dev commented Jun 29, 2026

Copy link
Copy Markdown
Member

Refinements to the SDK regenerate pipeline:

  1. Do not commit regenerate-sdk-result.json to the PR, just print it to logs and publish it as a pipeline artifact.
  2. Create spec PR: Added a new CreateSpecPR parameter. When enabled, the pipeline will open a PR to azure-rest-api-specs to bump the go module suffix in tspconfig.yaml for packages whose module version changed.
  3. Support the metadata.json latest format.

About the module suffix in tspconfig.yaml, there is an existing discussion about it: #1644

Test

Copilot AI review requested due to automatic review settings June 29, 2026 05:03
@JiaqiZhang-Dev JiaqiZhang-Dev requested a review from benbp as a code owner June 29, 2026 05:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.mod and restore it across package files after regeneration to avoid unintended /vN bumps.
  • Add an optional (CreateSpecPR) workflow to update tspconfig.yaml module entries in azure-rest-api-specs and 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.

Comment thread eng/scripts/sdk_regenerate.py Outdated
Comment thread eng/scripts/sdk_regenerate.py
Comment thread eng/scripts/sdk_regenerate.py Outdated
Comment thread eng/pipelines/sdk-regenerate.yml
Comment thread eng/pipelines/sdk-regenerate.yml Outdated
JiaqiZhang-Dev and others added 3 commits June 29, 2026 15:13
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>
@JiaqiZhang-Dev JiaqiZhang-Dev changed the title Refine SDK regenerate pipeline [typespec-go] Refine SDK regenerate pipeline Jun 30, 2026
@JiaqiZhang-Dev JiaqiZhang-Dev requested a review from Copilot June 30, 2026 02:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread eng/scripts/sdk_regenerate.py
Comment thread eng/scripts/sdk_regenerate.py
Comment thread eng/scripts/sdk_regenerate.py
Comment thread eng/pipelines/sdk-regenerate.yml
Comment thread eng/scripts/sdk_regenerate.py
@tadelesh

Copy link
Copy Markdown
Member

We are working on the repo migration. Could you put the regen pipeline into this PR?

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.

4 participants