Skip to content

fix(eng): trigger all emitter CI on any pnpm-workspace.yaml change - #5059

Merged
msyyc merged 4 commits into
mainfrom
fix/5010-catalog-triggers-downstream-ci
Jul 28, 2026
Merged

fix(eng): trigger all emitter CI on any pnpm-workspace.yaml change#5059
msyyc merged 4 commits into
mainfrom
fix/5010-catalog-triggers-downstream-ci

Conversation

@msyyc

@msyyc msyyc commented Jul 27, 2026

Copy link
Copy Markdown
Member

Fixes #5010.

Problem

@typespec/http-client-python is not a workspace package — it is consumed from npm through the pnpm catalog, so bumping it only edits the root pnpm-workspace.yaml.

pnpm attributes root-file changes to the root package only, so pnpm --filter "...[base]" reports no affected emitter and detect-affected returns python: false. That is why #5009 ran no Python CI.

Fix

Add pnpm-workspace.yaml to sharedExtra, so any change to it triggers every emitter target — the same treatment the core submodule pointer already gets.

The file changes rarely and always affects dependency resolution repo-wide, so this is deliberately blunt rather than trying to work out which catalog entry moved.

Verification

Simulated the #5009 diff locally with BASE_SHA=origin/main:

Affected targets: {"python":true,"java":true,"typescript":true,"go":true}

Plus a unit test in eng/scripts/detect-affected.test.ts.

pnpm attributes root pnpm-workspace.yaml edits to the root package only, so a
catalog bump of an out-of-workspace upstream (e.g. @typespec/http-client-python)
left every emitter target unaffected and the Python CI never ran.

detect-affected now diffs the catalog / catalogs blocks between base and head,
resolves the workspace packages that consume the changed entries via catalog:
specifiers, and expands their dependents through the pnpm graph.

Fixes #5010

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 19d6a84d-f603-41ee-8377-6dfb7e661391
@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

msyyc and others added 3 commits July 27, 2026 17:05
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 19d6a84d-f603-41ee-8377-6dfb7e661391
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 19d6a84d-f603-41ee-8377-6dfb7e661391
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 19d6a84d-f603-41ee-8377-6dfb7e661391
@msyyc msyyc changed the title fix(eng): trigger downstream CI on pnpm catalog changes fix(eng): trigger all emitter CI on any pnpm-workspace.yaml change Jul 27, 2026
@msyyc
msyyc marked this pull request as ready for review July 27, 2026 09:16
@msyyc
msyyc requested a review from Copilot July 27, 2026 09:17

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 fixes downstream CI target detection so that changes to the root pnpm-workspace.yaml (notably pnpm catalog bumps for non-workspace upstreams like @typespec/http-client-python) correctly trigger emitter CI jobs. It does this by treating pnpm-workspace.yaml as a “shared extra” path that forces all targets to be considered affected.

Changes:

  • Add pnpm-workspace.yaml to the sharedExtra trigger set so any change to it triggers all emitter targets.
  • Clarify detect-affected.ts documentation around the pnpm catalog edge case and why the trigger is intentionally broad.
  • Add a unit test to ensure pnpm-workspace.yaml changes result in all targets being marked affected.

Reviewed changes

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

File Description
eng/scripts/detect-affected.ts Documents the pnpm catalog edge case and relies on sharedExtra to force all targets on pnpm-workspace.yaml changes.
eng/scripts/detect-affected.test.ts Adds a regression test asserting pnpm-workspace.yaml triggers all targets.
eng/scripts/detect-affected.config.json Extends sharedExtra to include pnpm-workspace.yaml so it’s treated as shared CI infra.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

Comment thread eng/scripts/detect-affected.config.json
@msyyc
msyyc enabled auto-merge July 28, 2026 02:49
@msyyc
msyyc added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit 3fab731 Jul 28, 2026
32 checks passed
@msyyc
msyyc deleted the fix/5010-catalog-triggers-downstream-ci branch July 28, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python CI not triggered when http-client-python is updated in pnpm-workspace.yaml (PR #5009)

3 participants