You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For instance, both of these are setting the example header, but whether a or b is sent is likely to vary from run to run:
[GLOBAL.remote_store_headers]
EXAMPLE = "a"example = "b"
We should validate the option only specifies a header with a single casing (i.e. emit an error like Found header `example` with multiple names: EXAMPLE, example. Choose one only one casing.), and normalise to lower case (this would allow simplifying the change in #21684)
Should this code also deal with multiple key/value pairs of varying case for a single header?
I ask because on the Rust side in headers_to_http_header_map the conversion should non-deterministically merge them or the "last" one in iteration order will overwrite. However, on the Python side, it would probably be good to validate headers and ensure that only key/value pair exists per header, so that the user gets a good error message.
Doing that would also allow normalizing headers before then checking for user-agent.
Currently the https://www.pantsbuild.org/prerelease/reference/global-options#remote_execution_headers and https://www.pantsbuild.org/prerelease/reference/global-options#remote_store_headers options allow setting a single header multiple times, just differing by casing, and getting potentially non-deterministic behaviour.
For instance, both of these are setting the
example
header, but whethera
orb
is sent is likely to vary from run to run:We should validate the option only specifies a header with a single casing (i.e. emit an error like
Found header `example` with multiple names: EXAMPLE, example. Choose one only one casing.
), and normalise to lower case (this would allow simplifying the change in #21684)Originally posted by @tdyas in #21684 (comment)
The text was updated successfully, but these errors were encountered: