bazel icon indicating copy to clipboard operation
bazel copied to clipboard

platform exec_properties keys with period silently ignored

Open bpoland opened this issue 2 weeks ago • 1 comments

Description of the bug:

When defining a platform, it seems that if you specify any exec_properties with a period in the key then it is silently ignored.

This is likely related to parsing for https://bazel.build/extending/exec-groups but if so, it any values that don't match an execution group should cause a failure, the same as if you specify exec_properties on a rule itself, which fails with an error: Tried to set properties for non-existent exec groups

Which category does this issue belong to?

Configurability

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

With BUILD.bazel containing the below, run bazel aquery //:test_exec_properties --extra_execution_platforms=//:test --output=jsonproto | jq '.actions[].executionInfo'

You will see the first and third exec properties appear but not the second, and there is no error.

platform(
    name = "test",
    exec_properties = {
        "one": "1",
        "two.does.not.appear": "2",
        "but-this-does": "3",
    },
    visibility = ["//visibility:public"],
)

genrule(
    name = "test_exec_properties",
    outs = ["output.txt"],
    cmd = "echo hello world > $@",
)

Which operating system are you running Bazel on?

MacOS 15

What is the output of bazel info release?

release 8.1.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 HEAD ?


If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

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

bpoland avatar Dec 09 '25 16:12 bpoland

I've run into this before, but I don't see an easy solution: The available exec groups vary between rules and there are valid use cases for specifying platform properties for an exec group that only some rules in the build define.

fmeum avatar Dec 09 '25 17:12 fmeum