Skip to content

Commit b430a2e

Browse files
authored
Merge branch 'master' into feature/godriver-3522-rawdata
2 parents b22781b + 6fcd9d3 commit b430a2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+391
-384
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -219,28 +219,6 @@ functions:
219219
HEAD_SHA: "${github_commit}"
220220
args: [*task-runner, api-report]
221221

222-
"add PR labels":
223-
- command: subprocess.exec
224-
type: test
225-
params:
226-
binary: bash
227-
add_expansions_to_env: true
228-
env:
229-
COMMIT: "${github_commit}"
230-
PR_TASK: apply-labels
231-
args: [*task-runner, pr-task]
232-
233-
"add PR reviewer":
234-
- command: subprocess.exec
235-
type: test
236-
params:
237-
binary: bash
238-
add_expansions_to_env: true
239-
env:
240-
COMMIT: "${github_commit}"
241-
PR_TASK: assign-reviewer
242-
args: [*task-runner, pr-task]
243-
244222
"backport pr":
245223
- command: subprocess.exec
246224
type: test
@@ -669,8 +647,6 @@ tasks:
669647
allowed_requesters: ["patch", "github_pr"]
670648
commands:
671649
- func: assume-test-secrets-ec2-role
672-
- func: "add PR reviewer"
673-
- func: "add PR labels"
674650
- func: "create-api-report"
675651

676652
- name: backport-pr

.github/labeler.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
21
priority-3-low:
32
- changed-files:
43
- any-glob-to-any-file: '*'
54

65
documentation:
76
- changed-files:
8-
- any-glob-to-any-file:
7+
- any-glob-to-any-file:
98
- docs/**
109
- examples/**
1110

1211
dependencies:
1312
- changed-files:
14-
- any-glob-to-any-file:
13+
- any-glob-to-any-file:
1514
- go.mod

.github/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@ changelog:
22
exclude:
33
labels:
44
- ignore-for-release
5+
- github_actions
56
- submodules
67
authors:
78
- mongodb-drivers-pr-bot
89
categories:
9-
- title: Breaking Changes 🛠
10+
- title: ⚠️ Breaking Changes
1011
labels:
11-
- breaking-change
12-
- title: New Features
12+
- breaking
13+
- title: New Features
1314
labels:
1415
- enhancement
15-
- title: Fixed
16+
- feature
17+
- title: 🐛 Fixed
1618
labels:
1719
- bug
18-
- fixed
19-
- title: Other Changes
20+
- title: 📦 Dependency Updates
21+
labels:
22+
- dependencies
23+
- title: 📝 Other Changes
2024
labels:
2125
- "*"

.github/reviewers.txt

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

.github/workflows/check-labels.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Label Checker
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
- labeled
9+
- unlabeled
10+
11+
jobs:
12+
check_labels:
13+
name: Check labels
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: docker://agilepathway/pull-request-label-checker:latest
17+
with:
18+
one_of: bug,feature,enhancement,documentation,dependencies
19+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/labeler.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
labeler:
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/labeler@v5

bson/benchmark_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ var nestedInstance = nestedtest1{
147147
const extendedBSONDir = "../testdata/extended_bson"
148148

149149
var (
150-
extJSONFiles map[string]map[string]interface{}
150+
extJSONFiles map[string]map[string]any
151151
extJSONFilesMu sync.Mutex
152152
)
153153

154154
// readExtJSONFile reads the GZIP-compressed extended JSON document from the given filename in the
155155
// "extended BSON" test data directory (../testdata/extended_bson) and returns it as a
156-
// map[string]interface{}. It panics on any errors.
157-
func readExtJSONFile(filename string) map[string]interface{} {
156+
// map[string]any. It panics on any errors.
157+
func readExtJSONFile(filename string) map[string]any {
158158
extJSONFilesMu.Lock()
159159
defer extJSONFilesMu.Unlock()
160160
if v, ok := extJSONFiles[filename]; ok {
@@ -182,14 +182,14 @@ func readExtJSONFile(filename string) map[string]interface{} {
182182
panic(fmt.Sprintf("error reading GZIP contents of file: %s", err))
183183
}
184184

185-
var v map[string]interface{}
185+
var v map[string]any
186186
err = UnmarshalExtJSON(data, false, &v)
187187
if err != nil {
188188
panic(fmt.Sprintf("error unmarshalling extended JSON: %s", err))
189189
}
190190

191191
if extJSONFiles == nil {
192-
extJSONFiles = make(map[string]map[string]interface{})
192+
extJSONFiles = make(map[string]map[string]any)
193193
}
194194
extJSONFiles[filename] = v
195195
return v

bson/bson_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func TestD_MarshalJSON(t *testing.T) {
305305
testcases := []struct {
306306
name string
307307
test D
308-
expected interface{}
308+
expected any
309309
}{
310310
{
311311
"nil",
@@ -329,21 +329,21 @@ func TestD_MarshalJSON(t *testing.T) {
329329
{"g", D{{"foo", "bar"}}},
330330
},
331331
struct {
332-
A int `json:"a"`
333-
B bool `json:"b"`
334-
C string `json:"c"`
335-
D interface{} `json:"d"`
336-
E float32 `json:"e"`
337-
F []interface{} `json:"f"`
338-
G map[string]interface{} `json:"g"`
332+
A int `json:"a"`
333+
B bool `json:"b"`
334+
C string `json:"c"`
335+
D any `json:"d"`
336+
E float32 `json:"e"`
337+
F []any `json:"f"`
338+
G map[string]any `json:"g"`
339339
}{
340340
A: 42,
341341
B: true,
342342
C: "answer",
343343
D: nil,
344344
E: 2.71828,
345-
F: []interface{}{42, true, "answer", nil, 2.71828},
346-
G: map[string]interface{}{"foo": "bar"},
345+
F: []any{42, true, "answer", nil, 2.71828},
346+
G: map[string]any{"foo": "bar"},
347347
},
348348
},
349349
}
@@ -400,7 +400,7 @@ func TestD_UnmarshalJSON(t *testing.T) {
400400
{"pi", 3.142},
401401
{"boolean", true},
402402
{"nothing", nil},
403-
{"list", []interface{}{"hello world", 3.142, false, nil, D{{"Lorem", "ipsum"}}}},
403+
{"list", []any{"hello world", 3.142, false, nil, D{{"Lorem", "ipsum"}}}},
404404
{"document", D{{"foo", "bar"}}},
405405
},
406406
},
@@ -453,7 +453,7 @@ func TestD_UnmarshalJSON(t *testing.T) {
453453
t.Run(tc.name, func(t *testing.T) {
454454
t.Parallel()
455455

456-
var a map[string]interface{}
456+
var a map[string]any
457457
want := json.Unmarshal([]byte(tc.test), &a)
458458
var b D
459459
got := json.Unmarshal([]byte(tc.test), &b)

bson/bsoncodec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ type DecodeContext struct {
107107
truncate bool
108108

109109
// defaultDocumentType specifies the Go type to decode top-level and nested BSON documents into. In particular, the
110-
// usage for this field is restricted to data typed as "interface{}" or "map[string]interface{}". If DocumentType is
110+
// usage for this field is restricted to data typed as "any" or "map[string]any". If DocumentType is
111111
// set to a type that a BSON document cannot be unmarshaled into (e.g. "string"), unmarshalling will result in an
112112
// error.
113113
defaultDocumentType reflect.Type

bson/bsoncodec_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ func ExampleValueDecoder() {
4343

4444
type llCodec struct {
4545
t *testing.T
46-
decodeval interface{}
47-
encodeval interface{}
46+
decodeval any
47+
encodeval any
4848
err error
4949
}
5050

51-
func (llc *llCodec) EncodeValue(_ EncodeContext, _ ValueWriter, i interface{}) error {
51+
func (llc *llCodec) EncodeValue(_ EncodeContext, _ ValueWriter, i any) error {
5252
if llc.err != nil {
5353
return llc.err
5454
}

0 commit comments

Comments
 (0)