Skip to content

fix(pipelines): install build-tools on bundle-size-artifacts pipeline so flub is on PATH#27252

Merged
ChumpChief merged 1 commit intomicrosoft:mainfrom
ChumpChief:fix-bundle-analysis-flub-on-baseline-pipeline
May 6, 2026
Merged

fix(pipelines): install build-tools on bundle-size-artifacts pipeline so flub is on PATH#27252
ChumpChief merged 1 commit intomicrosoft:mainfrom
ChumpChief:fix-bundle-analysis-flub-on-baseline-pipeline

Conversation

@ChumpChief
Copy link
Copy Markdown
Contributor

Description

Follow-up fix for #27246. That PR switched the "Calculate bundle sizes" step in build-npm-package.yml from Npm@1 to Bash@3 so flub would resolve through PATH to the globally-linked workspace build (which has the new bundleAnalyzerJson aggregation logic) instead of node_modules/.bin/flub (the catalog-pinned version, which does not).

That fix worked on PR builds and main-branch client CI builds because both run include-set-package-version, which transitively invokes include-install-build-tools and globally npm links the workspace flub.

It broke the dedicated baseline-CI pipeline (build-bundle-size-artifacts.yml, definition 48 — the pipeline that publishes the bundleAnalyzerJson artifact that PR builds compare against). That pipeline sets isBundleSizeArtifactsPipeline: true, which gates set-package-version off, so flub is never linked. Build 398408 failed at the "Calculate bundle sizes" step with flub: command not found.

The set-package-version skip is itself a deliberate workaround — see #15110, which originally added the gate. Briefly: update-package-version.sh calls flub bump $RELEASE_GROUP … where $RELEASE_GROUP is the tagName parameter. The bundle-size-artifacts pipeline passes tagName: bundle-and-code-coverage-artifacts, which isn't a real release group in the fluidBuild config. Running flub bump against it would fail at release-group lookup. Properly fixing flub bump to support "set versions for a non-release-group set of packages" is a much larger change than this PR wants to take on.

Fix

Decouple flub installation from version-setting: invoke include-install-build-tools standalone right before the bundle-analysis section in build-npm-package.yml, gated on isBundleSizeArtifactsPipeline=true. That makes flub available in exactly the case set-package-version doesn't cover, without invoking the fragile release-group-name machinery. PR/main-client paths are untouched — they still get flub via set-package-version.

Reviewer Guidance

The review process is outlined on this wiki page.

PR microsoft#27246 switched the "Calculate bundle sizes" step in build-npm-package.yml
from Npm@1 to Bash@3 so that `flub` would resolve to the globally-linked
workspace build (which has the new bundleAnalyzerJson aggregation logic)
instead of the catalog-pinned one. That worked on PR builds and main client
CI builds because both invoke include-set-package-version, which
transitively runs include-install-build-tools and globally links flub.

It broke the dedicated baseline pipeline (build-bundle-size-artifacts.yml,
definition 48). That pipeline sets `isBundleSizeArtifactsPipeline: true`,
which gates set-package-version off — so flub is never linked, and the
Bash@3 step fails with `flub: command not found` (build 398408).

Fix: invoke include-install-build-tools standalone right before the
bundle-analysis section, gated on `isBundleSizeArtifactsPipeline=true`,
so flub is on PATH in exactly the case set-package-version doesn't cover.
PR/main-client paths are untouched — they still get flub via set-package-
version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChumpChief ChumpChief marked this pull request as ready for review May 6, 2026 22:16
Copilot AI review requested due to automatic review settings May 6, 2026 22:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the bundle-analysis portion of the npm package build template so the bundle-size-artifacts pipeline has flub available on PATH even when set-package-version is intentionally skipped.

Changes:

  • Conditionally runs include-install-build-tools for isBundleSizeArtifactsPipeline during bundle analysis.
  • Ensures flub is globally linked for the baseline bundle-size artifact publishing pipeline without invoking version-bump logic.

Comment on lines +477 to +478
# the bundle-analysis steps below. Other pipelines already have flub
# linked via set-package-version, so this is a no-op for them.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (12 lines, 1 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

@ChumpChief ChumpChief merged commit 75c806c into microsoft:main May 6, 2026
53 checks passed
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.

3 participants