Skip to content

Commit f7b1951

Browse files
authored
Remove default sanitizers added in sdk/internal v1.6.0 (Azure#22872)
1 parent c99558a commit f7b1951

File tree

7 files changed

+10
-353
lines changed

7 files changed

+10
-353
lines changed

sdk/internal/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.7.1 (Unreleased)
3+
## 1.8.0 (Unreleased)
44

55
### Features Added
66

@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
* Removed default sanitizers added in v1.6.0 (the test proxy itself now includes these)
14+
1315
## 1.7.0 (2024-05-01)
1416

1517
### Features Added

sdk/internal/recording/default_sanitizers.go

Lines changed: 0 additions & 205 deletions
This file was deleted.

sdk/internal/recording/default_sanitizers_test.go

Lines changed: 0 additions & 124 deletions
This file was deleted.

sdk/internal/recording/recording.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"strconv"
2626
"strings"
2727
"sync"
28-
"sync/atomic"
2928
"testing"
3029
"time"
3130

@@ -79,12 +78,7 @@ const (
7978
Secret_Base64String VariableType = "secret_base64String"
8079
)
8180

82-
var (
83-
// defaultSanitizersSet tracks whether default sanitizers have been added (this would be neater with Go 1.19's atomic.Bool)
84-
defaultSanitizersSet int32
85-
86-
errUnsupportedAPI = errors.New("the vcr based test recording API isn't supported. Use the test proxy instead")
87-
)
81+
var errUnsupportedAPI = errors.New("the vcr based test recording API isn't supported. Use the test proxy instead")
8882

8983
// NewRecording initializes a new Recording instance
9084
func NewRecording(c TestContext, mode RecordMode) (*Recording, error) {
@@ -401,13 +395,6 @@ func Start(t *testing.T, pathToRecordings string, options *RecordingOptions) err
401395
return nil
402396
}
403397
}
404-
if recordMode == RecordingMode && atomic.CompareAndSwapInt32(&defaultSanitizersSet, 0, 1) {
405-
err := addSanitizers(defaultSanitizers, options)
406-
if err != nil {
407-
atomic.StoreInt32(&defaultSanitizersSet, 0)
408-
return err
409-
}
410-
}
411398
if options == nil {
412399
options = defaultOptions()
413400
}

0 commit comments

Comments
 (0)