Skip to content

fix(js_image_layer): support js_image_layer in local_path_override (bzlmod nested) workspaces#2826

Open
menny wants to merge 3 commits intoaspect-build:mainfrom
menny:js-layer-is-external-fix
Open

fix(js_image_layer): support js_image_layer in local_path_override (bzlmod nested) workspaces#2826
menny wants to merge 3 commits intoaspect-build:mainfrom
menny:js-layer-is-external-fix

Conversation

@menny
Copy link
Copy Markdown

@menny menny commented May 5, 2026

Fixes #2824

Problem

js_image_layer fails when the target lives in a module registered via local_path_override and is built from the outer workspace.

Files from such modules have f.owner.repo_name != "", which caused is_external = true in the manifest entries. The is_external flag short-circuited symlink resolution and wrote node_modules/ entries directly as type=file in the mtree using the dest path. That dest is a sandbox symlink, not a regular file - causing a type mismatch error from bsdtar.

Fix

Drop the is_external field entirely. All node_modules/ entries now go through resolveSymlink. When the resolved path has no reverse-map entry (e.g. a package-store directory symlink like node_modules/acorn → .aspect_rules_js/acorn@8.7.1/node_modules/acorn), fall back to computing the runfiles linkname using the same logic as _to_rlocation_path in js_image_layer.bzl:

  • bazel-out/<cfg>/bin/external/<repo>/...<repo>/...
  • bazel-out/<cfg>/bin/<pkg>/...REPO_NAME/<pkg>/...

Additional fixes included

  • Guard against indexOf returning -1: realp.indexOf(root) now fails fast with a descriptive error if root is not found in the resolved path, rather than silently corrupting slice indices.
  • Directory expansion loop bug (pre-existing): the loop over expanded tree artifact files was mutating the outer runfiles_dest and path variables with +=, producing path concatenation without / separators and appending raw strings onto already-JSON-encoded values. Fixed by using iteration-local file_dest / file_path.

Repro

See repro in b7d1b8b

Repro structure:

js_image_layer_is_external/
    |_ MODULE.bazel with one bazel_dep("child") and local_path_override.path="child".
    |_ child/   
       |_ MODULE.bazel with rules_js and npm deps
       |_ BUILD.bazel with:
                                 js_binary with a dependency to a npm package
                                 a js_image_layer for the js_binary - target name is "layer"

Building from child/ folder: bazel build //:layer will work just fine.
Building from the root js_image_layer_is_external folder: bazel build @child//:layer will fail with:

tar: mtree specification has different type for
  ./app/bin.runfiles/child~/node_modules/acorn

menny added 3 commits May 5, 2026 16:07
…_external (aspect-build#2824)

Files from local_path_override modules have f.owner.repo_name != "", which caused
is_external=true and forced them through _mtree_file_line using the dest path directly.
On remote execution the dest path is a sandbox symlink that does not exist, producing
an ENOENT / mtree type-mismatch error.

Fix: drop the is_external shortcut so all node_modules symlinks go through resolveSymlink.
When the resolved path has no reverse-map entry (e.g. a package-store directory), fall back
to computing the runfiles linkname using the same logic as _to_rlocation_path in
js_image_layer.bzl: strip "external/" for external repos, prepend REPO_NAME for the
main workspace.
- Remove is_external from the _ENTRY format string (.bzl) and from the
  Entry typedef, destructuring, and condition check (.mjs); the field
  is no longer needed after the is_external fix.
- Replace `+ 1` with `.replace(/^\//, '')` when stripping the leading
  slash separator in pathAfterRoot, making the intent explicit.
- Guard against realp.indexOf(root) returning -1 by throwing early with
  a descriptive error before any slice is attempted; repurposes the
  previously unreachable linkname==undefined error block.
The loop over expanded tree files was mutating the outer `runfiles_dest`
and `path` variables with `+=`. This caused two bugs:
- `runfiles_dest` accumulated file names across iterations without a `/`
  separator, producing paths like `dir/file1.jsfile2.js`.
- `path` was already JSON-encoded (surrounding quotes), so appending a
  raw string produced invalid JSON like `"dir/path"file.js`.

Use iteration-local `file_dest` and `file_path` instead, computing each
file's dest by appending `tree_relative_path` with a `/`, and encoding
the individual file's path fresh each iteration.
@aspect-workflows
Copy link
Copy Markdown

aspect-workflows Bot commented May 5, 2026

Bazel 7 (Test)

251 test targets passed

Targets
//js/private/test/data:extract-js_library-srcs-data [k8-fastbuild]                                      55ms
//js/private/test/data:from-data [k8-fastbuild]                                                         90ms
//js/private/test/data:from-filegroup-srcs [k8-fastbuild]                                               87ms
//js/private/test/data:from-js_library-data [k8-fastbuild]                                              96ms
//js/private/test/data:from-js_run_binary-js_library-data [k8-fastbuild]                                82ms
//js/private/test/data:from-js_run_binary-js_library-srcs [k8-fastbuild]                                94ms
//js/private/test/data:from-js_run_binary-srcs [k8-fastbuild]                                           79ms
//js/private/test/data:from-parent-js_library-data [k8-fastbuild]                                       74ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_app_test [k8-fastbuild]               39ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_just_the_fs_patch_test [k8-fastbuild] 47ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_node_modules_test [k8-fastbuild]      38ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_node_test [k8-fastbuild]              65ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_package_store_3p_test [k8-fastbuild]  51ms
//js/private/test/image:assert_custom_layers_nomatch_test_node_modules_test [k8-fastbuild]              44ms
//js/private/test/image:assert_custom_layers_nomatch_test_package_store_1p_test [k8-fastbuild]          47ms
//js/private/test/image:assert_custom_layers_nomatch_test_package_store_3p_test [k8-fastbuild]          35ms
//js/private/test/image:assert_custom_owner_test_node_test [k8-fastbuild]                               43ms
//js/private/test/image:assert_default_test_app_test [k8-fastbuild]                                     35ms
//js/private/test/image:assert_regex_edge_cases_test_app_test [k8-fastbuild]                            51ms
//js/private/test/image:assert_regex_edge_cases_test_odd_characters_test [k8-fastbuild]                 37ms
//js/private/test/image:checksum_test_test_test [k8-fastbuild]                                          39ms
//js/private/test/js_binary_sh:BAZEL_BINDIR_test [k8-fastbuild]                                         74ms
//js/private/test/js_binary_sh:BAZEL_TARGET_NAME_test [k8-fastbuild]                                    72ms
//js/private/test/js_binary_sh:BAZEL_WORKSPACE_test [k8-fastbuild]                                      103ms
//js/private/test/js_binary_sh:JS_BINARY__BUILD_FILE_PATH_test [k8-fastbuild]                           83ms
//js/private/test/js_binary_sh:JS_BINARY__PACKAGE_test [k8-fastbuild]                                   73ms
//js/private/test/js_binary_sh:JS_BINARY__WORKSPACE_test [k8-fastbuild]                                 73ms
//js/private/test/js_binary_sh:env_json_encode_launcher_escaped [k8-fastbuild]                          82ms
//js/private/test/js_binary_sh:env_json_encode_value [k8-fastbuild]                                     96ms
//js/private/test/js_binary_sh:env_json_obj_value [k8-fastbuild]                                        78ms
//js/private/test/js_binary_sh:regexy-args [k8-fastbuild]                                               57ms
//js/private/test/js_binary_sh:regexy-args-1 [k8-fastbuild]                                             104ms
//js/private/test/js_binary_sh:regexy-args-2 [k8-fastbuild]                                             78ms
//js/private/test/js_run_devserver:js_run_devserver_test [k8-fastbuild]                                 133ms
//js/private/test/js_run_devserver:node_modules_symlink_to_execroot_test [k8-fastbuild]                 309ms
//js/private/test/no_copy_to_bin:no_copy_to_bin_test [k8-fastbuild]                                     109ms
//js/private/test/node-patches:escape_node20_test [k8-fastbuild]                                        151ms
//js/private/test/node-patches:escape_nodejs_test [k8-fastbuild]                                        116ms
//js/private/test/node-patches:lstat_node24_cjs_test [k8-fastbuild]                                     140ms
//js/private/test/node-patches:lstat_node24_test [k8-fastbuild]                                         194ms
//js/private/test/node-patches:opendir_node20_cjs_test [k8-fastbuild]                                   159ms
//js/private/test/node-patches:opendir_node22_cjs_test [k8-fastbuild]                                   152ms
//js/private/test/node-patches:opendir_nodejs_test [k8-fastbuild]                                       249ms
//js/private/test/node-patches:readdir_node22_cjs_test [k8-fastbuild]                                   144ms
//js/private/test/node-patches:readdir_node22_test [k8-fastbuild]                                       241ms
//js/private/test/node-patches:readdir_node24_cjs_test [k8-fastbuild]                                   140ms
//js/private/test/node-patches:readdir_node24_test [k8-fastbuild]                                       215ms
//js/private/test/node-patches:readdir_nodejs_test [k8-fastbuild]                                       243ms
//js/private/test/node-patches:realpath_node22_cjs_test [k8-fastbuild]                                  245ms
//js/private/test/node-patches:realpath_node22_test [k8-fastbuild]                                      174ms
//js/private/test/node-patches:realpath_node24_test [k8-fastbuild]                                      177ms
//js/private/test/node-patches:realpath_nodejs_test [k8-fastbuild]                                      207ms
//js/private/test/node-patches:spawn_test_node24 [k8-fastbuild]                                         761ms
//js/private/test/proto:proto_args_test [k8-fastbuild]                                                  38ms
//js/private/test:data_in_runfiles_test [k8-fastbuild]                                                  56ms
//js/private/test:run_environment_info_tests_binary_env_test [k8-fastbuild]                             34ms
//js/private/test:run_environment_info_tests_binary_no_env_test [k8-fastbuild]                          62ms
//js/private/test:run_environment_info_tests_test_inherit_only_subject [k8-fastbuild]                   93ms
//js/private/test:srcs_not_in_runfiles_test [k8-fastbuild]                                              44ms
//js/private/watch:watch_checked_0_test [k8-fastbuild]                                                  37ms
//js/private/watch:watch_checked_1_test [k8-fastbuild]                                                  37ms
//npm/private/test/npm_package:test_pkg_2 [k8-fastbuild]                                                56ms
//npm/private/test/npm_package:test_pkg_3 [k8-fastbuild]                                                63ms
//npm/private/test/npm_package:test_pkg_6 [k8-fastbuild]                                                65ms
//npm/private/test/subs:subs_test [k8-fastbuild]                                                        59ms
//npm/private/test:node_modules_test [k8-fastbuild]                                                     19ms
//npm/private/test:npm_auth_tests_test_0 [k8-fastbuild]                                                 50ms
//npm/private/test:npm_auth_tests_test_2 [k8-fastbuild]                                                 60ms
//npm/private/test:npm_auth_tests_test_5 [k8-fastbuild]                                                 56ms
//npm/private/test:pkg_versions_test [k8-fastbuild]                                                     56ms
//npm/private/test:test_generated_pkg_json___rollup-target_js_info_files_tagged_manual [k8-fastbuild]   93ms
//npm/private/test:test_generated_pkg_json_only_expected_methods [k8-fastbuild]                         76ms
//npm/private/test:test_generated_pkg_json_only_expected_properties [k8-fastbuild]                      74ms
//npm/private/test:test_npm_package_visibility_test_11 [k8-fastbuild]                                   69ms
//npm/private/test:test_npm_package_visibility_test_13 [k8-fastbuild]                                   33ms
//npm/private/test:test_npm_package_visibility_test_2 [k8-fastbuild]                                    67ms
//npm/private/test:test_npm_package_visibility_test_3 [k8-fastbuild]                                    100ms
//npm/private/test:test_npm_package_visibility_test_4 [k8-fastbuild]                                    58ms
//npm/private/test:test_npm_package_visibility_test_5 [k8-fastbuild]                                    58ms
//npm/private/test:test_npm_package_visibility_test_6 [k8-fastbuild]                                    63ms
//npm/private/test:test_npmrc_test_0 [k8-fastbuild]                                                     76ms
//npm/private/test:test_npmrc_test_3 [k8-fastbuild]                                                     54ms
//npm/private/test:test_npmrc_test_5 [k8-fastbuild]                                                     25ms
//npm/private/test:test_parse_pnpm_lock_test_1 [k8-fastbuild]                                           58ms
//npm/private/test:test_pnpm_test_2 [k8-fastbuild]                                                      71ms
//npm/private/test:test_pnpm_test_6 [k8-fastbuild]                                                      99ms
//npm/private/test:test_pnpm_test_7 [k8-fastbuild]                                                      67ms
//npm/private/test:test_pnpm_test_8 [k8-fastbuild]                                                      67ms
//npm/private/test:test_transitive_closure_test_0 [k8-fastbuild]                                        119ms
//npm/private/test:test_translate_lock_test_0 [k8-fastbuild]                                            47ms
//npm/private/test:test_translate_lock_test_3 [k8-fastbuild]                                            40ms
//npm/private/test:test_translate_lock_test_4 [k8-fastbuild]                                            33ms
//npm/private/test:test_utils_test_3 [k8-fastbuild]                                                     107ms
//npm/private/test:test_utils_test_4 [k8-fastbuild]                                                     66ms
//npm/private/test:test_utils_test_5 [k8-fastbuild]                                                     62ms
//npm/private/test:write_npm_translate_lock_0_test [k8-fastbuild]                                       118ms
//npm/private/test:write_npm_translate_lock_2_test [k8-fastbuild]                                       137ms
//npm/private/test:write_npm_translate_lock_3_test [k8-fastbuild]                                       115ms
//npm/private/test:write_npm_translate_lock_7_test [k8-fastbuild]                                       112ms
//tools:preset.update_test [k8-fastbuild]                                                               130ms
+ 151 other targets

Bazel 8 (Test)

All tests were cache hits

211 tests (100.0%) were fully cached saving 28s.


Bazel 9 (Test)

All tests were cache hits

211 tests (100.0%) were fully cached saving 29s.


Bazel 7 (Test)

e2e/bzlmod

7 test targets passed

Targets
//:check_styles [k8-fastbuild]                                                                          140ms
//:jasmine_test [k8-fastbuild]                                                                          134ms
//:node_modules_test [k8-fastbuild]                                                                     26ms
//:other_module_binary_test [k8-fastbuild]                                                              83ms
//:other_module_linked_packages [k8-fastbuild]                                                          21ms
//:other_module_run_binary_test [k8-fastbuild]                                                          32ms
//:test [k8-fastbuild]                                                                                  73ms

Bazel 8 (Test)

e2e/bzlmod

All tests were cache hits

7 tests (100.0%) were fully cached saving 644ms.


Bazel 9 (Test)

e2e/bzlmod

All tests were cache hits

7 tests (100.0%) were fully cached saving 641ms.


Bazel 7 (Test)

e2e/git_dep_metadata

1 test target passed

Targets
//:no_git_metadata_test                                                                                 19ms

Bazel 8 (Test)

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Bazel 9 (Test)

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 7 (Test)

e2e/gyp_no_install_script

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                  50ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                  101ms

Bazel 8 (Test)

e2e/gyp_no_install_script

All tests were cache hits

1 test (100.0%) was fully cached saving 60ms.


Bazel 9 (Test)

e2e/gyp_no_install_script

All tests were cache hits

1 test (100.0%) was fully cached saving 50ms.


Bazel 7 (Test)

e2e/js_binary_workspace

4 test targets passed

Targets
//:js_run_binary_chdir_test [k8-fastbuild]                                                              67ms
//:test [k8-fastbuild]                                                                                  50ms
@@workspace~//:js_binary_chdir_test [k8-fastbuild]                                                      67ms
@@workspace~//:js_test_chdir_test [k8-fastbuild]                                                        105ms

Bazel 8 (Test)

e2e/js_binary_workspace

All tests were cache hits

4 tests (100.0%) were fully cached saving 229ms.


Bazel 9 (Test)

e2e/js_binary_workspace

All tests were cache hits

4 tests (100.0%) were fully cached saving 227ms.


Bazel 7 (Test)

e2e/js_image_oci

1 test target passed

Targets
//src:image_test [k8-fastbuild]                                                                         4s

Bazel 7 (Test)

e2e/nextjs

3 test targets passed

Targets
//v15/cjs:test [k8-fastbuild]                                                                           33ms
//v15/esm:test [k8-fastbuild]                                                                           25ms
//v15/mjs:test [k8-fastbuild]                                                                           34ms

Bazel 8 (Test)

e2e/nextjs

All tests were cache hits

3 tests (100.0%) were fully cached saving 94ms.


Bazel 9 (Test)

e2e/nextjs

All tests were cache hits

3 tests (100.0%) were fully cached saving 112ms.


Bazel 7 (Test)

e2e/npm_link_package

4 test targets passed

Targets
//cjs/src:test [k8-fastbuild]                                                                           123ms
//cjs:package_store_targets_test [k8-fastbuild]                                                         53ms
//esm/src:test [k8-fastbuild]                                                                           124ms
//esm:package_store_targets_test [k8-fastbuild]                                                         51ms

Bazel 8 (Test)

e2e/npm_link_package

All tests were cache hits

4 tests (100.0%) were fully cached saving 468ms.


Bazel 9 (Test)

e2e/npm_link_package

All tests were cache hits

4 tests (100.0%) were fully cached saving 378ms.


Bazel 7 (Test)

e2e/npm_link_package-rerooted

2 test targets passed

Targets
//root/src:test [k8-fastbuild]                                                                          112ms
//root:package_store_targets_test [k8-fastbuild]                                                        32ms

Bazel 8 (Test)

e2e/npm_link_package-rerooted

All tests were cache hits

2 tests (100.0%) were fully cached saving 156ms.


Bazel 9 (Test)

e2e/npm_link_package-rerooted

All tests were cache hits

2 tests (100.0%) were fully cached saving 193ms.


Bazel 7 (Test)

e2e/npm_translate_lock

3 test targets passed

Targets
//:test                                                                                                 40ms
//:test_dev_filtering                                                                                   148ms
//:test_prod_filtering                                                                                  152ms

Bazel 8 (Test)

e2e/npm_translate_lock

All tests were cache hits

3 tests (100.0%) were fully cached saving 297ms.


Bazel 9 (Test)

e2e/npm_translate_lock

All tests were cache hits

3 tests (100.0%) were fully cached saving 322ms.


Bazel 7 (Test)

e2e/npm_translate_lock_disable_hooks

3 test targets passed

Targets
//:test [k8-fastbuild]                                                                                  20ms
//:write_npm_translate_lock_defs_0_test [k8-fastbuild]                                                  82ms
//:write_npm_translate_lock_defs_1_test [k8-fastbuild]                                                  76ms

Bazel 8 (Test)

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

1 test (100.0%) was fully cached saving 62ms.


Bazel 9 (Test)

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

1 test (100.0%) was fully cached saving 32ms.


Bazel 7 (Test)

e2e/npm_translate_lock_empty

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                  19ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                  59ms

Bazel 8 (Test)

e2e/npm_translate_lock_empty

All tests were cache hits

2 tests (100.0%) were fully cached saving 114ms.


Bazel 9 (Test)

e2e/npm_translate_lock_empty

All tests were cache hits

2 tests (100.0%) were fully cached saving 105ms.


Bazel 7 (Test)

e2e/npm_translate_lock_exclude_package_contents

1 test target passed

Targets
//:test_sh                                                                                              29ms

Bazel 8 (Test)

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 21ms.


Bazel 9 (Test)

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 86ms.


Bazel 7 (Test)

e2e/npm_translate_lock_multi

2 test targets passed

Targets
//app1:test                                                                                             49ms
//app2:test                                                                                             39ms

Bazel 8 (Test)

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 54ms.


Bazel 9 (Test)

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 113ms.


Bazel 7 (Test)

e2e/npm_translate_lock_partial_clone

1 test target passed

Targets
//root:test                                                                                             21ms

Bazel 8 (Test)

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 9 (Test)

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 38ms.


Bazel 7 (Test)

e2e/npm_translate_lock_replace_packages

4 test targets passed

Targets
//:node_modules_test [k8-fastbuild]                                                                     30ms
//:test [k8-fastbuild]                                                                                  77ms
//:utils_test [k8-fastbuild]                                                                            61ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                  58ms

Bazel 8 (Test)

e2e/npm_translate_lock_replace_packages

All tests were cache hits

4 tests (100.0%) were fully cached saving 224ms.


Bazel 9 (Test)

e2e/npm_translate_lock_replace_packages

All tests were cache hits

4 tests (100.0%) were fully cached saving 358ms.


Bazel 7 (Test)

e2e/npm_translate_lock_subdir_patch

1 test target passed

Targets
//subdir:test                                                                                           63ms

Bazel 8 (Test)

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 59ms.


Bazel 9 (Test)

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 50ms.


Bazel 7 (Test)

e2e/npm_translate_package_lock

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/npm_translate_package_lock

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/npm_translate_package_lock

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/output_paths

Waiting for runner...


Bazel 8 (Test)

e2e/output_paths

Waiting for runner...


Bazel 9 (Test)

e2e/output_paths

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/patch_from_repo

1 test target passed

Targets
//:test                                                                                                 23ms

Bazel 7 (Test)

e2e/pnpm_lockfiles

59 test targets passed

Targets
//cases/docusaurus-direct-peer-v9:docusaurus_direct_with_peers [k8-fastbuild]                           40ms
//cases/isaacs-cliui-v90:isaacs_cliui [k8-fastbuild]                                                    39ms
//cases/multi-document-v11:multi_document_v11 [k8-fastbuild]                                            42ms
//cases/nested-peer-v9:nested_peers_targets [k8-fastbuild]                                              32ms
//cases/override-with-alias-url-v9:override-with-alias-url-v9 [k8-fastbuild]                            44ms
//cases/versionless-patch-v9:versionless_patch_targets [k8-fastbuild]                                   38ms
//cases/versionless-patch-v9:versionless_patch_test [k8-fastbuild]                                      207ms
//cases/workspace-peer-v9:optional_peers_targets [k8-fastbuild]                                         69ms
//v101:aliases-test [k8-fastbuild]                                                                      139ms
//v101:patch-test [k8-fastbuild]                                                                        108ms
//v101:repos_0_test [k8-fastbuild]                                                                      115ms
//v101:repos_10_test [k8-fastbuild]                                                                     94ms
//v101:repos_11_test [k8-fastbuild]                                                                     66ms
//v101:repos_12_test [k8-fastbuild]                                                                     74ms
//v101:repos_13_test [k8-fastbuild]                                                                     70ms
//v101:repos_1_test [k8-fastbuild]                                                                      75ms
//v101:repos_2_test [k8-fastbuild]                                                                      77ms
//v101:repos_3_test [k8-fastbuild]                                                                      68ms
//v101:repos_4_test [k8-fastbuild]                                                                      112ms
//v101:repos_5_test [k8-fastbuild]                                                                      73ms
//v101:repos_6_test [k8-fastbuild]                                                                      91ms
//v101:repos_7_test [k8-fastbuild]                                                                      95ms
//v101:repos_8_test [k8-fastbuild]                                                                      99ms
//v101:repos_9_test [k8-fastbuild]                                                                      110ms
//v101:targets [k8-fastbuild]                                                                           25ms
//v110:aliases-test [k8-fastbuild]                                                                      207ms
//v110:patch-test [k8-fastbuild]                                                                        90ms
//v110:repos_0_test [k8-fastbuild]                                                                      90ms
//v110:repos_10_test [k8-fastbuild]                                                                     103ms
//v110:repos_11_test [k8-fastbuild]                                                                     78ms
//v110:repos_12_test [k8-fastbuild]                                                                     136ms
//v110:repos_13_test [k8-fastbuild]                                                                     76ms
//v110:repos_1_test [k8-fastbuild]                                                                      83ms
//v110:repos_2_test [k8-fastbuild]                                                                      82ms
//v110:repos_3_test [k8-fastbuild]                                                                      61ms
//v110:repos_4_test [k8-fastbuild]                                                                      108ms
//v110:repos_5_test [k8-fastbuild]                                                                      82ms
//v110:repos_6_test [k8-fastbuild]                                                                      105ms
//v110:repos_7_test [k8-fastbuild]                                                                      105ms
//v110:repos_8_test [k8-fastbuild]                                                                      102ms
//v110:repos_9_test [k8-fastbuild]                                                                      127ms
//v110:targets [k8-fastbuild]                                                                           26ms
//v90:aliases-test [k8-fastbuild]                                                                       180ms
//v90:patch-test [k8-fastbuild]                                                                         99ms
//v90:repos_0_test [k8-fastbuild]                                                                       117ms
//v90:repos_10_test [k8-fastbuild]                                                                      79ms
//v90:repos_11_test [k8-fastbuild]                                                                      108ms
//v90:repos_12_test [k8-fastbuild]                                                                      83ms
//v90:repos_13_test [k8-fastbuild]                                                                      97ms
//v90:repos_1_test [k8-fastbuild]                                                                       100ms
//v90:repos_2_test [k8-fastbuild]                                                                       67ms
//v90:repos_3_test [k8-fastbuild]                                                                       95ms
//v90:repos_4_test [k8-fastbuild]                                                                       69ms
//v90:repos_5_test [k8-fastbuild]                                                                       96ms
//v90:repos_6_test [k8-fastbuild]                                                                       95ms
//v90:repos_7_test [k8-fastbuild]                                                                       89ms
//v90:repos_8_test [k8-fastbuild]                                                                       80ms
//v90:repos_9_test [k8-fastbuild]                                                                       101ms
//v90:targets [k8-fastbuild]                                                                            26ms

Bazel 8 (Test)

e2e/pnpm_lockfiles

All tests were cache hits

17 tests (100.0%) were fully cached saving 1s.


Bazel 9 (Test)

e2e/pnpm_lockfiles

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/pnpm_repo_install

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/pnpm_repo_install

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/pnpm_repo_install

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/pnpm_version

1 test target passed

Targets
//:test                                                                                                 57ms

Bazel 8 (Test)

e2e/pnpm_version

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/pnpm_version

All tests were cache hits

1 test (100.0%) was fully cached saving 44ms.


Bazel 7 (Test)

e2e/pnpm_workspace

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/pnpm_workspace

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/pnpm_workspace

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/pnpm_workspace_deps

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/pnpm_workspace_deps

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/pnpm_workspace_deps

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/pnpm_workspace_rerooted

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 7 (Test)

e2e/protobuf-es

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/protobuf-es

Waiting for runner...


Bazel 9 (Test)

e2e/protobuf-es

Waiting for runner...


Bazel 7 (Test)

e2e/protobuf-google

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/protobuf-google

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/protobuf-google

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/repo_mapping

3 test targets passed

Targets
//:node_modules_test [k8-fastbuild]                                                                     40ms
//:package_store_targets_test [k8-fastbuild]                                                            39ms
//:test [k8-fastbuild]                                                                                  61ms

Bazel 8 (Test)

e2e/repo_mapping

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/repo_mapping

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/vendored_node

Buildkite build #12636 is running...


Bazel 8 (Test)

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 66ms.


Bazel 9 (Test)

e2e/vendored_node

Buildkite build #12636 is running...


Bazel 7 (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 8 (Test)

e2e/vendored_tarfile

Buildkite build #12636 is running...


Bazel 9 (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 7 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 8 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 9 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 7 (Test)

examples

83 test targets passed

Targets
//:linked_packages_build_test [k8-fastbuild]                                                            54ms
//coverage:coverage [k8-fastbuild]                                                                      85ms
//genrule:test_acorn [k8-fastbuild]                                                                     49ms
//genrule:test_require_acorn [k8-fastbuild]                                                             31ms
//js_binary:aspect_bin_a_test [k8-fastbuild]                                                            106ms
//js_binary:case7_test [k8-fastbuild]                                                                   128ms
//js_binary:npm_version_test [k8-fastbuild]                                                             278ms
//js_binary:test13-1_cjs [k8-fastbuild]                                                                 64ms
//js_binary:test13-1_mjs [k8-fastbuild]                                                                 47ms
//js_binary:test13-2_cjs [k8-fastbuild]                                                                 59ms
//js_binary:test13-2_mjs [k8-fastbuild]                                                                 73ms
//js_binary:test4-b_cjs [k8-fastbuild]                                                                  36ms
//js_binary:test4-b_mjs [k8-fastbuild]                                                                  54ms
//js_binary:test4-cjs-a [k8-fastbuild]                                                                  50ms
//js_binary:test4-mjs-a [k8-fastbuild]                                                                  77ms
//js_binary:test5_cjs [k8-fastbuild]                                                                    53ms
//js_binary:test5_mjs [k8-fastbuild]                                                                    38ms
//js_binary:test6 [k8-fastbuild]                                                                        37ms
//js_binary:test6_alt [k8-fastbuild]                                                                    86ms
//js_binary:test8 [k8-fastbuild]                                                                        55ms
//js_binary:test_cjs [k8-fastbuild]                                                                     96ms
//js_binary:test_exitcode [k8-fastbuild]                                                                70ms
//js_binary:test_js_binary_under_custom_rule [k8-fastbuild]                                             62ms
//js_binary:test_js_binary_under_custom_rule_local [k8-fastbuild]                                       63ms
//js_binary:test_js_binary_under_genrule_cjs [k8-fastbuild]                                             60ms
//js_binary:test_js_binary_under_genrule_mjs [k8-fastbuild]                                             50ms
//js_binary:test_js_binary_under_js_run_binary_cjs [k8-fastbuild]                                       53ms
//js_binary:test_js_binary_under_js_run_binary_local_cjs [k8-fastbuild]                                 64ms
//js_binary:test_js_binary_under_js_run_binary_local_mjs [k8-fastbuild]                                 83ms
//js_binary:test_js_binary_under_js_run_binary_mjs [k8-fastbuild]                                       48ms
//js_binary:test_js_binary_under_js_run_binary_no_copy_data_to_bin [k8-fastbuild]                       62ms
//js_binary:test_mjs [k8-fastbuild]                                                                     88ms
//js_binary:test_stderr [k8-fastbuild]                                                                  70ms
//js_binary:test_stdout [k8-fastbuild]                                                                  82ms
//js_lib_pkg/b:test_each_target [k8-fastbuild]                                                          80ms
//js_lib_pkg/b:test_parent_target [k8-fastbuild]                                                        122ms
//js_library/two:two_test [k8-fastbuild]                                                                117ms
//linked_consumer:direct [k8-fastbuild]                                                                 133ms
//linked_consumer:pkg [k8-fastbuild]                                                                    102ms
//linked_consumer:sources_test [k8-fastbuild]                                                           41ms
//linked_consumer:types_test [k8-fastbuild]                                                             42ms
//linked_empty_node_modules:test [k8-fastbuild]                                                         78ms
//macro:test_all [k8-fastbuild]                                                                         532ms
//macro:test_cjs [k8-fastbuild]                                                                         479ms
//macro:test_esm [k8-fastbuild]                                                                         484ms
//macro:test_js [k8-fastbuild]                                                                          455ms
//nextjs:next_build_test [k8-fastbuild]                                                                 47ms
//nextjs:write_next_links_defs_test [k8-fastbuild]                                                      94ms
//npm_deps/patches:patches_update_test [k8-fastbuild]                                                   83ms
//npm_deps:circular_deps_build_test [k8-fastbuild]                                                      45ms
//npm_deps:rollup_version_test [k8-fastbuild]                                                           210ms
//npm_deps:test1 [k8-fastbuild]                                                                         76ms
//npm_deps:test10_cjs [k8-fastbuild]                                                                    195ms
//npm_deps:test10_mjs [k8-fastbuild]                                                                    195ms
//npm_deps:test11_cjs [k8-fastbuild]                                                                    260ms
//npm_deps:test11_mjs [k8-fastbuild]                                                                    166ms
//npm_deps:test3 [k8-fastbuild]                                                                         97ms
//npm_deps:test4 [k8-fastbuild]                                                                         73ms
//npm_deps:test5 [k8-fastbuild]                                                                         37ms
//npm_deps:test5_alt [k8-fastbuild]                                                                     80ms
//npm_deps:test6 [k8-fastbuild]                                                                         126ms
//npm_deps:test7_a [k8-fastbuild]                                                                       125ms
//npm_deps:test7_b_cjs [k8-fastbuild]                                                                   177ms
//npm_deps:test7_b_mjs [k8-fastbuild]                                                                   170ms
//npm_deps:test8 [k8-fastbuild]                                                                         97ms
//npm_deps:test9_cjs [k8-fastbuild]                                                                     184ms
//npm_deps:test9_mjs [k8-fastbuild]                                                                     148ms
//npm_deps:test_peer [k8-fastbuild]                                                                     180ms
//npm_deps:test_uvu_version [k8-fastbuild]                                                              195ms
//package_json_module:test [k8-fastbuild]                                                               391ms
//runfiles:module_name_runfiles [k8-fastbuild]                                                          100ms
//runfiles:outer_runfiles [k8-fastbuild]                                                                252ms
//runfiles:run_outer_binary_asserts__direct_srcs [k8-fastbuild]                                         146ms
//runfiles:run_outer_binary_asserts__transitive_data [k8-fastbuild]                                     116ms
//runfiles:run_test_binary_asserts__direct_srcs [k8-fastbuild]                                          117ms
//runfiles:run_test_binary_asserts__transitive_data [k8-fastbuild]                                      70ms
//runfiles:runfiles [k8-fastbuild]                                                                      91ms
//stack_traces:stack_traces [k8-fastbuild]                                                              179ms
//stamped_package_json:stamp_test [k8-fastbuild]                                                        63ms
//vite3:build_test [k8-fastbuild]                                                                       63ms
//vite6:build_test [k8-fastbuild]                                                                       28ms
//webpack_cli:test [k8-fastbuild]                                                                       490ms
//worker:test_pi [k8-fastbuild]                                                                         94ms

Bazel 8 (Test)

examples

All tests were cache hits

81 tests (100.0%) were fully cached saving 16s.


Bazel 9 (Test)

examples

All tests were cache hits

81 tests (100.0%) were fully cached saving 14s.


Buildifier      Format

@jbedard jbedard requested review from jbedard and thesayyn May 5, 2026 21:05
@jbedard
Copy link
Copy Markdown
Member

jbedard commented May 6, 2026

Can we add a test/example that demonstrates the bug+fix?

@menny
Copy link
Copy Markdown
Author

menny commented May 6, 2026

i've linked to a branch with a commit showing the error. The commit message explains how to reproduce. I'll add a summary here in the description.

@jbedard
Copy link
Copy Markdown
Member

jbedard commented May 6, 2026

Can we add a test though? A test that previously failed and now passes with your fix...

@menny
Copy link
Copy Markdown
Author

menny commented May 6, 2026

Can we add a test though? A test that previously failed and now passes with your fix...

gladly, I am not sure how to create that test though :)

This seems like an integration test? Can you direct me to such tests I can pattern match on?

@jbedard
Copy link
Copy Markdown
Member

jbedard commented May 7, 2026

If the bug involves a local_path_override then it indeed needs to be an e2e test. Maybe look at e2e/js_image_oci, notice it already has a local_path_override so it is probably testing a similar situation?

Ideally we don't need to add another e2e test and we can just modify e2e/js_image_oci to reproduce the issue, maybe just adding some config or maybe it needs another sub-MODULE for your scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: is_external is confusing when running remote

2 participants