Repository navigation
Fix provider UI asset build after a pnpm store change - #75607
Conversation
|
Turn it into draft temporarily bc PR limit, giving slots to recent |
e6fe8ca to
3e84b44
Compare
|
Your CI change needs a maintainer. CI for this pull request runs in your fork, and the workflow runs it starts in apache/airflow are approved automatically while they only run the fork CI gate. This pull request changes files that define what CI runs:
Such a change can make project CI run on the project's runners, so its workflow runs in apache/airflow wait for a maintainer to review the change and approve them. CI in your fork is not affected, and its result stays visible on this pull request. Pull requests from contributors run their CI in the contributor's own fork. GitHub Actions is free and has no minute limit on public forks, while the CI capacity of the Apache Software Foundation is shared by every ASF project and is finite. This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated. |
|
Project CI in use. A maintainer added the This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated. |
|
Hi @jason810496 do you mind taking a look at this? It's a small bug fix :) |
jason810496
left a comment
There was a problem hiding this comment.
Thanks for the fix. Please feel free to DM if you need further help.
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. pnpm 9, which common.ai pins, then exits 0 without installing anything if stdin is closed, or waits forever if stdin is open. The build then fails on any dependency added since the last install, for example react-icons after apache#74334. pnpm 10, which fab and edge3 pin, fails with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY. apache#76498 asks developers to delete the store-dir setting that older prek hooks wrote to the global pnpm config. Each provider UI installed with that setting then hits this on its next build. The other prek hooks that install UI dependencies on the host already skip this confirmation.
Head branch was pushed to by a user without write access
3e84b44 to
cadf174
Compare
|
Ready to merge! :) |
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…ssets (#75607) 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. pnpm 9, which common.ai pins, then exits 0 without installing anything if stdin is closed, or waits forever if stdin is open. The build then fails on any dependency added since the last install, for example react-icons after #74334. pnpm 10, which fab and edge3 pin, fails with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY. #76498 asks developers to delete the store-dir setting that older prek hooks wrote to the global pnpm config. Each provider UI installed with that setting then hits this on its next build. The other prek hooks that install UI dependencies on the host already skip this confirmation. (cherry picked from commit 8894f5b) Co-authored-by: Andrew Chang <[email protected]>
…ssets (#75607) (#77227) 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. pnpm 9, which common.ai pins, then exits 0 without installing anything if stdin is closed, or waits forever if stdin is open. The build then fails on any dependency added since the last install, for example react-icons after #74334. pnpm 10, which fab and edge3 pin, fails with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY. #76498 asks developers to delete the store-dir setting that older prek hooks wrote to the global pnpm config. Each provider UI installed with that setting then hits this on its next build. The other prek hooks that install UI dependencies on the host already skip this confirmation. (cherry picked from commit 8894f5b) Co-authored-by: Andrew Chang <[email protected]>
…ssets (#75607) (#77227) 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. pnpm 9, which common.ai pins, then exits 0 without installing anything if stdin is closed, or waits forever if stdin is open. The build then fails on any dependency added since the last install, for example react-icons after #74334. pnpm 10, which fab and edge3 pin, fails with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY. #76498 asks developers to delete the store-dir setting that older prek hooks wrote to the global pnpm config. Each provider UI installed with that setting then hits this on its next build. The other prek hooks that install UI dependencies on the host already skip this confirmation. (cherry picked from commit 8894f5b) Co-authored-by: Andrew Chang <[email protected]>
Background
compile_provider_assets.pybuilds the UI of each provider plugin, for exampleproviders/common/ai/.../plugins/www. It runs before eachbreeze start-airflowand as a prek hook. If the sources changed since the last build, it runspnpm install --frozen-lockfileand then builds the UI.pnpm records the store location that was used to install
node_modules. If the current store location is different, pnpm must removenode_modulesand install again. It asks for confirmation before it removes anything.Older prek hooks wrote
store-dir=.pnpm-storeinto the global pnpm config. #73538 and #76498 removed that, and #76498 asks developers to runpnpm config delete store-dir. After that, each provider UI that was installed with the old setting gets a different store on its next install.Why
The script captures the pnpm output, so nobody sees the question. The result depends on the pnpm version that the provider pins:
react-icons, and the build fails withRolldown failed to resolve import "react-icons/lu".ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY, and the script exits with that error.What
Pass
--config.confirmModulesPurge=falsetopnpm install. pnpm then removesnode_modulesand installs again without a question. The other prek hooks that install UI dependencies on the host already pass this flag, for examplecompile_ui_assets.py,compile_ui_assets_dev.pyand thets_compile_lint_*.pyhooks.I reproduced both cases with real pnpm and a
node_modulesthat was installed with a different store. For common.ai, the build on main fails with the error above, and on this branch it builds. For edge3, pnpm 10.28.1 fails without the flag and installs with it.How to reproduce
You need pnpm on the host. If
pnpm config get store-dirprints.pnpm-store, every install uses the same store, and pnpm never asks. These commands create the old common.ai install with a different store and do not change your config:Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines