Skip to content

bazel: Generate the build id linker scripts locally - #49288

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
phlax:ci-build-id-local
Nov 16, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
phlax:ci-build-id-local

Conversation

@phlax

@phlax phlax commented Nov 15, 2026

Copy link
Copy Markdown
Member

Commit Message: bazel: Generate the build id linker scripts locally
Additional Description:

//bazel:gnu_build_id (and raw_build_id on macOS) write a one-line linker script from the stamp (BUILD_SCM_REVISION), so they are new with every commit, and every stamped link (release and test binaries) waits on them. They have no tags, so on RBE each is a remote action queued on the default pool, for an echo.

In envoy-ci-staging the publish build's gnu_build_id spent 19.2s queued (21.7s in all) on the critical path while the pool was busy; locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden behind the client's processing of the cached compiles (the links wait on those until ~50s there anyway), so this is a guard against queueing rather than a saving on every build.

Tagged no-remote-exec, as volatile-scm-hash (next to them) is.

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

`gnu_build_id`/`raw_build_id` write a one-line linker script from the
stamp, so they are new with every commit, and every stamped link (the
release and test binaries) waits on them. Remotely each waits in the RBE
queue for a trivial action: ~20s when the default pool is busy
(measured in envoy-ci-staging), and more when it is busier. They run
locally, as `volatile-scm-hash` does.

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 block the change to keep build-ID generation off remote executors.

No open issues 🎉

What changed in this PR

Keeps Envoy’s small stamped build-ID generation actions off remote executors, avoiding remote queue delays on the linking critical path.

Changes:

  • Adds no-remote-exec to the gnu_build_id and macOS raw_build_id generation rules.
  • Adds comments explaining the scheduling rationale; generated contents remain unchanged.
File Description
bazel/​BUILD Disables remote execution for both build-ID generation rules and documents why.

Review effort: Balanced

@phlax
phlax merged commit f0ebe46 into envoyproxy:main Nov 16, 2026
30 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
`//bazel:gnu_build_id` (and `raw_build_id` on macOS) write a one-line
linker script from the stamp (`BUILD_SCM_REVISION`), so they are new
with every commit, and every stamped link (release and test binaries)
waits on them. They have no tags, so on RBE each is a remote action
queued on the default pool, for an `echo`.

In envoy-ci-staging the publish build's `gnu_build_id` spent 19.2s
queued (21.7s in all) on the critical path while the pool was busy;
locally it takes 1.7s. On a quiet pool, or a fast client, it is hidden
behind the client's processing of the cached compiles (the links wait on
those until ~50s there anyway), so this is a guard against queueing
rather than a saving on every build.

Tagged `no-remote-exec`, as `volatile-scm-hash` (next to them) is.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit f0ebe46)
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