ci: Python emitter regen-diff check (PoC)#5
Draft
l0lawrence wants to merge 1 commit into
Draft
Conversation
Regenerate the http-client-python generated test code with the emitter at the PR head and at a pinned baseline commit, diff the two outputs, fail CI on any diff, and post a PR comment linking to an HTML view of the diff (uploaded as a workflow artifact). Adds: - packages/http-client-python/eng/regen-diff-baseline.txt (pinned baseline SHA) - packages/http-client-python/eng/scripts/ci/regen-diff-html.ts (diff -> HTML/comment) - .github/workflows/python-emitter-regen-diff.yml (regen x2 + diff + fail) - .github/workflows/python-emitter-regen-diff-comment.yml (workflow_run comment) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
Show changes |
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.
What
Proof-of-concept CI check that detects when a change to the Python emitter (
packages/http-client-python) alters its generated test code.On a PR touching
packages/http-client-python/**, the workflow:packages/http-client-python/eng/regen-diff-baseline.txt.python-regen-diff-html).workflow_runpattern) linking to the artifact.If a diff is expected, the author bumps the baseline SHA to accept the new output.
Files
packages/http-client-python/eng/regen-diff-baseline.txt— pinned baseline commit SHA.packages/http-client-python/eng/scripts/ci/regen-diff-html.ts— dependency-free reporter (git diff --no-index→ HTML + comment payload +result.json)..github/workflows/python-emitter-regen-diff.yml—pull_request: generate (head/base matrix) → diff → fail-on-diff..github/workflows/python-emitter-regen-diff-comment.yml—workflow_run: posts the PR comment (works for fork PRs).Notes / caveats
Azure/typespec-azure. Intended to be extended to the csharp/java/js emitters next.