Skip to content

"dangling symbolic link" flakes after upgrading to Bazel 7 #20886

@dbolduc

Description

@dbolduc

Description of the bug:

googleapis/google-cloud-cpp#13444

After upgrading to Bazel 7, we have started seeing transient failures in our CI. These have all been from io_opentelemetry_cpp.

ERROR: /h/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_opentelemetry_cpp/sdk/src/common/BUILD:6:11: output 'external/io_opentelemetry_cpp/sdk/src/common/_virtual_includes/random/src/common/random.h' is a dangling symbolic link
ERROR: /h/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_opentelemetry_cpp/sdk/src/trace/BUILD:6:11: output 'external/io_opentelemetry_cpp/sdk/src/trace/_virtual_includes/trace/src/trace/span.h' is a dangling symbolic link
...etc...
ERROR: /h/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_opentelemetry_cpp/api/BUILD:13:11: Symlinking virtual headers for api failed: not all outputs were created or valid
ERROR: /h/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/io_opentelemetry_cpp/sdk/BUILD:6:11: Symlinking virtual headers for headers failed: not all outputs were created or valid

My naive guess is that it has something to do with how that repo uses include_prefix: https://github.com/open-telemetry/opentelemetry-cpp/blob/c4f39f2be8109fd1a3e047677c09cf47954b92db/sdk/src/trace/BUILD#L10

Which category does this issue belong to?

External Dependency

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

Not sure, but I can supply more logs and test solutions (within reason).

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 7.0.0

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

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

It probably has to do with "build without the bytes"

Have you found anything relevant by searching the web?

#19143 seems like a similar issue.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions