Skip to content

Change GOFIPS140=v1.0.0 instead of certified - #7219

Merged
michel-laterman merged 2 commits into
elastic:mainfrom
michel-laterman:gofips-var-v1
Jun 18, 2026
Merged

michel-laterman merged 2 commits into
elastic:mainfrom
michel-laterman:gofips-var-v1

Conversation

@michel-laterman

Copy link
Copy Markdown
Contributor

What is the problem this PR solves?

Use GOFIPS140=v1.0.0 instead of GOFIPS140=certified.
Ensure fips artifacts fail if GODEBUG=fips140=off is set.

How does this PR solve the problem?

Change env var set on build to GOFIPS140=v1.0.0.
Add a function that validates the runtime after the logger has been initialized, on non-fips artifacts this function is a nop, fips artifacts will check if fips is enabled and error out if it's disabled.
The error is emitted as a error level log, and directly to stderr and the process will exit with a non-zero status code.

@michel-laterman
michel-laterman requested a review from macdewee June 18, 2026 16:17
@michel-laterman
michel-laterman requested a review from a team as a code owner June 18, 2026 16:17
@michel-laterman michel-laterman added the backport-skip Skip notification from the automated backport with mergify label Jun 18, 2026
@michel-laterman
michel-laterman requested a review from samuelvl June 18, 2026 16:17
@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

Buildkite failed on commit 0e0a983a because cmd/fleet/validateenv_fips.go did not return a value on the success path. The PR has since moved to 393667c0, which adds the missing return nil, so the immediate action is to rerun Buildkite for the current head.

Remediation

  • Keep the current return nil in cmd/fleet/validateenv_fips.go; it addresses the compile failure from the failed build.
  • Rerun the Buildkite fleet-server pipeline for current PR head 393667c0 to replace the stale failed result.
Investigation details

Root Cause

The failed Buildkite run was for commit 0e0a983a14bd5737645bf8ad88449b3531ad2f5e. At that commit, cmd/fleet/validateenv_fips.go ended after the if !fips140.Enabled() block without returning nil, so func validateEnv() error had a missing return on the success path.

Current PR head 393667c07287736eeb9ab813f9565d139faca8ab contains the follow-up commit Add missing return, and cmd/fleet/validateenv_fips.go:18 now returns nil.

Evidence

# github.com/elastic/fleet-server/v7/cmd/fleet
cmd/fleet/validateenv_fips.go:18:1: missing return
Error: running "go fix -tags requirefips ./..." failed with exit code 1
running "go fix -tags requirefips,snapshot ./..." failed with exit code 1
running "go fix -tags requirefips,integration ./..." failed with exit code 1
Error: running "go build -tags=grpcnotrace,requirefips ..." failed with exit code 1

Verification

  • Confirmed the failed Buildkite commit 0e0a983a lacks the success-path return in cmd/fleet/validateenv_fips.go.
  • Confirmed current PR head 393667c0 adds return nil.
  • Ran an isolated GOFIPS140=v1.0.0 go build -tags=requirefips reproduction of the corrected validateEnv implementation successfully.

Follow-up

No flaky-test issue matched this error. This is a stale deterministic compile failure rather than infrastructure or flakiness.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants