Skip to content

Fix breeze start-airflow breaking on outdated provider UI installs - #75607

Draft
Andrushika wants to merge 1 commit into
apache:mainfrom
Andrushika:fix-provider-assets-pnpm-purge
Draft

Andrushika wants to merge 1 commit into
apache:mainfrom
Andrushika:fix-provider-assets-pnpm-purge

Conversation

@Andrushika

@Andrushika Andrushika commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Background

Before each breeze start-airflow, compile_provider_assets.py runs pnpm install --frozen-lockfile in each provider's plugin UI directory, for example providers/common/ai/.../plugins/www. Then it builds the UI.

pnpm records the store location that was used to install node_modules. If the current store location is different, pnpm must remove node_modules and install again. It asks for confirmation before it removes anything.

Before #73538, our lint hooks wrote store-dir=.pnpm-store into the global pnpm config. An older node_modules on a dev machine can still use that per-directory store. I removed that line from my config, so my next install used a different store.

Why

The script captures the pnpm output, so nobody sees the question. If stdin is closed, pnpm exits 0 and installs nothing. If stdin is open, pnpm waits forever.

The build then fails on each dependency that was added after the old install. For common.ai, #74334 added react-icons, and the build fails with Rolldown failed to resolve import "react-icons/lu".

What

Pass --config.confirmModulesPurge=false to pnpm install. pnpm then removes node_modules and installs again without a question. The other prek hooks that install UI dependencies on the host already pass this flag: compile_ui_assets.py, compile_ui_assets_dev.py and the ts_compile_lint_*.py hooks.

I reproduced the problem with real pnpm. I used a node_modules from before #74334, installed with a different store. On main the build fails with the error above. On this branch it builds.

How to reproduce

You may not see this problem on your machine. If pnpm config get store-dir prints .pnpm-store, every install uses the same store. Then pnpm never asks. These commands create the old install with a different store and do not change your config:

cd providers/common/ai/src/airflow/providers/common/ai/plugins/www
rm -rf node_modules dist
git checkout d8efc66ea76^ -- package.json pnpm-lock.yaml
pnpm install --frozen-lockfile --config.store-dir=/tmp/other-pnpm-store
git checkout HEAD -- package.json pnpm-lock.yaml
cd -
uv run --project scripts python scripts/ci/prek/compile_provider_assets.py ai </dev/null

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5.5)

Generated-by: Claude Code (Opus 5.5) following the guidelines

When a provider UI's node_modules was installed with a different pnpm
store or layout, pnpm must purge and reinstall it, and it asks for
confirmation first. compile_provider_assets.py runs pnpm install with
captured output, so nobody can answer: with stdin closed pnpm exits 0
without installing anything, and with stdin left open it waits forever.
The build then fails on any dependency added since the last install,
for example react-icons for common.ai after apache#74334.

The other prek hooks that install UI dependencies on the host already
skip this confirmation.
@Andrushika Andrushika changed the title Reinstall stale provider UI dependencies when compiling assets Fix breeze start-airflow breaking on outdated provider UI installs Oct 25, 2026
@Andrushika

Copy link
Copy Markdown
Contributor Author

Turn it into draft temporarily bc PR limit, giving slots to recent airflowctl work.

@Andrushika
Andrushika marked this pull request as draft October 27, 2026 12:39
@Andrushika
Andrushika marked this pull request as ready for review October 28, 2026 00:44
@Andrushika
Andrushika marked this pull request as draft November 2, 2026 07:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant