platform exec_properties keys with period silently ignored
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### 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` ?
```text
```
### 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_
Contributor guide
Research direction
Start with the minimal BUILD.bazel example and run the supplied bazel aquery command to confirm that the dotted key disappears. Trace platform exec_properties parsing and add a regression test showing that an unknown execution-group key with a period fails instead of being ignored; done means the test passes with the expected error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100