This is an automated email from the ASF dual-hosted git repository.
vatsrahul1001 pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-4-test by this push:
new 7f9eba8d5cd [v3-4-test] Reinstall stale provider UI dependencies when
compiling assets (#75607) (#77227)
7f9eba8d5cd is described below
commit 7f9eba8d5cdaa931314ad70e866f0e49cb592184
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Nov 25 12:53:31 2026 +0000
[v3-4-test] Reinstall stale provider UI dependencies when compiling assets
(#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 8894f5be87f056f69f7d847ab0e3e394669635eb)
Co-authored-by: Andrew Chang <[email protected]>
---
scripts/ci/prek/compile_provider_assets.py | 2 +-
scripts/tests/ci/prek/test_compile_provider_assets.py | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/ci/prek/compile_provider_assets.py
b/scripts/ci/prek/compile_provider_assets.py
index 1edd674fe5a..df6d677cdbf 100755
--- a/scripts/ci/prek/compile_provider_assets.py
+++ b/scripts/ci/prek/compile_provider_assets.py
@@ -129,7 +129,7 @@ def compile_assets(provider_name: str):
for try_num in range(3):
print(f"### Trying to install {provider_name} dependencies: attempt:
{try_num + 1} ###")
result = subprocess.run(
- ["pnpm", "install", "--frozen-lockfile"],
+ ["pnpm", "install", "--frozen-lockfile",
"--config.confirmModulesPurge=false"],
cwd=os.fspath(www_directory),
text=True,
check=False,
diff --git a/scripts/tests/ci/prek/test_compile_provider_assets.py
b/scripts/tests/ci/prek/test_compile_provider_assets.py
index ff2c80d139c..06f7ef5cabf 100644
--- a/scripts/tests/ci/prek/test_compile_provider_assets.py
+++ b/scripts/tests/ci/prek/test_compile_provider_assets.py
@@ -129,4 +129,8 @@ def test_rebuilds_when_sources_change(harness):
(harness.www_directory / "src" / "main.ts").write_text("export const main
= 2;\n")
harness.run_script()
- assert harness.read_pnpm_calls() == [*calls_after_first_build, "install
--frozen-lockfile", "build"]
+ assert harness.read_pnpm_calls() == [
+ *calls_after_first_build,
+ "install --frozen-lockfile --config.confirmModulesPurge=false",
+ "build",
+ ]