Skip to content

ci: Read every line of the extra bazel options - #49292

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
phlax:ci-extra-options-lines
Nov 16, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
phlax:ci-extra-options-lines

Conversation

@phlax

@phlax phlax commented Nov 15, 2026

Copy link
Copy Markdown
Member

Commit Message: ci: Read every line of the extra bazel options
Additional Description:

ci/build_setup.sh splits BAZEL_BUILD_EXTRA_OPTIONS (and the test and startup ones) with read -ra, which only reads the first line, so any options on later lines are silently dropped.

The value can span lines: a workflow's bazel-extra from a folded (>-) YAML block keeps a line break before a more-indented line, eg an expression continued over several lines. This bit in envoy-ci-staging, where flags passed this way (--modify_execution_info=...) never reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is latent here; the lines are now joined before they are split.

Risk Level: low
Testing: CI, envoy-ci-staging
Docs Changes: n/a
Release Notes: n/a

`BAZEL_BUILD_EXTRA_OPTIONS` (and the test and startup ones) can span
lines, eg a workflow's `bazel-extra` from a folded YAML block whose
expressions are on their own (more indented) lines. `read` only reads
the first line, so the options on the others were silently dropped.
The lines are joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change to preserve multiline Bazel extra options.

No open issues 🎉

What changed in this PR

Fixes CI option parsing so multiline Bazel extra options are preserved rather than silently dropping all but the first line.

Changes:

  • Replaces embedded newlines with spaces before splitting build, test, and startup extra options into arrays.
  • Adds a comment explaining why multiline values need normalization.
File Description
ci/​build_setup.sh Normalizes multiline Bazel extra options before parsing them.

Review effort: Balanced

@phlax
phlax merged commit bb5fb42 into envoyproxy:main Nov 16, 2026
26 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
`ci/build_setup.sh` splits `BAZEL_BUILD_EXTRA_OPTIONS` (and the test and
startup ones) with `read -ra`, which only reads the first line, so any
options on later lines are silently dropped.

The value can span lines: a workflow's `bazel-extra` from a folded
(`>-`) YAML block keeps a line break before a more-indented line, eg an
expression continued over several lines. This bit in envoy-ci-staging,
where flags passed this way (`--modify_execution_info=...`) never
reached bazel, with no error.

No workflow on main currently passes a multi-line value, so this is
latent here; the lines are now joined before they are split.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit bb5fb42)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants