fix: improve typespec-python regeneration workflow#47051
Open
iscai-msft wants to merge 1 commit into
Open
Conversation
91b057d to
a60f9f6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the TypeSpec Python generated-tests regeneration workflow and related documentation to reflect the move of generated test assets to eng/tools/azure-sdk-tools/emitter/generated, and to improve manual regeneration scenarios (including specifying a dedicated target branch).
Changes:
- Update the regeneration workflow to copy outputs into the new generated-tests folder and apply a README template to each generated package directory.
- Add a
target_branchinput forworkflow_dispatchto support pushing regenerated outputs to a selectable branch. - Refresh emitter documentation to reflect deprecation of the old
eng/tools/emitterlocation and point to the generated-tests branch/folder.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
eng/tools/emitter/README.md |
Replaces detailed legacy workflow docs with a deprecation notice pointing to the new generated location/branch. |
eng/tools/emitter/gen/README.md |
Updates README to clarify generated tests are maintained on the typespec-python-generated-tests branch and may be force-pushed. |
eng/tools/azure-sdk-tools/emitter/generated/template/README.md |
Adds a template README applied to each generated test package. |
eng/tools/azure-sdk-tools/emitter/generated/README.md |
Adds documentation for the new generated-tests folder structure and regeneration workflow. |
.github/workflows/typespec-python-regenerate.yml |
Implements new copy target, README templating logic, and target_branch push behavior. |
.github/skills/emitter-package-update/SKILL.md |
Updates skill docs to reflect the new branch-based publishing model for regenerated tests. |
81141cb to
4bcf749
Compare
- Instead of force-pushing regenerated code directly to typespec-python-generated-tests, the workflow now creates a PR targeting that branch. This provides visibility and review before changes land on the baseline. - Adds target_branch workflow_dispatch input so manual runs can target a different branch. - Uses unique head branches per typespec PR to avoid collisions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4bcf749 to
0c05c13
Compare
l0lawrence
approved these changes
May 21, 2026
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.
Changes
1. Fix README template step for new packages
The previous
find -name README.mdapproach only replaced existing README.md files. Newly generated packages (e.g. typeddict variants) that didn't already have a README never got one, causingtest_readme_existsfailures in the typespec repo CI.Changed to iterate all top-level package directories under
azure/andunbranded/, unconditionally copying the template README into each.2. Add
target_branchworkflow_dispatch inputManual workflow runs can now specify a different target branch (defaults to
typespec-python-generated-tests). This allows testing regeneration from a PR without overwriting the main baseline branch.