Skip to content

[ABLD-525] Make --enable-bazel select the msgo toolchain in FIPS mode - #60204

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
regis.desgroppes/abld-525-fips-runpath
Nov 16, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
regis.desgroppes/abld-525-fips-runpath

Conversation

@rdesgroppes

@rdesgroppes rdesgroppes commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

🫤 Sorry for the number of touched files, hence of requested reviewers: this structural change is needed to guard against builds mixing non-FIPS, msgo-based FIPS and boringcrypto-based FIPS.
The situation will gradually improve as subsequent bazel() calls get inlined as 1st-class targets in BUILD.bazel files, on the one hand, and as Bazel gets a proper Go SDK with boringcrypto, on the other hand.

What does this PR do?

Let --enable-bazel build tasks request FIPS through an explicit fips_backend, which selects the FIPS target platform, instead of failing as #59511 made them.

Stop bazel() from inferring FIPS from AGENT_FLAVOR=fips, which omnibus still sets, every omnibus build task already receiving its FIPS option explicitly, and make it fail hard instead when a call doesn't pass the msgo backend, rather than silently building without FIPS.

Pass that backend down every bazel() call a FIPS build reaches, as each got the FIPS target platform from AGENT_FLAVOR so far.

go_build needs it to get msgo from @rules_go//go1, which it then always runs, cquery and info to locate what build produced for that platform, and the other calls to share the configuration of build rather than thrashing Bazel's analysis cache.

Motivation

#59511 blocked FIPS --enable-bazel builds because their binaries were silently non-FIPS, and later lacked a RUNPATH to the embedded OpenSSL, which #60334 adds.

Explicit is better than implicit: the task that knows it builds FIPS says so, rather than every bazel() call guessing it from the environment.

Developers then get exactly what their CLI arguments request, without having to tweak environment variables.

Describe how you validated your changes

  • with --enable-bazel and no AGENT_FLAVOR, installer.build --fips-backend msgo, and process-agent.build and privateactionrunner.build with --flavor fips, build msgo FIPS binaries, the FIPS target platform applying to both their build and cquery, while --fips-backend boringcrypto fails,
  • without it, installer.build --fips-backend msgo with AGENT_FLAVOR=fips, as omnibus runs it, still builds a binary with msgo's OpenSSL backend, and cluster-agent.build and secret-generic-connector.build with --fips-backend boringcrypto, as CI runs them, ones with BoringSSL,
  • AGENT_FLAVOR=fips fails the bazel() calls not passing the msgo backend, such as dogstatsd.build's,
  • every bazel() call FIPS omnibus builds reach passes the build's backend.

Additional Notes

  • agent.build, process-agent.build, otel-agent.build and privateactionrunner.build pass their flavor's backend, the 2nd and 3rd dropping a //packages/agent:flavor their targets don't read,
  • agent.build also passes it to rtloader.install-with-bazel, for local FIPS builds to get FIPS rtloader and CPython,
  • bazel() rejects boringcrypto, which FipsBackend.strip_boringcrypto() turns into no backend with a warning for go_build, whose GOEXPERIMENT alone selects it, and schema.compress,
  • //:msgo, its msgo_binary wrapper and the root module's use_repo of @msgo go away, as they were transitional until a target platform selected msgo, which [ABLD-525] Make FIPS a property of the target platform #56440 did,
  • omnibus' FIPS symbol check runs @rules_go//go tool nm1 with the FIPS target platform of its omnibazel_flags.

Footnotes

  1. whose @rules_go//go/toolchain:sdk_name resolves @rules_go//go to msgo, the way rules_go means an SDK to be selected and its go tool run: https://github.com/bazel-contrib/rules_go/blob/master/docs/go/core/bzlmod.md#using-a-go-sdk ↩ ↩2

@github-actions github-actions Bot 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.

AI review by Codex (OpenAI) - workflow run

The patch is correct. I found no actionable issues introduced by these changes. The targeted Python tests could not run because the environment lacks the invoke dependency; Bazel builds and runtime behavior remain unverified.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 65.29% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e50b50a | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor c45bb17
📊 Static Quality Gates Dashboard
🔗 SQG Job

33 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
✅ agent_deb_amd64 765.518 MiB
✅ agent_deb_amd64_fips 695.987 MiB
✅ agent_heroku_amd64 314.404 MiB
✅ agent_msi 669.596 MiB
✅ agent_rpm_amd64 765.494 MiB
✅ agent_rpm_amd64_fips 695.963 MiB
✅ agent_rpm_arm64 734.526 MiB
✅ agent_rpm_arm64_fips 670.757 MiB
✅ agent_suse_amd64 765.494 MiB
✅ agent_suse_amd64_fips 695.963 MiB
✅ agent_suse_arm64 734.526 MiB
✅ agent_suse_arm64_fips 670.757 MiB
✅ docker_agent_amd64 821.233 MiB
✅ docker_agent_arm64 815.000 MiB
✅ docker_agent_jmx_amd64 1012.163 MiB
✅ docker_agent_jmx_arm64 994.645 MiB
✅ docker_cws_instrumentation_amd64 9.517 MiB
✅ docker_cws_instrumentation_arm64 8.877 MiB
✅ docker_dogstatsd_amd64 40.365 MiB
✅ docker_dogstatsd_arm64 38.334 MiB
✅ docker_host_profiler_amd64 282.602 MiB
✅ docker_host_profiler_arm64 295.327 MiB
✅ dogstatsd_deb_amd64 31.121 MiB
✅ dogstatsd_deb_arm64 29.028 MiB
✅ dogstatsd_rpm_amd64 31.121 MiB
✅ dogstatsd_suse_amd64 31.121 MiB
✅ iot_agent_deb_amd64 48.429 MiB
✅ iot_agent_deb_arm64 44.798 MiB
✅ iot_agent_deb_armhf 45.576 MiB
✅ iot_agent_rpm_amd64 48.430 MiB
✅ iot_agent_suse_amd64 48.429 MiB
✅ docker_cluster_agent_amd64 218.643 MiB
✅ docker_cluster_agent_arm64 231.362 MiB

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Job ID: dd0410ea-bcef-4f15-bd7f-18a7cf92a946

Baseline: b5e5ff7
Comparison: 33bbd02
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
➖ quality_gate_logs % cpu utilization +2.67 [+1.71, +3.63] 1 Logs bounds checks dashboard
➖ dsd_uds_10mb_3k_timestamped_contexts_memory memory utilization +0.99 [+0.76, +1.22] 1 Logs
➖ dsd_uds_10mb_3k_timestamped_contexts_cpu % cpu utilization +0.30 [+0.03, +0.57] 1 Logs
➖ quality_gate_security_idle memory utilization +0.25 [+0.21, +0.29] 1 Logs bounds checks dashboard
➖ quality_gate_idle memory utilization -0.03 [-0.08, +0.02] 1 Logs bounds checks dashboard
➖ quality_gate_security_no_fs_load memory utilization -0.07 [-0.13, -0.02] 1 Logs bounds checks dashboard
➖ python_openmetrics % cpu utilization -0.10 [-0.77, +0.57] 1 Logs bounds checks dashboard
➖ quality_gate_private_action_runner memory utilization -0.10 [-0.22, +0.02] 1 Logs bounds checks dashboard
➖ quality_gate_metrics_logs memory utilization -0.15 [-0.37, +0.07] 1 Logs bounds checks dashboard
➖ quality_gate_security_mean_fs_load memory utilization -0.18 [-0.23, -0.13] 1 Logs bounds checks dashboard
➖ dsd_uds_client_drop_detector_cpu % cpu utilization -0.25 [-0.83, +0.33] 1 Logs
➖ quality_gate_idle_all_features memory utilization -0.57 [-0.62, -0.53] 1 Logs bounds checks dashboard

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed observed_value links
✅ python_openmetrics checks_execution_time 10/10 80.72 ≤ 100 bounds checks dashboard
✅ python_openmetrics cpu_usage 10/10 1352.80 ≤ 1500 bounds checks dashboard
✅ python_openmetrics memory_usage 10/10 4.29GiB ≤ 4.75GiB bounds checks dashboard
✅ quality_gate_idle intake_connections 10/10 5 ≤ 6 bounds checks dashboard
❌ quality_gate_idle memory_usage 7/10 193.03MiB > 190MiB bounds checks dashboard
❌ quality_gate_idle total_bytes_received 3/10 835.64KiB > 819.20KiB bounds checks dashboard
✅ quality_gate_idle_all_features intake_connections 10/10 2 ≤ 5 bounds checks dashboard
✅ quality_gate_idle_all_features memory_usage 10/10 469.06MiB ≤ 544MiB bounds checks dashboard
✅ quality_gate_idle_all_features total_bytes_received 10/10 1.24MiB ≤ 1.25MiB bounds checks dashboard
✅ quality_gate_logs intake_connections 10/10 16 ≤ 40 bounds checks dashboard
✅ quality_gate_logs memory_usage 10/10 221.97MiB ≤ 234MiB bounds checks dashboard
✅ quality_gate_logs missed_bytes 10/10 0B ≤ 0B bounds checks dashboard
✅ quality_gate_logs total_bytes_received 10/10 264.41MiB ≤ 292MiB bounds checks dashboard
✅ quality_gate_metrics_logs cpu_usage 10/10 362.34 ≤ 2000 bounds checks dashboard
✅ quality_gate_metrics_logs intake_connections 10/10 18 ≤ 40 bounds checks dashboard
✅ quality_gate_metrics_logs memory_usage 10/10 429.87MiB ≤ 463MiB bounds checks dashboard
✅ quality_gate_metrics_logs missed_bytes 10/10 0B ≤ 0B bounds checks dashboard
✅ quality_gate_metrics_logs total_bytes_received 10/10 953.29MiB ≤ 1.04GiB bounds checks dashboard
✅ quality_gate_private_action_runner memory_usage 10/10 76.77MiB ≤ 78MiB bounds checks dashboard
✅ quality_gate_security_idle cpu_usage 10/10 32.21 ≤ 100 bounds checks dashboard
✅ quality_gate_security_idle memory_usage 10/10 335.94MiB ≤ 365MiB bounds checks dashboard
✅ quality_gate_security_mean_fs_load cpu_usage 10/10 41.22 ≤ 200 bounds checks dashboard
✅ quality_gate_security_mean_fs_load memory_usage 10/10 332.64MiB ≤ 343MiB bounds checks dashboard
✅ quality_gate_security_no_fs_load cpu_usage 10/10 24.75 ≤ 100 bounds checks dashboard
✅ quality_gate_security_no_fs_load memory_usage 10/10 321.10MiB ≤ 356MiB bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

❌ Failed. Some Quality Gates were violated.

  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 7/10 replicas passed. Failed 3 which is > 0. Gate FAILED.
  • quality_gate_idle, bounds check total_bytes_received: 3/10 replicas passed. Failed 7 which is > 0. Gate FAILED.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
  • quality_gate_private_action_runner, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@rdesgroppes rdesgroppes changed the title Regis.desgroppes/abld 525 fips runpath [ABLD-525] Make --enable-bazel select the msgo toolchain in FIPS mode Nov 12, 2026
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Nov 12, 2026
### What does this PR do?
Request FIPS builds with `--platforms=//bazel/platforms:<os>_<cpu>_fips`, whose `flags` select the `msgo` SDK, instead of the retired `fips` value of `//packages/agent:flavor`.

Key the FIPS `config_setting`s, `@openssl`'s and the FIPS package names on the `//bazel/platforms:fips` constraint, and have the omnibus helpers pass the FIPS platform.

Register a test toolchain so that `bazel test` works on FIPS platforms, and remove the unused macOS FIPS platforms.

Have the installer's symbol test require `msgo`'s OpenSSL or CNG backend on the Linux or Windows FIPS platforms, and reject it elsewhere.

:bulb: This doesn't cover the RUNPATH of the OpenSSL that Bazel-built FIPS binaries load, nor lifting #59511's guard against them, which will be addressed in:
- #60204.

### Motivation
The FIPS platforms' constraint selected nothing, and the `fips` flavor selected the FIPS tags but kept the upstream SDK, both silently producing non-FIPS binaries, which #59511 had to block.

Since #58511 made `msgo` a toolchain, the platform now carries both the constraint and the SDK choice.

### Describe how you validated your changes
- `//cmd/agent` builds with `msgo` and the FIPS tags on the FIPS platforms, `requirefips` being Linux-only, and with the upstream SDK and no FIPS tags on the others,
- the agent, installer, loader and packaging targets, and `@openssl`, analyze with no ambiguous `select()` on the Linux and Windows platforms, FIPS or not,
- `bazel test` passes on a FIPS platform,
- the installer's symbol test passes on the Linux and Windows FIPS platforms, and fails when expecting a package the binary lacks.

### Additional Notes
The retired flavor value now fails the analysis of packaging targets.

`//cmd/dogstatsd` drops its `cgo` select, whose FIPS branch was a no-op, #58511's `msgo` SDK building its OpenSSL backend without cgo through `ms_nocgo_opensslcrypto`, the default of [`msgo` 1.27](https://devblogs.microsoft.com/go/go-1-27-0-1-microsoft-build-now-available/), leaving `dd_agent_go_binary`'s identical default.

`//cmd/loader:trace_loader_all_files` only excludes Windows, like `:loader`, instead of listing Linux and macOS.

Groundwork:
- #56351
- #56865
- #57078
- #57223
- #58511
- #58530
- #59501
- #59511
- #59840
- #60181

Co-authored-by: regis.desgroppes <[email protected]>
@rdesgroppes
rdesgroppes force-pushed the regis.desgroppes/abld-525-fips-runpath branch from 9d6cab2 to 910cc45 Compare November 12, 2026 13:49
rdesgroppes added a commit that referenced this pull request Nov 12, 2026
### What does this PR do?
Give Linux FIPS Go binaries a RUNPATH to their embedded libraries with
Go's `-r` in `dd_agent_go_binary`, so that `msgo` loads the embedded
OpenSSL.

For "versioned" install directories, as under `datadog-packages`, have
that RUNPATH fall back to the "stable" version's libraries, for the
installer, which an upgrade runs _before its version is unpacked_.

:bulb: This is the last prerequisite to lifting #59511's guard against
Bazel-built FIPS binaries, which #60204 will do.

### Motivation
Bazel-built FIPS binaries had no RUNPATH to the embedded libraries, so
`msgo` `dlopen`ed OpenSSL from the default search path, loading the
**system** one (or panicking without one).

Omnibus' `CGO_LDFLAGS`, whose `-rpath` the external linker honors for
cgo binaries, never reach Bazel, whose own rpath only lists its
`$ORIGIN`-relative solib directories, while Go's internal linker, which
cgo-less binaries go through, ignores such flags anyway.

Go's `-r` sets the search path whichever linker writes it, as #56351
does for the omnibus-built installer, listing both directories since
#57045's `patchelf --set-rpath` of the bootstrap copy **segfaults** on
such a binary once stripped.

### Describe how you validated your changes
- the FIPS installer has `<install_dir>/embedded/lib` as `DT_RUNPATH`
  and loads `libcrypto.so.3` from there,
- in a versioned install directory, its RUNPATH then lists the stable
  version's libraries, from which it loads `libcrypto.so.3` when its own
  version lacks it,
- the FIPS agent uses cgo for `rtloader`, so the external linker writes
  its rpath: those directories come first, then Bazel's solib ones,
- `replace_prefix`, which `--enable-bazel` agent builds run, keeps
  `<install_dir>/embedded/lib` in that rpath,
- non-FIPS binaries keep their RUNPATH.

### Additional Notes
The RUNPATH comes from an `EMBEDDED_LIB_DIRS` make variable of
`//bazel/rules/variables`, which already derives `AGENT_PACKAGE_VERSION`
from the install directory.
rdesgroppes added a commit that referenced this pull request Nov 13, 2026
### What does this PR do?
Give Linux FIPS Go binaries a RUNPATH to their embedded libraries with
Go's `-r` in `dd_agent_go_binary`, so that `msgo` loads the embedded
OpenSSL.

For "versioned" install directories, as under `datadog-packages`, have
that RUNPATH fall back to the "stable" version's libraries, for the
installer, which an upgrade runs _before its version is unpacked_.

:bulb: This is the last prerequisite to lifting #59511's guard against
Bazel-built FIPS binaries, which #60204 will do.

### Motivation
Bazel-built FIPS binaries had no RUNPATH to the embedded libraries, so
`msgo` `dlopen`ed OpenSSL from the default search path, loading the
**system** one (or panicking without one).

Omnibus' `CGO_LDFLAGS`, whose `-rpath` the external linker honors for
cgo binaries, never reach Bazel, whose own rpath only lists its
`$ORIGIN`-relative solib directories, while Go's internal linker, which
cgo-less binaries go through, ignores such flags anyway.

Go's `-r` sets the search path whichever linker writes it, as #56351
does for the omnibus-built installer, listing both directories since
#57045's `patchelf --set-rpath` of the bootstrap copy **segfaults** on
such a binary once stripped.

### Describe how you validated your changes
- the FIPS installer has `<install_dir>/embedded/lib` as `DT_RUNPATH`
  and loads `libcrypto.so.3` from there,
- in a versioned install directory, its RUNPATH then lists the stable
  version's libraries, from which it loads `libcrypto.so.3` when its own
  version lacks it,
- the FIPS agent uses cgo for `rtloader`, so the external linker writes
  its rpath: those directories come first, then Bazel's solib ones,
- `replace_prefix`, which `--enable-bazel` agent builds run, keeps
  `<install_dir>/embedded/lib` in that rpath,
- non-FIPS binaries keep their RUNPATH.

### Additional Notes
The RUNPATH comes from an `EMBEDDED_LIB_DIRS` make variable of
`//bazel/rules/variables`, which already derives `AGENT_PACKAGE_VERSION`
from the install directory.
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Nov 13, 2026
…#60334)

### What does this PR do?
Give Linux FIPS Go binaries a RUNPATH to their embedded libraries with Go's `-r` in `dd_agent_go_binary`, so that `msgo` loads the embedded OpenSSL.

For "versioned" install directories, as under `datadog-packages`, have that RUNPATH fall back to the "stable" version's libraries, for the installer, which an upgrade runs _before its version is unpacked_.

This is the last prerequisite to lifting #59511's guard against Bazel-built FIPS binaries, which #60204 will do.

### Motivation
Bazel-built FIPS binaries had no RUNPATH to the embedded libraries, so `msgo` `dlopen`ed OpenSSL from the default search path, loading the **system** one (or panicking without one).

Omnibus' `CGO_LDFLAGS`, whose `-rpath` the external linker honors for cgo binaries, never reach Bazel, whose own rpath only lists its `$ORIGIN`-relative solib directories, while Go's internal linker, which cgo-less binaries go through, ignores such flags anyway.

Go's `-r` sets the search path whichever linker writes it, as #56351 does for the omnibus-built installer, listing both directories since #57045's `patchelf --set-rpath` of the bootstrap copy **segfaults** on such a binary:
- NixOS/patchelf#146
- NixOS/patchelf#152
- NixOS/patchelf#446
- NixOS/patchelf#674
- NixOS/patchelf#672
- NixOS/patchelf#623

💡 the PR/commit is therefore meant to be reverted when `patchelf` no longer exhibits the issue.

### Describe how you validated your changes
- the FIPS installer has `<install_dir>/embedded/lib` as `DT_RUNPATH` and loads `libcrypto.so.3` from there,
- in a versioned install directory, its RUNPATH then lists the stable version's libraries, from which it loads `libcrypto.so.3` when its own version lacks it,
- the FIPS agent uses cgo for `rtloader`, so the external linker writes its rpath: those directories come first, then Bazel's solib ones,
- `replace_prefix`, which `--enable-bazel` agent builds run, keeps `<install_dir>/embedded/lib` in that rpath,
- non-FIPS binaries keep their RUNPATH.

### Additional Notes
The RUNPATH comes from an `EMBEDDED_LIB_DIRS` make variable of `//bazel/rules/variables`, which already derives `AGENT_PACKAGE_VERSION` from the install directory.

Co-authored-by: regis.desgroppes <[email protected]>
@rdesgroppes
rdesgroppes force-pushed the regis.desgroppes/abld-525-fips-runpath branch from 910cc45 to 4c85bf2 Compare November 13, 2026 12:59
@rdesgroppes
rdesgroppes requested review from a team as code owners November 13, 2026 16:58
@rdesgroppes
rdesgroppes requested review from Enzu83, arbll, merchristK and mrafi97 and removed request for a team November 13, 2026 16:58

@github-actions github-actions Bot 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.

AI review by Codex (OpenAI) - workflow run

The patch is correct. No actionable issues were found in the changed code. Unit tests could not run because the environment lacks the Python invoke dependency.

@gabedos gabedos 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.

dca build with fips lgtm

…mode

### What does this PR do?
Let `--enable-bazel` build tasks request FIPS through an explicit
`fips_backend`, which selects the FIPS target platform, instead of
failing as #59511 made them.

Stop `bazel()` from inferring FIPS from `AGENT_FLAVOR=fips`, which
omnibus _still_ sets, every omnibus build task already receiving its
FIPS option explicitly, and make it fail hard instead when a call
doesn't pass the `msgo` backend, rather than silently building without
FIPS.

Pass that backend down every `bazel()` call a FIPS build reaches, as
each got the FIPS target platform from `AGENT_FLAVOR` so far.

`go_build` needs it to get `msgo` from `@rules_go//go`, which it then
always runs, `cquery` and `info` to locate what `build` produced for
that platform, and the other calls to share the configuration of `build`
rather than thrashing Bazel's analysis cache.

### Motivation
#59511 blocked FIPS `--enable-bazel` builds because their binaries were
silently non-FIPS, and later lacked a RUNPATH to the embedded OpenSSL,
which #60334 adds.

[Explicit is better than implicit](https://peps.python.org/pep-0020/):
the task that knows it builds FIPS says so, rather than every `bazel()`
call _guessing_ it from the environment.

Developers then get exactly what their CLI arguments request, without
having to tweak environment variables.

### Describe how you validated your changes
- with `--enable-bazel` and no `AGENT_FLAVOR`,
  `installer.build --fips-backend msgo`, and `process-agent.build` and
  `privateactionrunner.build` with `--flavor fips`, build `msgo` FIPS
  binaries, the FIPS target platform applying to both their `build` and
  `cquery`, while `--fips-backend boringcrypto` fails,
- without it, `installer.build --fips-backend msgo` with
  `AGENT_FLAVOR=fips`, as omnibus runs it, still builds a binary with
  `msgo`'s OpenSSL backend, and `cluster-agent.build` and
  `secret-generic-connector.build` with `--fips-backend boringcrypto`,
  as CI runs them, ones with BoringSSL,
- `AGENT_FLAVOR=fips` fails the `bazel()` calls not passing the `msgo`
  backend, such as `dogstatsd.build`'s,
- every `bazel()` call FIPS omnibus builds reach passes the build's
  backend.

### Additional Notes
- `agent.build`, `process-agent.build`, `otel-agent.build` and
  `privateactionrunner.build` pass their flavor's backend, the 2nd and
  3rd dropping a `//packages/agent:flavor` their targets don't read,
- `agent.build` also passes it to `rtloader.install-with-bazel`, for
  local FIPS builds to get FIPS `rtloader` and CPython,
- `bazel()` rejects `boringcrypto`, which
  `FipsBackend.strip_boringcrypto()` turns into no backend with a
  warning for `go_build`, whose `GOEXPERIMENT` alone selects it, and
  `schema.compress`,
- `//:msgo`, its `msgo_binary` wrapper and the root module's `use_repo`
  of `@msgo` go away, as they were transitional until a target platform
  selected `msgo`, which #56440 did,
- omnibus' FIPS symbol check runs `@rules_go//go tool nm` with the FIPS
  target platform of its `omnibazel_flags`, whose
  `@rules_go//go/toolchain:sdk_name` resolves `@rules_go//go` to `msgo`,
  the way rules_go means an SDK to be selected and its `go` tool run:
  https://github.com/bazel-contrib/rules_go/blob/master/docs/go/core/bzlmod.md#using-a-go-sdk
Comment thread tasks/libs/build/bazel.py Resolved
@rdesgroppes
rdesgroppes force-pushed the regis.desgroppes/abld-525-fips-runpath branch from 00a9e36 to e50b50a Compare November 16, 2026 11:51
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 33bbd02 into main Nov 16, 2026
723 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the regis.desgroppes/abld-525-fips-runpath branch November 16, 2026 19:31
@github-actions github-actions Bot added this to the 7.87.0 milestone Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.