From 05f3a9558f70eff56e035ced5d0980b7a563859e Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Sun, 8 Mar 2026 12:24:00 +0100 Subject: [PATCH] renovate: Improve PR creation reliability Set pnpm's `allowUnusedPatches` to avoid erroring out for cases like https://github.com/Automattic/jetpack/pull/47472#issuecomment-4007148761. Too bad pnpm 11 is removing `ignorePatchFailures`, that'd be useful for the PR creation too. Also, try creating the change entries even if `pnpm install` fails, as the change entry creation doesn't depend on pnpm. The later `tools/check-intra-monorepo-deps.sh` run will fail, but getting change entries created is still an improvement. --- .github/files/renovate-post-upgrade.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/files/renovate-post-upgrade.sh b/.github/files/renovate-post-upgrade.sh index e5fa9b2f047f..c94bc30ff532 100755 --- a/.github/files/renovate-post-upgrade.sh +++ b/.github/files/renovate-post-upgrade.sh @@ -8,6 +8,7 @@ export CI=1 BASE="$PWD" BRANCH="$1" CHANGEFILE="$(sed 's/[<>:"/\\|?*]/-/g' <<<"$BRANCH")" +EXIT=0 . "$BASE/tools/includes/changelogger.sh" . "$BASE/tools/includes/alpha-tag.sh" @@ -47,10 +48,9 @@ cd "$BASE" TMP=$(< pnpm-workspace.yaml ) pnpm config set --location project strict-peer-dependencies false pnpm config set --location project strict-dep-builds false -EXIT=0 +pnpm config set --location project allow-unused-patches true pnpm install || EXIT=$? echo "$TMP" > pnpm-workspace.yaml -[[ $EXIT == 0 ]] || exit $EXIT # Install changelogger too. cd "$BASE/projects/packages/changelogger" @@ -73,9 +73,11 @@ done if ! $ANY; then echo "No projects are touched in this renovate PR, so nothing to do." - exit 0 + exit $EXIT fi # Update deps and lock files. echo "Updating dependencies on changed projects" tools/check-intra-monorepo-deps.sh -ua -n "${CHANGEFILE}" + +exit $EXIT