From 9448f40422567e1afc0f8699457e2fb31ad024e2 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 17 Dec 2024 11:29:37 +0000 Subject: [PATCH] build: workaround for `ERROR: An error occurred during the fetch of repository 'npm2'` In some cases `yarn bazel run @npm2//:sync` will fail in the first run see: https://github.com/aspect-build/rules_js/issues/1445 as a workaround we run a build before. ``` ERROR: An error occurred during the fetch of repository 'npm2': Traceback (most recent call last): File "/usr/local/google/home/alanagius/.cache/bazel/_bazel_alanagius/2fa837e4c5ce941f68b762e5f8e7dc4d/external/aspect_rules_js/npm/private/npm_translate_lock.bzl", line 112, column 21, in _npm_translate_lock_impl fail(msg) Error in fail: INFO: pnpm-lock.yaml file updated. Please run your build again. ``` --- .../npm_translate_lock_MzA5NzUwNzMx | 4 ++-- pnpm-lock.yaml | 1 + renovate.json | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx index 98763d087f85..7717976c91c8 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx @@ -2,7 +2,7 @@ # Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. .npmrc=-2023857461 -package.json=1044460161 -pnpm-lock.yaml=451366521 +package.json=1485890683 +pnpm-lock.yaml=-1807446371 pnpm-workspace.yaml=1711114604 yarn.lock=-892267542 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16b47f91a3f3..b12207414291 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2063,6 +2063,7 @@ packages: /@bazel/typescript@5.8.1(typescript@5.7.2): resolution: {integrity: sha512-NAJ8WQHZL1WE1YmRoCrq/1hhG15Mvy/viWh6TkvFnBeEhNUiQUsA5GYyhU1ztnBIYW03nATO3vwhAEfO7Q0U5g==} + deprecated: No longer maintained, https://github.com/aspect-build/rules_ts is the recommended replacement hasBin: true peerDependencies: typescript: 5.7.2 diff --git a/renovate.json b/renovate.json index 79b1f88c7ba6..ecd2aa08d3e9 100644 --- a/renovate.json +++ b/renovate.json @@ -12,6 +12,7 @@ "commands": [ "git restore .yarn/releases/yarn-4.5.0.cjs", "yarn install --frozen-lockfile --non-interactive", + "yarn bazel build //tools/...", "yarn bazel run @npm2//:sync" ], "fileFilters": [".aspect/rules/external_repository_action_cache/**/*", "pnpm-lock.yaml"],