Skip to content

Remove machine-global pnpm config causing .pnpm-store dir to be created in places - #76498

Merged
ashb merged 1 commit into
mainfrom
remove-yet-more-pnpm-global-hooks
Nov 4, 2026
Merged

ashb merged 1 commit into
mainfrom
remove-yet-more-pnpm-global-hooks

Conversation

@ashb

@ashb ashb commented Nov 4, 2026

Copy link
Copy Markdown
Member

This was removed everywhere in #73538, but one extra case crept back in
one day later via #73436 (I haven't checked, but likely the PR was
opened/branched from before 73538 was opened, so one more instance came
back).

This had side-effects that were noticed multiple times before
(#42119, #47342) but without thinking about what this is.

pnpm's store dir is its global system wide cache, akin to the uv cache
dir. By having this setting, each worktree or checkout that builds
assets locally or runs e2e tests gets at least one (and sometimes
multiple) cache dirs, usually taking 800MB-1GB.

This stops it setting the global config setting, but doesn't clear it.
To do that run this:

# Older Airflow prek hooks wrote this to your global pnpm config,
# giving every checkout its own package store.
pnpm config get store-dir   # if this prints ".pnpm-store":
pnpm config delete store-dir
pnpm store path             # should now point at the global store

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

…ed in places

This was removed everywhere in #73538, but one extra case crept back in
one day later via #73436 (I haven't checked, but likely the PR was
opened/branched from before 73538 was opened, so one more instance came
back).

This had side-effects that were noticed multiple times before
(#42119, #47342) but without thinking about what this is.

pnpm's store dir is its global system wide cache, akin to the uv cache
dir. By having this setting, each worktree or checkout that builds
assets locally or runs e2e tests gets at least one (and sometimes
multiple) cache dirs, usually taking 800MB-1GB.

This stops it setting the global config setting, but doesn't clear it.
To do that run this:

```
# Older Airflow prek hooks wrote this to your global pnpm config,
# giving every checkout its own package store.
pnpm config get store-dir   # if this prints ".pnpm-store":
pnpm config delete store-dir
pnpm store path             # should now point at the global store
```
@ashb

ashb commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

For example, I found about 12Gb of .pnpm-store folders across various worktrees and providers etc.

@ashb
ashb merged commit 9391e6a into main Nov 4, 2026
85 checks passed
@ashb
ashb deleted the remove-yet-more-pnpm-global-hooks branch November 4, 2026 23:51
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Nov 5, 2026
… to be created in places (apache#76498)

(cherry picked from commit 9391e6a)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
ashb pushed a commit that referenced this pull request Nov 6, 2026
vatsrahul1001 pushed a commit that referenced this pull request Nov 9, 2026
Andrushika added a commit to Andrushika/airflow that referenced this pull request Nov 16, 2026
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.
jason810496 pushed a commit that referenced this pull request Nov 18, 2026
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.
vatsrahul1001 pushed a commit that referenced this pull request Nov 25, 2026
…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]>
vatsrahul1001 pushed a commit that referenced this pull request Nov 25, 2026
…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]>
vatsrahul1001 pushed a commit that referenced this pull request Nov 27, 2026
vatsrahul1001 pushed a commit that referenced this pull request Nov 27, 2026
…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]>
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.

2 participants