Skip to content

Commit

Permalink
Disable code coverage redesign in CI (#22402)
Browse files Browse the repository at this point in the history
* Disable code coverage redesign in CI

Go 1.22 changed some code coverage internals which is causing some cases
to under-report coverage. Disabling for now until this is resolved.

* conditionally set env var

* tweak

* move to build matrix

* update test regex

* Add GOEXPERIMENT to live test matrix

* Swap matrix order for display name consistency

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
  • Loading branch information
jhendrixMSFT and benbp committed Feb 16, 2024
1 parent c752010 commit ec67edd
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-client-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ stages:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.22.0'
GOEXPERIMENT: nocoverageredesign
Windows_Go122:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.22.0'
GOEXPERIMENT: nocoverageredesign
pool:
name: $(pool.name)
vmImage: $(image.name)
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ stages:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.22.0'
GOEXPERIMENT: nocoverageredesign
Windows_Go122:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.22.0'
GOEXPERIMENT: nocoverageredesign
generate.bom: true
pool:
name: $(pool.name)
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-eng-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ stages:
pool.name: azsdk-pool-mms-ubuntu-2004-general
image.name: MMSUbuntu20.04
go.version: '1.22.0'
GOEXPERIMENT: nocoverageredesign
Windows_Go122:
pool.name: azsdk-pool-mms-win-2022-general
image.name: MMS2022
go.version: '1.22.0'
GOEXPERIMENT: nocoverageredesign
generate.bom: true
pool:
name: $(pool.name)
Expand Down
23 changes: 20 additions & 3 deletions eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,25 @@
},
"GoVersion": [
"1.18.10",
"1.21.7",
"1.22.0"
"1.21.7"
]
}
},
"include": [
{
"Agent": {
"ubuntu-20.04": {
"OSVmImage": "MMSUbuntu20.04",
"Pool": "azsdk-pool-mms-ubuntu-2004-general"
},
"windows-2022": {
"OSVmImage": "MMS2022",
"Pool": "azsdk-pool-mms-win-2022-general"
}
},
"GoVersion": [
"1.22.0"
],
"GOEXPERIMENT": "nocoverageredesign"
}
]
}
5 changes: 4 additions & 1 deletion sdk/internal/telemetry/telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ func TestFormat(t *testing.T) {
// * azsdk-go-azservicebus/v1.0.0 (go1.19.3; linux)
// * azsdk-go-azservicebus/v1.0.0 (go1.19; Windows_NT)
// * azsdk-go-azservicebus/v1.0.0 (go1.21rc3; linux)
// * azsdk-go-azservicebus/v1.0.0 (go1.22.0 X:nocoverageredesign; linux)
//
// The OS varies based on the actual platform but it's a small set.
re := `^azsdk-go-azservicebus/v1.0.0` +
` ` +
`\(` +
`go\d+\.\d+(|\.\d+|rc\d+); (Windows_NT|linux|freebsd)` +
`go\d+\.\d+(?:|\.\d+|rc\d+)(?:\s[a-zA-Z0-9|:]+)?; (?:Windows_NT|linux|freebsd)` +
`\)$`

require.Regexp(t, re, userAgent)
require.Regexp(t, re, "azsdk-go-azservicebus/v1.0.0 (go1.21rc3; linux)")
require.Regexp(t, re, "azsdk-go-azservicebus/v1.0.0 (go1.22.0 X:nocoverageredesign; linux)")
}

0 comments on commit ec67edd

Please sign in to comment.