Skip to content

ActionConflict when cc_test is put in filegroup #21410

@peakschris

Description

@peakschris

Description of the bug:

When a cc_test is added to a filegroup, and both are built together with //..., an ActionConflictException is generated. The command fails when both filegroup and cc_test are invoked together. This issue means that aquery on the root of the repo and other full analysis actions fail.

pkg_zip and cc_test have the same issue.

Minimal example: https://github.com/peakschris/filegroup-of-cc-test

Which category does this issue belong to?

C++ Rules

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

git clone https://github.com/peakschris/filegroup-of-cc-test
cd filegroup-of-cc-test
bazel build //test_fg/...

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

release 7.0.1

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 HEAD ?

No response

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

No response

Have you found anything relevant by searching the web?

No response

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

The two conflicting configurations differ only in that one has:
FragmentOptions com.google.devtools.build.lib.analysis.test.TestConfiguration$TestOptions
and the other does not have this fragment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)team-Rules-CPPIssues for C++ rulestype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions