Skip to content

Commit c33ede6

Browse files
authored
Merge branch 'master' into dependabot/go_modules/internal/cmd/benchmark/golang.org/x/net-0.23.0
2 parents 14cc658 + 9bda904 commit c33ede6

28 files changed

+952
-526
lines changed

.evergreen/config.yml

Lines changed: 216 additions & 299 deletions
Large diffs are not rendered by default.

.evergreen/setup-system.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export GOPATH="$GOPATH"
7272
export GOCACHE="$GOCACHE"
7373
export DRIVERS_TOOLS="$DRIVERS_TOOLS"
7474
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
75+
export MONGODB_BINARIES="$MONGODB_BINARIES"
7576
export PATH="$PATH"
7677
EOT
7778

.github/reviewers.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
qingyang-hu
22
matthewdale
33
prestonvasquez
4-
blink1073

Taskfile.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ tasks:
5555
status:
5656
- test -d install || test -d /cygdrive/c/libmongocrypt/bin
5757

58-
run-docker: bash etc/run_docker.sh
58+
run-docker: bash etc/run_docker.sh {{.CLI_ARGS}}
5959

6060
run-fuzz: bash etc/run-fuzz.sh
6161

6262
cherry-picker: bash etc/cherry-picker.sh
6363

64+
pr-task: bash etc/pr-task.sh
65+
6466
# Lint with various GOOS and GOARCH tasks to catch static analysis failures that may only affect
6567
# specific operating systems or architectures. For example, staticcheck will only check for 64-bit
6668
# alignment of atomically accessed variables on 32-bit architectures (see

etc/docker_entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export PATH="$MONGODB_BINARIES:$HOME/go/bin:$PATH"
1414
task setup-test
1515

1616
# Run the test.
17-
task evg-test
17+
task $TASKFILE_TARGET

etc/golangci-lint.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex
33

4+
# Keep this in sync with go version used in static-analysis Evergreen build variant.
45
GO_VERSION=1.22.8
56
GOLANGCI_LINT_VERSION=1.60.1
67

@@ -10,12 +11,13 @@ export GOOS=
1011
GOARCH_ORIG=${GOARCH:-}
1112
export GOARCH=
1213

13-
# Keep this in sync with go version used in static-analysis Evergreen build variant.
1414
go install golang.org/dl/go$GO_VERSION@latest
15-
go$GO_VERSION download
16-
PATH="$(go$GO_VERSION env GOROOT)/bin:$PATH"
15+
go${GO_VERSION} download
16+
GOROOT="$(go${GO_VERSION} env GOROOT)"
17+
PATH="$GOROOT/bin:$PATH"
1718
export PATH
18-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$GOLANGCI_LINT_VERSION
19+
export GOROOT
20+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v${GOLANGCI_LINT_VERSION}
1921

2022
export GOOS=$GOOS_ORIG
2123
export GOARCH=$GOARCH_ORIG

etc/pr-task.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
VARLIST=(
5+
PR_TASK
6+
COMMIT
7+
DRIVERS_TOOLS
8+
)
9+
10+
# Ensure that all variables required to run the test are set, otherwise throw
11+
# an error.
12+
for VARNAME in "${VARLIST[@]}"; do
13+
[[ -z "${!VARNAME:-}" ]] && echo "ERROR: $VARNAME not set" && exit 1;
14+
done
15+
16+
case $PR_TASK in
17+
apply-labels)
18+
CONFIG=$(pwd)/.github/labeler.yml
19+
SCRIPT="${DRIVERS_TOOLS}/.evergreen/github_app/apply-labels.sh"
20+
bash $SCRIPT -l $CONFIG -h $COMMIT -o "mongodb" -n "mongo-go-driver"
21+
;;
22+
assign-reviewer)
23+
CONFIG=$(pwd)/.github/reviewers.txt
24+
SCRIPT="${DRIVERS_TOOLS}/.evergreen/github_app/assign-reviewer.sh"
25+
bash $SCRIPT -p $CONFIG -h $COMMIT -o "mongodb" -n "mongo-go-driver"
26+
;;
27+
backport-pr)
28+
bash ${DRIVERS_TOOLS}/.evergreen/github_app/backport-pr.sh mongodb mongo-go-driver $COMMIT
29+
;;
30+
esac

etc/run-mongodb-aws-test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ set -o errexit # Exit the script with error if any of the commands fail
1313

1414
echo "Running MONGODB-AWS authentication tests"
1515

16+
if [ "$1" == "ec2" ] && [ "${SKIP_EC2_AUTH_TEST:-}" == "true" ]; then
17+
echo "This platform does not support the EC2 auth test, skipping..."
18+
exit 0
19+
fi
20+
21+
if [ "$1" == "web-identity" ] && [ "${SKIP_WEB_IDENTITY_AUTH_TEST:-}" == "true" ]; then
22+
echo "This platform does not support the web identity auth test, skipping..."
23+
exit 0
24+
fi
25+
1626
# Handle credentials and environment setup.
1727
. $DRIVERS_TOOLS/.evergreen/auth_aws/aws_setup.sh $1
1828

etc/setup-test.sh

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ case ${1:-} in
3939
atlas-connect)
4040
. $DRIVERS_TOOLS/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
4141
;;
42+
load-balancer)
43+
# Verify that the required LB URI expansions are set to ensure that the test runner can correctly connect to
44+
# the LBs.
45+
if [ -z "${SINGLE_MONGOS_LB_URI}" ]; then
46+
echo "SINGLE_MONGOS_LB_URI must be set for testing against LBs"
47+
exit 1
48+
fi
49+
if [ -z "${MULTI_MONGOS_LB_URI}" ]; then
50+
echo "MULTI_MONGOS_LB_URI must be set for testing against LBs"
51+
exit 1
52+
fi
53+
MONGODB_URI="${SINGLE_MONGOS_LB_URI}"
54+
LOAD_BALANCER="true"
55+
;;
4256
esac
4357

4458
# Handle encryption.
@@ -51,8 +65,8 @@ if [[ "${GO_BUILD_TAGS}" =~ cse ]]; then
5165
LD_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib64
5266

5367
if [ "$(uname -s)" = "Darwin" ]; then
54-
PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib/pkgconfig
55-
DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib
68+
PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib/pkgconfig
69+
DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib
5670
fi
5771

5872
if [ "${SKIP_CRYPT_SHARED_LIB:-''}" = "true" ]; then
@@ -116,6 +130,11 @@ if [ -n "${SERVERLESS:-}" ]; then
116130
echo "SERVERLESS_ATLAS_PASSWORD=$SERVERLESS_ATLAS_PASSWORD" >> .test.env
117131
fi
118132

133+
if [ -n "${LOAD_BALANCER:-}" ];then
134+
echo "SINGLE_MONGOS_LB_URI=${SINGLE_MONGOS_LB_URI}" >> .test.env
135+
echo "MULTI_MONGOS_LB_URI=${MULTI_MONGOS_LB_URI}" >> .test.env
136+
fi
137+
119138
# Add secrets to the test file.
120139
if [ -f "secrets-export.sh" ]; then
121140
while read p; do

internal/cmd/benchmark/go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ require (
4747
github.com/fuyufjh/splunk-hec-go v0.3.4-0.20190414090710-10df423a9f36 // indirect
4848
github.com/go-ole/go-ole v1.2.6 // indirect
4949
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
50-
github.com/golang/protobuf v1.5.2 // indirect
50+
github.com/golang/protobuf v1.5.3 // indirect
5151
github.com/golang/snappy v0.0.4 // indirect
5252
github.com/google/go-github v17.0.0+incompatible // indirect
5353
github.com/google/go-querystring v1.1.0 // indirect
@@ -80,14 +80,14 @@ require (
8080
go.mongodb.org/mongo-driver v1.12.1 // indirect
8181
golang.org/x/crypto v0.27.0 // indirect
8282
golang.org/x/net v0.23.0 // indirect
83-
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
83+
golang.org/x/oauth2 v0.7.0 // indirect
8484
golang.org/x/sync v0.8.0 // indirect
8585
golang.org/x/sys v0.25.0 // indirect
8686
golang.org/x/text v0.18.0 // indirect
8787
google.golang.org/appengine v1.6.7 // indirect
88-
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect
89-
google.golang.org/grpc v1.51.0 // indirect
90-
google.golang.org/protobuf v1.28.1 // indirect
88+
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
89+
google.golang.org/grpc v1.56.3 // indirect
90+
google.golang.org/protobuf v1.30.0 // indirect
9191
gopkg.in/yaml.v2 v2.4.0 // indirect
9292
gopkg.in/yaml.v3 v3.0.1 // indirect
9393
)

0 commit comments

Comments
 (0)