Skip to content

Repository mapping manifest does not exist in test sandbox #16643

@fmeum

Description

@fmeum

Description of the bug:

The .repo_mapping file does not appear in test sandboxes.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

# WORKSPACE
# MODULE.bazel
# pkg/BUILD
sh_test(
  name = "test",
  srcs = ["test.sh"],
)
# pkg/test.sh
#!/usr/bin/env bash

runfiles_dir="$TEST_SRCDIR/../test.runfiles"
if [[ ! -d "$runfiles_dir" ]]; then
  echo "$runfiles_dir does not exist"
  exit 1
fi
repo_mapping="$TEST_SRCDIR/../test.repo_mapping"
if [[ ! -f "$repo_mapping" ]]; then
  echo "$repo_mapping does not exist"
  exit 1
fi

USE_BAZEL_VERSION=last_green bazel test //pkg:test --enable_bzlmod fails
USE_BAZEL_VERSION=last_green bazel run //pkg:test --enable_bzlmod passes
USE_BAZEL_VERSION=last_green bazel test //pkg:test --enable_bzlmod --spawn_strategy=local passes

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

HEAD

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-BzlmodBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: buguntriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions