Skip to content

Commit 49d4409

Browse files
committed
Resolve conflicts in master
* master: (65 commits) Replace all uses of 'interface{}' with 'any' in the bson package. (#2138) GODRIVER-3473 Short-cicruit cursor.next() on invalid timeouts (#2135) GODRIVER-3622 Automatically retry some test tasks. (#2147) Replace all uses of 'interface{}' with 'any' in the repo docs. (#2142) GODRIVER-3102: Perf comparison (#2134) GODRIVER-3587 Use raw bytes in valueReader (#2120) Replace all uses of 'interface{}' with 'any' in the internal/ packages. (#2140) Replace all uses of 'interface{}' with 'any' in the x/ packages. (#2137) GODRIVER-2016 Unskip all Transactions unified spec tests. (#2132) GODRIVER-2540 Run govulncheck in CI builds. (#2136) GODRIVER-3549 Update Client BulkWrite prose tests. (#2131) Add guidelines for contributing features to the Go Driver (#2125) Bump alcaeus/automatic-merge-up-action from 1.0.0 to 1.0.1 in the actions group (#2126) Add wrappedMsgOnly to mongo.MarshalError and mongo.MongocryptError. Bump testdata/specifications from `db69351` to `6689929` fix wiremessage oob in case of intmin (#2076) GODRIVER-3399: PoolClearedError should have TransientTransactionError label appended to it (#2114) PR feedback. Prevent integration tests from running when testing with -short Skip AWS Test if no URI (#2102) ...
2 parents 2017dfe + 184e7b2 commit 49d4409

File tree

2,136 files changed

+6145
-388738
lines changed

Some content is hidden

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

2,136 files changed

+6145
-388738
lines changed

.evergreen/config.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ functions:
195195

196196
run-tests:
197197
- command: subprocess.exec
198-
type: test
199198
params:
200199
binary: bash
201200
env:
@@ -204,6 +203,7 @@ functions:
204203
args: [*task-runner, setup-test]
205204
- command: subprocess.exec
206205
type: test
206+
retry_on_failure: true
207207
params:
208208
binary: bash
209209
args: [*task-runner, "${DEFAULT_TASK}" ]
@@ -263,12 +263,21 @@ functions:
263263
echo "Response Body: $response_body"
264264
echo "HTTP Status: $http_status"
265265
266+
send-perf-pr-comment:
267+
- command: subprocess.exec
268+
type: test
269+
params:
270+
binary: bash
271+
env:
272+
VERSION_ID: ${version_id}
273+
include_expansions_in_env: [PERF_URI_PRIVATE_ENDPOINT]
274+
args: [*task-runner, perf-pr-comment]
275+
266276
run-enterprise-auth-tests:
267277
- command: ec2.assume_role
268278
params:
269279
role_arn: "${aws_test_secrets_role}"
270280
- command: subprocess.exec
271-
type: test
272281
params:
273282
binary: bash
274283
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
@@ -277,6 +286,7 @@ functions:
277286
args: [*task-runner, setup-test]
278287
- command: subprocess.exec
279288
type: test
289+
retry_on_failure: true
280290
params:
281291
binary: bash
282292
args: [*task-runner, --silent, evg-test-enterprise-auth]
@@ -286,7 +296,6 @@ functions:
286296
params:
287297
role_arn: "${aws_test_secrets_role}"
288298
- command: subprocess.exec
289-
type: test
290299
params:
291300
binary: bash
292301
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
@@ -295,6 +304,7 @@ functions:
295304
args: [*task-runner, setup-test]
296305
- command: subprocess.exec
297306
type: test
307+
retry_on_failure: true
298308
params:
299309
binary: bash
300310
args: [*task-runner, --silent, evg-test-enterprise-auth]
@@ -304,7 +314,6 @@ functions:
304314
params:
305315
role_arn: "${aws_test_secrets_role}"
306316
- command: subprocess.exec
307-
type: test
308317
params:
309318
binary: bash
310319
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
@@ -313,13 +322,13 @@ functions:
313322
args: [*task-runner, setup-test]
314323
- command: subprocess.exec
315324
type: test
325+
retry_on_failure: true
316326
params:
317327
binary: bash
318328
args: [*task-runner, test-atlas-connect]
319329

320330
run-ocsp-test:
321331
- command: subprocess.exec
322-
type: test
323332
params:
324333
binary: bash
325334
env:
@@ -330,14 +339,14 @@ functions:
330339
args: [*task-runner, setup-test]
331340
- command: subprocess.exec
332341
type: test
342+
retry_on_failure: true
333343
params:
334344
binary: bash
335345
include_expansions_in_env: [OCSP_TLS_SHOULD_SUCCEED]
336346
args: [*task-runner, evg-test-ocsp]
337347

338348
run-versioned-api-test:
339349
- command: subprocess.exec
340-
type: test
341350
params:
342351
binary: bash
343352
env:
@@ -347,13 +356,13 @@ functions:
347356
args: [*task-runner, setup-test]
348357
- command: subprocess.exec
349358
type: test
359+
retry_on_failure: true
350360
params:
351361
binary: bash
352362
args: [*task-runner, evg-test-versioned-api]
353363

354364
run-load-balancer-tests:
355365
- command: subprocess.exec
356-
type: test
357366
params:
358367
binary: bash
359368
include_expansions_in_env: [SINGLE_MONGOS_LB_URI, MULTI_MONGOS_LB_URI, AUTH, SSL, MONGO_GO_DRIVER_COMPRESSOR]
@@ -362,13 +371,13 @@ functions:
362371
args: [*task-runner, setup-test]
363372
- command: subprocess.exec
364373
type: test
374+
retry_on_failure: true
365375
params:
366376
binary: bash
367377
args: [*task-runner, evg-test-load-balancers]
368378

369379
run-atlas-data-lake-test:
370380
- command: subprocess.exec
371-
type: test
372381
params:
373382
binary: "bash"
374383
env:
@@ -379,6 +388,7 @@ functions:
379388
args: [*task-runner, setup-test]
380389
- command: subprocess.exec
381390
type: test
391+
retry_on_failure: true
382392
params:
383393
binary: "bash"
384394
args: [*task-runner, evg-test-atlas-data-lake]
@@ -550,7 +560,6 @@ functions:
550560

551561
run-kms-tls-test:
552562
- command: subprocess.exec
553-
type: test
554563
params:
555564
binary: "bash"
556565
env:
@@ -560,14 +569,14 @@ functions:
560569
args: [*task-runner, setup-test]
561570
- command: subprocess.exec
562571
type: test
572+
retry_on_failure: true
563573
params:
564574
binary: "bash"
565575
include_expansions_in_env: [KMS_TLS_TESTCASE]
566576
args: [*task-runner, evg-test-kms]
567577

568578
run-kmip-tests:
569579
- command: subprocess.exec
570-
type: test
571580
params:
572581
binary: "bash"
573582
env:
@@ -577,6 +586,7 @@ functions:
577586
args: [*task-runner, setup-test]
578587
- command: subprocess.exec
579588
type: test
589+
retry_on_failure: true
580590
params:
581591
binary: "bash"
582592
env:
@@ -585,7 +595,6 @@ functions:
585595

586596
run-retry-kms-requests:
587597
- command: subprocess.exec
588-
type: test
589598
params:
590599
binary: "bash"
591600
env:
@@ -595,6 +604,7 @@ functions:
595604
args: [*task-runner, setup-test]
596605
- command: subprocess.exec
597606
type: test
607+
retry_on_failure: true
598608
params:
599609
binary: "bash"
600610
env:
@@ -625,6 +635,14 @@ tasks:
625635
binary: bash
626636
args: [*task-runner, check-fmt, check-license, check-modules, lint]
627637

638+
- name: govulncheck
639+
tags: ["static-analysis"]
640+
commands:
641+
- command: subprocess.exec
642+
params:
643+
binary: bash
644+
args: [*task-runner, govulncheck]
645+
628646
- name: pull-request-helpers
629647
allowed_requesters: ["patch", "github_pr"]
630648
commands:
@@ -652,6 +670,7 @@ tasks:
652670
binary: bash
653671
args: [*task-runner, driver-benchmark]
654672
- func: send-perf-data
673+
- func: send-perf-pr-comment
655674

656675
- name: test-standalone-noauth-nossl
657676
tags: ["test", "standalone"]

.github/workflows/merge-up.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Create pull request
2929
id: create-pull-request
30-
uses: alcaeus/[email protected].0
30+
uses: alcaeus/[email protected].1
3131
with:
3232
ref: ${{ github.ref_name }}
3333
branchNamePattern: 'release/<major>.<minor>'

.github/workflows/scorecard.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '24 21 * * 1'
14+
push:
15+
branches: [ "master" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
25+
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
26+
permissions:
27+
# Needed to upload the results to code-scanning dashboard.
28+
security-events: write
29+
# Needed to publish results and get a badge (see publish_results below).
30+
id-token: write
31+
# Uncomment the permissions below if installing in a private repository.
32+
# contents: read
33+
# actions: read
34+
35+
steps:
36+
- name: "Checkout code"
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
with:
39+
persist-credentials: false
40+
41+
- name: "Run analysis"
42+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
43+
with:
44+
results_file: results.sarif
45+
results_format: sarif
46+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
47+
# - you want to enable the Branch-Protection check on a *public* repository, or
48+
# - you are installing Scorecard on a *private* repository
49+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
50+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
51+
52+
# Public repositories:
53+
# - Publish results to OpenSSF REST API for easy access by consumers
54+
# - Allows the repository to include the Scorecard badge.
55+
# - See https://github.com/ossf/scorecard-action#publishing-results.
56+
# For private repositories:
57+
# - `publish_results` will always be set to `false`, regardless
58+
# of the value entered here.
59+
publish_results: true
60+
61+
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
62+
# file_mode: git
63+
64+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
65+
# format to the repository Actions tab.
66+
- name: "Upload artifact"
67+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
68+
with:
69+
name: SARIF file
70+
path: results.sarif
71+
retention-days: 5
72+
73+
# Upload the results to GitHub's code scanning dashboard (optional).
74+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
75+
- name: "Upload to code-scanning"
76+
uses: github/codeql-action/upload-sarif@v3
77+
with:
78+
sarif_file: results.sarif

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,9 @@ repos:
6565
require_serial: true
6666
pass_filenames: false
6767
entry: etc/golangci-lint.sh
68+
69+
- id: check-licenses
70+
name: check-licenses
71+
language: system
72+
types: [go]
73+
entry: etc/check_license.sh

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo"><img src="etc/assets/godev-mongo-blue.svg" alt="docs"></a>
55
<a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/bson"><img src="etc/assets/godev-bson-blue.svg" alt="docs"></a>
66
<a href="https://www.mongodb.com/docs/drivers/go/current/"><img src="etc/assets/docs-mongodb-green.svg"></a>
7+
<a href="https://securityscorecards.dev/viewer/?uri=github.com/mongodb/mongo-go-driver">
8+
<img src="https://api.securityscorecards.dev/projects/github.com/mongodb/mongo-go-driver/badge" alt="OpenSSF Scorecard" />
9+
</a>
710
</p>
811

912
# MongoDB Go Driver
@@ -15,9 +18,11 @@ See the following resources to learn more about upgrading from version 1.x to 2.
1518
- [v2.0 Migration Guide](docs/migration-2.0.md)
1619
- [v2.0 What's New](https://www.mongodb.com/docs/drivers/go/upcoming/whats-new/#what-s-new-in-2.0)
1720

21+
The MongoDB Go driver follows [semantic versioning](https://semver.org/) for its releases.
22+
1823
## Requirements
1924

20-
- Go 1.18 or higher. We aim to support the latest versions of Go.
25+
- Go 1.19 or higher. We aim to support the latest versions of Go.
2126
- Go 1.23 or higher is required to run the driver test suite.
2227
- MongoDB 4.0 and higher.
2328

Taskfile.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tasks:
3434

3535
build-compile-check-all: bash etc/run-compile-check-test.sh
3636

37-
build-aws-ecs-test: go build ${BUILD_TAGS} ./internal/cmd/testaws/main.go
37+
build-aws-ecs-test: go test -c ./internal/test/aws -o aws.testbin
3838

3939
cross-compile:
4040
- GOOS=linux GOARCH=386 go build ./...
@@ -70,6 +70,8 @@ tasks:
7070

7171
pr-task: bash etc/pr-task.sh
7272

73+
perf-pr-comment: bash etc/perf-pr-comment.sh
74+
7375
# Lint with various GOOS and GOARCH tasks to catch static analysis failures that may only affect
7476
# specific operating systems or architectures. For example, staticcheck will only check for 64-bit
7577
# alignment of atomically accessed variables on 32-bit architectures (see
@@ -83,6 +85,8 @@ tasks:
8385
- GOOS=linux GOARCH=ppc64le etc/golangci-lint.sh
8486
- GOOS=linux GOARCH=s390x etc/golangci-lint.sh
8587

88+
govulncheck: bash etc/govulncheck.sh
89+
8690
update-notices: bash etc/generate_notices.pl > THIRD-PARTY-NOTICES
8791

8892
### Local testing tasks. ###

0 commit comments

Comments
 (0)