From 6c39f4fb4105727d4cdc62ba45668db50119bc42 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Date: Mon, 16 Oct 2023 15:13:03 +0200 Subject: [PATCH 1/2] Updated README.md for highlighting Go syntax (#1426) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f10fa3be4c..82d0a7ba5e 100644 --- a/README.md +++ b/README.md @@ -162,12 +162,12 @@ The Go Driver supports the following compression algorithms: Compression can be enabled using the `compressors` parameter on the connection string or by using [`ClientOptions.SetCompressors`](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo/options#ClientOptions.SetCompressors): -``` +```go opts := options.Client().ApplyURI("mongodb://localhost:27017/?compressors=snappy,zlib,zstd") client, _ := mongo.Connect(context.TODO(), opts) ``` -``` +```go opts := options.Client().SetCompressors([]string{"snappy", "zlib", "zstd"}) client, _ := mongo.Connect(context.TODO(), opts) ``` From 0bb308c1a49601408f02fd62d2f2fe3df3199add Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 16 Oct 2023 14:39:42 -0500 Subject: [PATCH 2/2] GODRIVER-3010 Update ECS Test to use Ubuntu 20.04 (#1422) --- .evergreen/config.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 27c450279c..5acc1b82d7 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -733,7 +733,7 @@ functions: "iam_auth_ecs_secret_access_key" : "${iam_auth_ecs_secret_access_key}", "iam_auth_ecs_account_arn": "arn:aws:iam::557821124784:user/authtest_fargate_user", "iam_auth_ecs_cluster": "${iam_auth_ecs_cluster}", - "iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition}", + "iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition_ubuntu2004}", "iam_auth_ecs_subnet_a": "${iam_auth_ecs_subnet_a}", "iam_auth_ecs_subnet_b": "${iam_auth_ecs_subnet_b}", "iam_auth_ecs_security_group": "${iam_auth_ecs_security_group}", @@ -770,7 +770,7 @@ functions: silent: true script: | cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" - alias urlencode='python -c "import sys, urllib as ul; sys.stdout.write(ul.quote_plus(sys.argv[1]))"' + alias urlencode='python3 -c "import sys, urllib.parse as ulp; sys.stdout.write(ulp.quote_plus(sys.argv[1]))"' USER=$(urlencode ${iam_auth_ecs_account}) PASS=$(urlencode ${iam_auth_ecs_secret_access_key}) MONGODB_URI="mongodb://$USER:$PASS@localhost" @@ -804,8 +804,8 @@ functions: script: | # DO NOT ECHO WITH XTRACE cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" - alias urlencode='python -c "import sys, urllib as ul; sys.stdout.write(ul.quote_plus(sys.argv[1]))"' - alias jsonkey='python -c "import json,sys;sys.stdout.write(json.load(sys.stdin)[sys.argv[1]])" < ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json' + alias urlencode='python3 -c "import sys, urllib.parse as ulp; sys.stdout.write(ulp.quote_plus(sys.argv[1]))"' + alias jsonkey='python3 -c "import json,sys;sys.stdout.write(json.load(sys.stdin)[sys.argv[1]])" < ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json' USER=$(jsonkey AccessKeyId) USER=$(urlencode $USER) PASS=$(jsonkey SecretAccessKey) @@ -2387,11 +2387,9 @@ axes: GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin" GO_DIST: "C:\\golang\\go1.20" SKIP_ECS_AUTH_TEST: true - # TODO(BUILD-17329): Update this to Ubuntu 22 after we add a new ECS task - # definition. - - id: "ubuntu1804-64-go-1-20" - display_name: "Ubuntu 18.04" - run_on: ubuntu1804-test + - id: "ubuntu2004-64-go-1-20" + display_name: "Ubuntu 20.04" + run_on: ubuntu2004-test variables: GO_DIST: "/opt/golang/go1.20" - id: "macos11-go-1-20"