Skip to content

Set ms-go-build as default GOCACHE#1998

Merged
qmuntal merged 3 commits intomicrosoft/mainfrom
dev/qmuntal/gocache
Dec 11, 2025
Merged

Set ms-go-build as default GOCACHE#1998
qmuntal merged 3 commits intomicrosoft/mainfrom
dev/qmuntal/gocache

Conversation

@qmuntal
Copy link
Copy Markdown
Member

@qmuntal qmuntal commented Dec 11, 2025

Fixes #1994

@qmuntal qmuntal requested a review from a team as a code owner December 11, 2025 08:09
@gdams
Copy link
Copy Markdown
Member

gdams commented Dec 11, 2025

@qmuntal test failures

@qmuntal qmuntal merged commit e5cac2c into microsoft/main Dec 11, 2025
38 checks passed
@qmuntal qmuntal deleted the dev/qmuntal/gocache branch December 11, 2025 12:47
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Mar 4, 2026
### What does this PR do?
Reapply #47007, reverted in #47083 following #incident-50242, but with
the following adjustments:
1. scope repository caches to individual jobs (`$CI_JOB_NAME`) rather
   than runner types (`$CI_RUNNER_DESCRIPTION`),
2. add `.cache/ms-go*` to the cached paths (neutral until `msgo` 1.26+).

### Motivation
#incident-50242 traced to FIPS and non-FIPS omnibus jobs racing to write
incompatible Go build artifacts to the same cache key: `msgo` tags
indeed compile objects with `X:systemcrypto` while upstream Go does not.

It turns out to be a **known issue**: microsoft/go#1994.

Until the corresponding fix is available (microsoft/go#1998), that is
when bumping the Go SDK version to 1.26+, the main adjustment consists
in temporarily scoping repository caches to jobs.
Per-job cache keys naturally segregate the two without requiring an
explicit FIPS discriminator (we couldn't rely on `$FLAVOR` because it's
not expanding consistently across jobs).

### Additional Notes
When switching to Go SDK 1.26+, we'll revert `$CI_RUNNER_DESCRIPTION`
because `msgo` 1.26+ will eliminate the conflict at the toolchain level
thanks to microsoft/go#1998.
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Mar 4, 2026
### What does this PR do?
Reapply #47007, reverted in #47083 following #incident-50242, but with
the following adjustments:
1. scope repository caches to individual jobs (`$CI_JOB_NAME`) rather
   than runner types (`$CI_RUNNER_DESCRIPTION`),
2. add `.cache/ms-go*` to the cached paths (neutral until `msgo` 1.26+).

### Motivation
#incident-50242 traced to FIPS and non-FIPS omnibus jobs racing to write
incompatible Go build artifacts to the same cache key: `msgo` tags
indeed compile objects with `X:systemcrypto` while upstream Go does not.

It turns out to be a **known issue**: microsoft/go#1994.

Until the corresponding fix is available (microsoft/go#1998), that is
when bumping the Go SDK version to 1.26+, the main adjustment consists
in temporarily scoping repository caches to jobs.
Per-job cache keys naturally segregate the two without requiring an
explicit FIPS discriminator (we couldn't rely on `$FLAVOR` because it's
not expanding consistently across jobs).

### Additional Notes
When switching to Go SDK 1.26+, we'll revert `$CI_RUNNER_DESCRIPTION`
because `msgo` 1.26+ will eliminate the conflict at the toolchain level
thanks to microsoft/go#1998.
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Mar 4, 2026
### What does this PR do?
Reapply #47007, reverted in #47083 following #incident-50242, but with
the following adjustments:
1. scope repository caches to individual jobs (`$CI_JOB_NAME`) rather
   than runner types (`$CI_RUNNER_DESCRIPTION`),
2. add `.cache/ms-go*` to the cached paths (neutral until `msgo` 1.26+).

### Motivation
#incident-50242 traced to FIPS and non-FIPS omnibus jobs racing to write
incompatible Go build artifacts to the same cache key: `msgo` tags
indeed compile objects with `X:systemcrypto` while upstream Go does not.

It turns out to be a **known issue**: microsoft/go#1994.

Until the corresponding fix is available (microsoft/go#1998), that is
when bumping the Go SDK version to 1.26+, the main adjustment consists
in temporarily scoping repository caches to jobs.
Per-job cache keys naturally segregate the two without requiring an
explicit FIPS discriminator (we couldn't rely on `$FLAVOR` because it's
not expanding consistently across jobs).

### Additional Notes
When switching to Go SDK 1.26+, we'll revert `$CI_RUNNER_DESCRIPTION`
because `msgo` 1.26+ will eliminate the conflict at the toolchain level
thanks to microsoft/go#1998.
gh-worker-dd-mergequeue-cf854d bot pushed a commit to DataDog/datadog-agent that referenced this pull request Mar 4, 2026
### What does this PR do?
Reapply #47007, reverted in #47083 following #incident-50242, but with the following adjustments:
1. scope repository caches to individual jobs (`$CI_JOB_NAME`) rather than runner types (`$CI_RUNNER_DESCRIPTION`),
2. add `.cache/ms-go*` to the cached paths (neutral until `msgo` 1.26+).

### Motivation
#incident-50242 traced to FIPS and non-FIPS omnibus jobs racing to write incompatible Go build artifacts to the same cache key: `msgo` tags indeed compile objects with `X:systemcrypto` while upstream Go does not.

It turns out to be a **known issue**: microsoft/go#1994.

Until the corresponding fix (microsoft/go#1998) is available, that is when bumping the Go SDK version to 1.26+, the main adjustment consists in temporarily scoping repository caches to jobs.
Per-job cache keys naturally segregate the two without requiring an explicit FIPS discriminator (we couldn't rely on `$FLAVOR` because it's not expanding consistently across jobs).

### Additional Notes
When switching to Go SDK 1.26+, we'll revert `$CI_RUNNER_DESCRIPTION` because `msgo` 1.26+ will eliminate the conflict at the toolchain level thanks to microsoft/go#1998.

Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
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.

Use a Microsoft-specific GOCACHE path

2 participants