Skip to content

Disable microsoft/go build telemetry #8481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 19, 2025

Conversation

michel-laterman
Copy link
Contributor

What does this PR do?

Disable microsoft/go build telemetry in the spec and magefile.

@michel-laterman michel-laterman requested a review from a team as a code owner June 12, 2025 22:00
@michel-laterman michel-laterman added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team technical debt backport-8.19 Automated backport to the 8.19 branch labels Jun 12, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@simitt
Copy link
Contributor

simitt commented Jun 13, 2025

@pchila could you give this a review also please, as I believe you are the most familiar with the Elastic Agent build parts and it is important to always opt out.

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

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

Adding MS_GOTOOLCHAIN_TELEMETRY_ENABLED env var in the fips settings should be enough to pass it to golang-crossbuild when building the elastic-agent binary.

I wonder if this is needed also when running fips unit tests as I think that the microsoft/go runtime is used there as well. @michel-laterman could you please check ?

@ycombinator
Copy link
Contributor

Shouldn't we also check for MS_GOTOOLCHAIN_TELEMETRY_ENABLED in here?

foundTags := false
foundExperiment := false
for _, setting := range info.Settings {
switch setting.Key {
case "-tags":
foundTags = true
require.Contains(t, setting.Value, "requirefips")
require.Contains(t, setting.Value, "ms_tls13kdf")
continue
case "GOEXPERIMENT":
foundExperiment = true
require.Contains(t, setting.Value, "systemcrypto")
continue
}
}
require.True(t, foundTags, "Did not find -tags within binary version information")
require.True(t, foundExperiment, "Did not find GOEXPERIMENT within binary version information")

@michel-laterman
Copy link
Contributor Author

I don't think we need to check for the MS toolchain var in the binary; the var controls what the go binary does, not what we produce

ycombinator
ycombinator previously approved these changes Jun 17, 2025
ycombinator
ycombinator previously approved these changes Jun 17, 2025
Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

Shall we consider using the pre-command hook instead? I'm not a big fan of the pre-command hook, but I feel enabling that env variable everywhere by default could be helpful. WDYT?

@michel-laterman
Copy link
Contributor Author

I think that having it in the fips bk pipeline is much clearer then using a hook

v1v
v1v previously approved these changes Jun 18, 2025
Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

LGTM, Could the environment variable be defined at the beginning of the env section? Instead of the step itself?

@michel-laterman michel-laterman enabled auto-merge (squash) June 18, 2025 16:02
@michel-laterman
Copy link
Contributor Author

buildkite test this

1 similar comment
@michel-laterman
Copy link
Contributor Author

buildkite test this

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@michel-laterman michel-laterman merged commit 8803a02 into elastic:main Jun 19, 2025
19 checks passed
@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @michel-laterman

mergify bot pushed a commit that referenced this pull request Jun 19, 2025
* Disable microsoft/go build telemetry

* Pass env var to FIPS integration tests

(cherry picked from commit 8803a02)
@michel-laterman michel-laterman deleted the msft-disable-telemetry branch June 19, 2025 16:27
michel-laterman added a commit that referenced this pull request Jun 19, 2025
* Disable microsoft/go build telemetry

* Pass env var to FIPS integration tests

(cherry picked from commit 8803a02)

Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.19 Automated backport to the 8.19 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants