Migrate Python checks to CI Gate - #11522
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
|
All changed packages have been documented.
Show changes
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
|
You can try these changes here
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Install the Python package dev requirements in each CI Gate job so tox-based test, lint, docs, and typecheck commands can run after restoring generated artifacts. Also enable Git long paths before the Windows checkout to avoid failures on long test-data paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Pre-build generated package wheels in the build job and upload them with generated artifacts. Run downstream jobs against restored artifacts with package install plus a fail-fast Python prepare step instead of rebuilding the package in each job. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Rename the Linux build job and make the Windows Python CI job build, regenerate, and test independently without restoring Linux artifacts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Allow the Python generated artifact upload to include the hidden .wheels directory so downstream Linux jobs install pre-built wheels instead of falling back to source builds. Add concise comments documenting the CI-specific npm and Python prepare steps. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Download generated Python artifacts into packages/http-client-python so downstream jobs find tests/generated, tests/.wheels, dist, and generator at the paths expected by the package scripts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Add direct dev dependencies for eslint and @eslint/js because the standalone http-client-python lint config imports @eslint/js in CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
commit: |
Use a package-local Prettier config for standalone http-client-python formatting so CI does not require the monorepo TypeSpec Prettier plugin build output. Avoid importing @eslint/js from the standalone ESLint config and add an internal Chronus entry for the Python CI Gate migration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
Build the TypeSpec Prettier plugin only in the Python Lint & Format job before running package format checks, instead of carrying a separate package-local Prettier config. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: df233d93-3288-4a30-a629-d9e53a234021
|
Since this PR introduces some change for ci.yml, @timotheeguerin pls help take a look. |
There was a problem hiding this comment.
Pull request overview
This PR migrates http-client-python CI validation from the shared Azure DevOps pipeline into GitHub Actions and wires it into the repo-level CI Gate so Python checks can run in parallel with core CI (reducing end-to-end PR validation time).
Changes:
- Removes the Python stage template from the shared Azure DevOps
eng/common/pipelines/ci.yml. - Updates
.github/workflows/ci.ymlto detect Python-only changes and call a new reusable workflow, then gates on both core + Python results. - Adds a new
.github/workflows/ci-python.ymlworkflow that splits Python validation into parallel Linux jobs (plus a Windows validation job) and shares generated outputs via artifacts.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/http-client-python/eng/scripts/ci/config/eslint-ci.config.mjs | Simplifies the standalone CI ESLint config by removing @eslint/js recommended usage. |
| eng/common/pipelines/ci.yml | Drops the ADO Python CI stage template from the shared pipeline. |
| .github/workflows/ci.yml | Adds Python change detection and includes Python workflow results in CI Gate validation. |
| .github/workflows/ci-python.yml | Introduces a reusable Python CI workflow with build/regenerate + parallel validation jobs and a Windows job. |
| .chronus/changes/python-ci-gate-2026-08-04.md | Adds a Chronus entry documenting the internal CI migration. |
Suppressed comments (3)
.github/workflows/ci-python.yml:115
- Same artifact re-rooting issue as in the
testjob: downloading topackages/http-client-pythonwill nest thepackages/http-client-python/**paths one level deeper and break expected locations.
- name: Download generated artifacts
uses: actions/download-artifact@v8
with:
name: python-generated
path: packages/http-client-python
.github/workflows/ci-python.yml:149
- Same artifact download path issue: the artifact was uploaded with workspace-relative paths, so downloading into
packages/http-client-pythonwill create a duplicatedpackages/http-client-python/packages/http-client-python/...tree.
- name: Download generated artifacts
uses: actions/download-artifact@v8
with:
name: python-generated
path: packages/http-client-python
.github/workflows/ci-python.yml:194
- Same artifact download path issue as the other Linux jobs. Download to the workspace root so the extracted paths match what was uploaded.
- name: Download generated artifacts
uses: actions/download-artifact@v8
with:
name: python-generated
path: packages/http-client-python
| - name: Download generated artifacts | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: python-generated | ||
| path: packages/http-client-python | ||
|
|
There was a problem hiding this comment.
This is intentional. upload-artifact roots the artifact at the least common ancestor of the uploaded paths, which is packages/http-client-python here. The downloaded artifact contains top-level tests/, dist/, and generator/, not packages/http-client-python/....
Downloading into packages/http-client-python restores those directories to the paths expected by the package scripts. Downloading to . was the previous issue: the package scripts then only saw checked-in placeholders under packages/http-client-python/tests/generated, while the full generated artifact was restored under repo-root tests/.
| parameters: | ||
| DependsOn: InitStage | ||
| Condition: eq('true', stageDependencies.InitStage.outputs['InitJob.InitStep.RunJava']) | ||
|
|
There was a problem hiding this comment.
do you need to delete some fileS?
| # cspell:ignore dorny | ||
| - uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4 | ||
| id: filter | ||
| id: core-filter |
There was a problem hiding this comment.
I think that tool was letting multiple filters to be defined in the same task
For #11308
This PR update http-client-pytthon CI to replace ADO pipeline with github action and CI cost time is reduced from 60 minutes to < 40 minutes.
NOTE: I estimate there are still optimization space about 10 minutes but it needs some code change inner python script so will make another PR to do it.