From 525e29bf17d0a76a7c16aca58b58c8c51a8a8969 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 14 Jul 2023 15:35:08 -0500 Subject: [PATCH 01/29] PYTHON-3461 Test FaaS (AWS Lambda) Behavior Per Driver --- .gitignore | 4 + .pre-commit-config.yaml | 1 + test/lambda/README.md | 17 ++++ test/lambda/events/event.json | 62 ++++++++++++ test/lambda/mongodb/__init__.py | 0 test/lambda/mongodb/app.py | 139 +++++++++++++++++++++++++++ test/lambda/mongodb/requirements.txt | 2 + test/lambda/template.yaml | 45 +++++++++ 8 files changed, 270 insertions(+) create mode 100644 test/lambda/README.md create mode 100644 test/lambda/events/event.json create mode 100644 test/lambda/mongodb/__init__.py create mode 100644 test/lambda/mongodb/app.py create mode 100644 test/lambda/mongodb/requirements.txt create mode 100644 test/lambda/template.yaml diff --git a/.gitignore b/.gitignore index 269a7e7081..f9d2a39366 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,7 @@ mongocryptd.pid .idea/ .nova/ venv/ + +# AWS SAM generated +test/lambda/.aws-sam +test/lambda/env.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f19f15682c..44d9c78ba6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ repos: - id: check-case-conflict - id: check-toml - id: check-yaml + exclude: template.yaml - id: debug-statements - id: end-of-file-fixer exclude: WHEEL diff --git a/test/lambda/README.md b/test/lambda/README.md new file mode 100644 index 0000000000..bf44cb0d9a --- /dev/null +++ b/test/lambda/README.md @@ -0,0 +1,17 @@ +AWS Lambda Testing +------------------ + +Running locally +=============== + +Prerequisites: + +- AWS SAM CLI +- Docker daemon running + +Steps +===== + +- `sam build` from the `test/lambda`. + +- `sam local invoke --parameter-overrides "MongoDbUri=mongodb://127.0.0.1:27017"` diff --git a/test/lambda/events/event.json b/test/lambda/events/event.json new file mode 100644 index 0000000000..a6197dea6c --- /dev/null +++ b/test/lambda/events/event.json @@ -0,0 +1,62 @@ +{ + "body": "{\"message\": \"hello world\"}", + "resource": "/hello", + "path": "/hello", + "httpMethod": "GET", + "isBase64Encoded": false, + "queryStringParameters": { + "foo": "bar" + }, + "pathParameters": { + "proxy": "/path/to/resource" + }, + "stageVariables": { + "baz": "qux" + }, + "headers": { + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", + "Accept-Encoding": "gzip, deflate, sdch", + "Accept-Language": "en-US,en;q=0.8", + "Cache-Control": "max-age=0", + "CloudFront-Forwarded-Proto": "https", + "CloudFront-Is-Desktop-Viewer": "true", + "CloudFront-Is-Mobile-Viewer": "false", + "CloudFront-Is-SmartTV-Viewer": "false", + "CloudFront-Is-Tablet-Viewer": "false", + "CloudFront-Viewer-Country": "US", + "Host": "1234567890.execute-api.us-east-1.amazonaws.com", + "Upgrade-Insecure-Requests": "1", + "User-Agent": "Custom User Agent String", + "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", + "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", + "X-Forwarded-For": "127.0.0.1, 127.0.0.2", + "X-Forwarded-Port": "443", + "X-Forwarded-Proto": "https" + }, + "requestContext": { + "accountId": "123456789012", + "resourceId": "123456", + "stage": "prod", + "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", + "requestTime": "09/Apr/2015:12:34:56 +0000", + "requestTimeEpoch": 1428582896000, + "identity": { + "cognitoIdentityPoolId": null, + "accountId": null, + "cognitoIdentityId": null, + "caller": null, + "accessKey": null, + "sourceIp": "127.0.0.1", + "cognitoAuthenticationType": null, + "cognitoAuthenticationProvider": null, + "userArn": null, + "userAgent": "Custom User Agent String", + "user": null + }, + "path": "/prod/hello", + "resourcePath": "/hello", + "httpMethod": "POST", + "apiId": "1234567890", + "protocol": "HTTP/1.1" + } +} diff --git a/test/lambda/mongodb/__init__.py b/test/lambda/mongodb/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/lambda/mongodb/app.py b/test/lambda/mongodb/app.py new file mode 100644 index 0000000000..fed4e586b3 --- /dev/null +++ b/test/lambda/mongodb/app.py @@ -0,0 +1,139 @@ +""" +Lambda function for Python Driver testing + +Creates the client that is cached for all requests, subscribes to +relevant events, and forces the connection pool to get populated. +""" +import json +import os + +from pymongo import MongoClient +from pymongo.monitoring import ( + CommandListener, + ConnectionPoolListener, + ServerHeartbeatListener, +) + +open_connections = 0 +heartbeat_count = 0 +total_heartbeat_duration = 0 +total_commands = 0 +total_command_duration = 0 + + +class CommandHandler(CommandListener): + def started(self, event): + print("command started", event) + + def succeeded(self, event): + global total_commands, total_command_duration + total_commands += 1 + total_command_duration += event.duration_micros / 1e6 + print("command succeeded", event) + + def failed(self, event): + global total_commands, total_command_duration + total_commands += 1 + total_command_duration += event.duration_micros / 1e6 + print("command failed", event) + + +class ServerHeartbeatHandler(ServerHeartbeatListener): + def started(self, event): + print("server heartbeat started", event) + + def succeeded(self, event): + global heartbeat_count, total_heartbeat_duration + heartbeat_count += 1 + total_heartbeat_duration += event.duration + print("server heartbeat succeeded", event) + + def failed(self, event): + global heartbeat_count, total_heartbeat_duration + heartbeat_count += 1 + total_heartbeat_duration += event.duration + print("server heartbeat failed", event) + + +class ConnectionHandler(ConnectionPoolListener): + def connection_created(self, event): + global open_connections + open_connections += 1 + print("connection created") + + def connection_ready(self, event): + pass + + def connection_closed(self, event): + global open_connections + open_connections -= 1 + print("connection closed") + + def connection_check_out_started(self, event): + pass + + def connection_check_out_failed(self, event): + pass + + def connection_checked_out(self, event): + pass + + def connection_checked_in(self, event): + pass + + def pool_created(self, event): + pass + + def pool_ready(self, event): + pass + + def pool_cleared(self, event): + pass + + def pool_closed(self, event): + pass + + +listeners = [CommandHandler(), ServerHeartbeatHandler(), ConnectionHandler()] +client = MongoClient(os.environ["MONGODB_URI"], event_listeners=listeners) + + +# Populate the connection pool. +client.lambdaTest.list_collections() + +# Create the response to send back. +def create_response(): + return dict( + averageCommandDuration=total_command_duration / total_commands, + averageHeartbeatDuration=total_heartbeat_duration / heartbeat_count, + openConnections=open_connections, + heartbeatCount=heartbeat_count, + ) + + +# Reset the numbers. +def reset(): + global open_connections, heartbeat_count, total_heartbeat_duration, total_commands, total_command_duration + open_connections = 0 + heartbeat_count = 0 + total_heartbeat_duration = 0 + total_commands = 0 + total_command_duration = 0 + + +""" +The handler function itself performs an insert/delete and returns the +id of the document in play. +""" + + +def lambda_handler(event): + db = client.lambdaTest + collection = db.test + inserted_id = collection.insert_one({"n": 1}) + collection.delete_one({"_id": inserted_id}) + # Create the response and then reset the numbers. + response = json.dumps(create_response()) + reset() + + return dict(statusCode=200, body=response) diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt new file mode 100644 index 0000000000..eae0f08505 --- /dev/null +++ b/test/lambda/mongodb/requirements.txt @@ -0,0 +1,2 @@ +requests +pymongo diff --git a/test/lambda/template.yaml b/test/lambda/template.yaml new file mode 100644 index 0000000000..caabca0a0b --- /dev/null +++ b/test/lambda/template.yaml @@ -0,0 +1,45 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: AWS::Serverless-2016-10-31 +Description: > + Python driver lambda function test + +# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst +Globals: + Function: + Timeout: 30 + MemorySize: 128 + +Parameters: + MongoDbUri: + Type: String + Description: The MongoDB connection string. + +Resources: + MongoDBFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: mongodb/ + Environment: + Variables: + MONGODB_URI: !Ref MongoDbUri + Handler: app.lambda_handler + Runtime: python3.9 + Architectures: + - x86_64 + Events: + MongoDB: + Type: Api + Properties: + Path: /mongodb + Method: get + +Outputs: + MongoDBApi: + Description: "API Gateway endpoint URL for Prod stage for Hello World function" + Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" + MongoDBFunction: + Description: "Hello World Lambda Function ARN" + Value: !GetAtt MongoDBFunction.Arn + MongoDBFunctionIamRole: + Description: "Implicit IAM Role created for Hello World function" + Value: !GetAtt MongoDBFunctionRole.Arn From 0e82ac173fc11cf8ca0bd32c36d7fb91f2ec82e8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 14 Jul 2023 15:50:31 -0500 Subject: [PATCH 02/29] lint --- test/lambda/mongodb/app.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/lambda/mongodb/app.py b/test/lambda/mongodb/app.py index fed4e586b3..330b9ce63b 100644 --- a/test/lambda/mongodb/app.py +++ b/test/lambda/mongodb/app.py @@ -101,6 +101,7 @@ def pool_closed(self, event): # Populate the connection pool. client.lambdaTest.list_collections() + # Create the response to send back. def create_response(): return dict( @@ -121,13 +122,11 @@ def reset(): total_command_duration = 0 -""" -The handler function itself performs an insert/delete and returns the -id of the document in play. -""" - - def lambda_handler(event): + """ + The handler function itself performs an insert/delete and returns the + id of the document in play. + """ db = client.lambdaTest collection = db.test inserted_id = collection.insert_one({"n": 1}) From fae67e2eeeb9c3e77c7a70d0f7ecdd81e49d741f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 14 Jul 2023 16:23:27 -0500 Subject: [PATCH 03/29] add test and EG config --- .evergreen/config.yml | 50 +++++++++++++++++++++ .evergreen/run-deployed-lambda-aws-tests.sh | 4 ++ 2 files changed, 54 insertions(+) create mode 100644 .evergreen/run-deployed-lambda-aws-tests.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index cd6ff38031..b1407b725f 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1286,6 +1286,32 @@ task_groups: tasks: - testazurekms-task + - name: test_aws_lambda_task_group + setup_group: + - func: fetch source + - command: subprocess.exec + params: + working_dir: src + binary: bash + add_expansions_to_env: true + args: + - ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh + - command: expansions.update + params: + file: src/atlas-expansion.yml + teardown_group: + - command: subprocess.exec + params: + working_dir: src + binary: bash + add_expansions_to_env: true + args: + - ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh + setup_group_can_fail_task: true + setup_group_timeout_secs: 1800 + tasks: + - test-aws-lambda-deployed + tasks: # Wildcard task. Do you need to find out what tools are available and where? # Throw it here, and execute this task on all buildvariants @@ -1696,6 +1722,24 @@ tasks: vars: DATA_LAKE: "true" + - name: "test-aws-lambda-deployed" + commands: + - func: "install dependencies" + - command: ec2.assume_role + params: + role_arn: ${LAMBDA_AWS_ROLE_ARN} + duration_seconds: 3600 + - command: subprocess.exec + params: + working_dir: src + binary: bash + add_expansions_to_env: true + args: + - ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh + env: + TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda + AWS_REGION: us-east-1 + - name: test-ocsp-rsa-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] commands: @@ -3264,6 +3308,12 @@ buildvariants: batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README - testazurekms-fail-task +- name: rhel8-test-lambda + display_name: AWS Lambda handler tests + run_on: rhel84-large + tasks: + - name: test_aws_lambda_task_group + - name: Release display_name: Release batchtime: 20160 # 14 days diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh new file mode 100644 index 0000000000..34948e1edf --- /dev/null +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -o errexit # Exit the script with error if any of the commands fail + +. ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh From 8220e3b8b921b4c1cd5078e9c51f845ddb2f6266 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Jul 2023 16:59:54 -0500 Subject: [PATCH 04/29] clean up --- test/lambda/README.md | 6 ++---- test/lambda/mongodb/app.py | 4 ++++ test/lambda/mongodb/requirements.txt | 1 - test/lambda/run.sh | 5 +++++ 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 test/lambda/run.sh diff --git a/test/lambda/README.md b/test/lambda/README.md index bf44cb0d9a..55e2a9944e 100644 --- a/test/lambda/README.md +++ b/test/lambda/README.md @@ -9,9 +9,7 @@ Prerequisites: - AWS SAM CLI - Docker daemon running -Steps +Usage ===== -- `sam build` from the `test/lambda`. - -- `sam local invoke --parameter-overrides "MongoDbUri=mongodb://127.0.0.1:27017"` +- Run ``test.sh`` diff --git a/test/lambda/mongodb/app.py b/test/lambda/mongodb/app.py index 330b9ce63b..5154c4daa0 100644 --- a/test/lambda/mongodb/app.py +++ b/test/lambda/mongodb/app.py @@ -95,11 +95,14 @@ def pool_closed(self, event): listeners = [CommandHandler(), ServerHeartbeatHandler(), ConnectionHandler()] +print("Creating client") client = MongoClient(os.environ["MONGODB_URI"], event_listeners=listeners) # Populate the connection pool. +print("Connecting") client.lambdaTest.list_collections() +print("Connected") # Create the response to send back. @@ -127,6 +130,7 @@ def lambda_handler(event): The handler function itself performs an insert/delete and returns the id of the document in play. """ + print("initializing") db = client.lambdaTest collection = db.test inserted_id = collection.insert_one({"n": 1}) diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt index eae0f08505..de4887b562 100644 --- a/test/lambda/mongodb/requirements.txt +++ b/test/lambda/mongodb/requirements.txt @@ -1,2 +1 @@ -requests pymongo diff --git a/test/lambda/run.sh b/test/lambda/run.sh new file mode 100644 index 0000000000..1e46a2f14f --- /dev/null +++ b/test/lambda/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -o errexit # Exit the script with error if any of the commands fail + +sam build +sam local invoke --parameter-overrides "MongoDbUri=mongodb://192.168.65.1:27017" From a35f4e5ffdc96e89e0c65859ccd8dde6bdf996e0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Jul 2023 20:38:06 -0500 Subject: [PATCH 05/29] get the function working locally --- test/lambda/README.md | 1 + test/lambda/mongodb/app.py | 6 +++--- test/lambda/run.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 test/lambda/run.sh diff --git a/test/lambda/README.md b/test/lambda/README.md index 55e2a9944e..2581ca915c 100644 --- a/test/lambda/README.md +++ b/test/lambda/README.md @@ -12,4 +12,5 @@ Prerequisites: Usage ===== +- Start a local mongodb instance on port 27017 - Run ``test.sh`` diff --git a/test/lambda/mongodb/app.py b/test/lambda/mongodb/app.py index 5154c4daa0..223b15d1d0 100644 --- a/test/lambda/mongodb/app.py +++ b/test/lambda/mongodb/app.py @@ -125,7 +125,7 @@ def reset(): total_command_duration = 0 -def lambda_handler(event): +def lambda_handler(event, context): """ The handler function itself performs an insert/delete and returns the id of the document in play. @@ -133,8 +133,8 @@ def lambda_handler(event): print("initializing") db = client.lambdaTest collection = db.test - inserted_id = collection.insert_one({"n": 1}) - collection.delete_one({"_id": inserted_id}) + result = collection.insert_one({"n": 1}) + collection.delete_one({"_id": result.inserted_id}) # Create the response and then reset the numbers. response = json.dumps(create_response()) reset() diff --git a/test/lambda/run.sh b/test/lambda/run.sh old mode 100644 new mode 100755 index 1e46a2f14f..5f1980a5f9 --- a/test/lambda/run.sh +++ b/test/lambda/run.sh @@ -2,4 +2,4 @@ set -o errexit # Exit the script with error if any of the commands fail sam build -sam local invoke --parameter-overrides "MongoDbUri=mongodb://192.168.65.1:27017" +sam local invoke --docker-network host --parameter-overrides "MongoDbUri=mongodb://host.docker.internal:27017" From 8d0e455a22a38fcd95e76344c3301cd408ac208f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Jul 2023 10:19:12 -0500 Subject: [PATCH 06/29] add missing setup --- .evergreen/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b1407b725f..857adef9bd 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1289,6 +1289,7 @@ task_groups: - name: test_aws_lambda_task_group setup_group: - func: fetch source + - func: prepare resources - command: subprocess.exec params: working_dir: src @@ -1738,6 +1739,7 @@ tasks: - ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh env: TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda + LAMBDA_STACK_NAME: dbx-python-lambda AWS_REGION: us-east-1 - name: test-ocsp-rsa-valid-cert-server-staples From a7e3d583f0279784bff2f9f8d798f27a9e102a4d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Jul 2023 10:31:15 -0500 Subject: [PATCH 07/29] move variables to settings --- .evergreen/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 857adef9bd..4fe566ef82 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1739,8 +1739,6 @@ tasks: - ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh env: TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda - LAMBDA_STACK_NAME: dbx-python-lambda - AWS_REGION: us-east-1 - name: test-ocsp-rsa-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] From a9de555a27020f9789dfe56f8c45bbe6c2744bc6 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Jul 2023 22:08:04 -0500 Subject: [PATCH 08/29] add python 3.9 to path --- .evergreen/config.yml | 2 +- .evergreen/run-deployed-lambda-aws-tests.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4fe566ef82..7076fbbabb 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -3310,7 +3310,7 @@ buildvariants: - name: rhel8-test-lambda display_name: AWS Lambda handler tests - run_on: rhel84-large + run_on: rhel87-large tasks: - name: test_aws_lambda_task_group diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index 34948e1edf..02a587123e 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -1,4 +1,5 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail +export PATH="/opt/python/3.9/bin/python3:$PATH" . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh From b0db9d1ddaa6d86d6fc3b7cc550546973e113d1b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Jul 2023 22:24:20 -0500 Subject: [PATCH 09/29] fix path again --- .evergreen/run-deployed-lambda-aws-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index 02a587123e..ec0ecc39d3 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -1,5 +1,5 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail -export PATH="/opt/python/3.9/bin/python3:$PATH" +export PATH="/opt/python/3.9/bin:$PATH" . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh From a3940e3fab6ac202d56917328e90705bfc93f093 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Jul 2023 22:25:03 -0500 Subject: [PATCH 10/29] debug --- .evergreen/run-deployed-lambda-aws-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index ec0ecc39d3..ee90c99ba3 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -2,4 +2,5 @@ set -o errexit # Exit the script with error if any of the commands fail export PATH="/opt/python/3.9/bin:$PATH" +python --version . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh From dd59df7b1397e918e54adbcab701b0f4ca24fb4a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Jul 2023 23:59:12 -0500 Subject: [PATCH 11/29] set path --- .evergreen/config.yml | 1 + .evergreen/run-deployed-lambda-aws-tests.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 7076fbbabb..24167a3c59 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1739,6 +1739,7 @@ tasks: - ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh env: TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda + PATH: /opt/python/3.9/bin:$PATH - name: test-ocsp-rsa-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index ee90c99ba3..05b33b6b60 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -1,6 +1,5 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail -export PATH="/opt/python/3.9/bin:$PATH" python --version . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh From 3b78e3a94b4b62161d633d2a99d05594b1bce614 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 18 Jul 2023 00:16:32 -0500 Subject: [PATCH 12/29] fix path again --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 24167a3c59..61ac4f76dc 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1739,7 +1739,7 @@ tasks: - ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh env: TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda - PATH: /opt/python/3.9/bin:$PATH + PATH: /opt/python/3.9/bin:${PATH} - name: test-ocsp-rsa-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] From bcdc2c61711ebcf810b5434037b5f052665be912 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 18 Jul 2023 00:37:17 -0500 Subject: [PATCH 13/29] fix up script handling --- .evergreen/config.yml | 3 +-- .evergreen/run-deployed-lambda-aws-tests.sh | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 61ac4f76dc..74d7f46fa0 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1736,10 +1736,9 @@ tasks: binary: bash add_expansions_to_env: true args: - - ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh + - .evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh env: TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda - PATH: /opt/python/3.9/bin:${PATH} - name: test-ocsp-rsa-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index 05b33b6b60..270a8d332e 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -1,5 +1,6 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail +export PATH="/opt/python/3.9/bin:${PATH}" python --version . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh From bd1f6c8b4a9df62fc80d024fa4081c28c6d3d57b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 18 Jul 2023 00:51:16 -0500 Subject: [PATCH 14/29] fix path --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 74d7f46fa0..f5eab0e0f2 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1736,7 +1736,7 @@ tasks: binary: bash add_expansions_to_env: true args: - - .evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh + - .evergreen/run-deployed-lambda-aws-tests.sh env: TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/test/lambda From 23f77e582b98706f3c08997907787543c311bf12 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 18 Jul 2023 21:41:18 -0500 Subject: [PATCH 15/29] use local version of pymongo --- .evergreen/run-deployed-lambda-aws-tests.sh | 3 +++ .gitignore | 5 ++++- pymongo/mongo_client.py | 1 + test/lambda/build.sh | 17 +++++++++++++++++ test/lambda/build_internal.sh | 5 +++++ test/lambda/mongodb/app.py | 1 + test/lambda/mongodb/requirements.txt | 1 - 7 files changed, 31 insertions(+), 2 deletions(-) create mode 100755 test/lambda/build.sh create mode 100755 test/lambda/build_internal.sh diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index 270a8d332e..c6c3c018a6 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -3,4 +3,7 @@ set -o errexit # Exit the script with error if any of the commands fail export PATH="/opt/python/3.9/bin:${PATH}" python --version +pushd ./test/lambda +. build.sh +popd . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh diff --git a/.gitignore b/.gitignore index f9d2a39366..3096d460ba 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,9 @@ mongocryptd.pid .nova/ venv/ -# AWS SAM generated +# Lambda temp files test/lambda/.aws-sam test/lambda/env.json +test/lambda/mongodb/pymongo/* +test/lambda/mongodb/gridfs/* +test/lambda/mongodb/bson/* diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index 871c4545e5..47ce0431c5 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -694,6 +694,7 @@ def __init__( client.__my_database__ """ + raise ValueError("haha!") doc_class = document_class or dict self.__init_kwargs: Dict[str, Any] = { "host": host, diff --git a/test/lambda/build.sh b/test/lambda/build.sh new file mode 100755 index 0000000000..b8e6153199 --- /dev/null +++ b/test/lambda/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -o errexit # Exit the script with error if any of the commands fail + +rm -rf mongodb/pymongo +rm -rf mongodb/gridfs +rm -rf mongodb/bson + +pushd ../.. +rm -f pymongo/*.so +rm -f bson/*.so +image="quay.io/pypa/manylinux2014_x86_64:latest" +docker pull $image +docker run --rm -v "`pwd`:/src" $image /src/test/lambda/build_internal.sh +cp -r pymongo ./test/lambda/mongodb/pymongo +cp -r bson ./test/lambda/mongodb/bson +cp -r gridfs ./test/lambda/mongodb/gridfs +popd diff --git a/test/lambda/build_internal.sh b/test/lambda/build_internal.sh new file mode 100755 index 0000000000..fec488d32c --- /dev/null +++ b/test/lambda/build_internal.sh @@ -0,0 +1,5 @@ +#!/bin/bash -ex + +cd /src +PYTHON=/opt/python/cp39-cp39/bin/python +$PYTHON -m pip install -v -e . diff --git a/test/lambda/mongodb/app.py b/test/lambda/mongodb/app.py index 223b15d1d0..4801f4ee88 100644 --- a/test/lambda/mongodb/app.py +++ b/test/lambda/mongodb/app.py @@ -138,5 +138,6 @@ def lambda_handler(event, context): # Create the response and then reset the numbers. response = json.dumps(create_response()) reset() + print("finished!") return dict(statusCode=200, body=response) diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt index de4887b562..e69de29bb2 100644 --- a/test/lambda/mongodb/requirements.txt +++ b/test/lambda/mongodb/requirements.txt @@ -1 +0,0 @@ -pymongo From 153cca48bf68f7b3828933074a8b3a00fcc107f4 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 08:03:39 -0500 Subject: [PATCH 16/29] allow podman to work --- .evergreen/run-deployed-lambda-aws-tests.sh | 1 + test/lambda/build.sh | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index c6c3c018a6..d312991255 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -4,6 +4,7 @@ set -o errexit # Exit the script with error if any of the commands fail export PATH="/opt/python/3.9/bin:${PATH}" python --version pushd ./test/lambda + . build.sh popd . ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh diff --git a/test/lambda/build.sh b/test/lambda/build.sh index b8e6153199..16a4b61ccf 100755 --- a/test/lambda/build.sh +++ b/test/lambda/build.sh @@ -9,8 +9,18 @@ pushd ../.. rm -f pymongo/*.so rm -f bson/*.so image="quay.io/pypa/manylinux2014_x86_64:latest" -docker pull $image -docker run --rm -v "`pwd`:/src" $image /src/test/lambda/build_internal.sh + +DOCKER=$(command -v docker) || true +if [ -n "$DOCKER" ]; then + PODMAN=$(command -v podman) || true + if [ -n "$PODMAN" ]; then + echo "docker or podman are required!" + fi + DOCKER=podman +fi + +$DOCKER pull $image +$DOCKER run --rm -v "`pwd`:/src" $image /src/test/lambda/build_internal.sh cp -r pymongo ./test/lambda/mongodb/pymongo cp -r bson ./test/lambda/mongodb/bson cp -r gridfs ./test/lambda/mongodb/gridfs From 76a248be2f5afa017e2b7a535aa2092d0398bdee Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 08:19:01 -0500 Subject: [PATCH 17/29] remove pull command --- test/lambda/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test/lambda/build.sh b/test/lambda/build.sh index 16a4b61ccf..2f6e3c1cce 100755 --- a/test/lambda/build.sh +++ b/test/lambda/build.sh @@ -19,7 +19,6 @@ if [ -n "$DOCKER" ]; then DOCKER=podman fi -$DOCKER pull $image $DOCKER run --rm -v "`pwd`:/src" $image /src/test/lambda/build_internal.sh cp -r pymongo ./test/lambda/mongodb/pymongo cp -r bson ./test/lambda/mongodb/bson From 092a4aaf830e09d55836355bbe0dffe26ed084bf Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 08:46:55 -0500 Subject: [PATCH 18/29] add debug --- test/lambda/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/lambda/build.sh b/test/lambda/build.sh index 2f6e3c1cce..d5f4cbb0fd 100755 --- a/test/lambda/build.sh +++ b/test/lambda/build.sh @@ -1,5 +1,6 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail +set -o xtrace rm -rf mongodb/pymongo rm -rf mongodb/gridfs @@ -15,6 +16,7 @@ if [ -n "$DOCKER" ]; then PODMAN=$(command -v podman) || true if [ -n "$PODMAN" ]; then echo "docker or podman are required!" + exit 1 fi DOCKER=podman fi From 03fd67fe2f92e8c398d43e2fa652ad451e6741c9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 09:02:37 -0500 Subject: [PATCH 19/29] fix logic --- test/lambda/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lambda/build.sh b/test/lambda/build.sh index d5f4cbb0fd..c7cc24eab2 100755 --- a/test/lambda/build.sh +++ b/test/lambda/build.sh @@ -12,9 +12,9 @@ rm -f bson/*.so image="quay.io/pypa/manylinux2014_x86_64:latest" DOCKER=$(command -v docker) || true -if [ -n "$DOCKER" ]; then +if [ -z "$DOCKER" ]; then PODMAN=$(command -v podman) || true - if [ -n "$PODMAN" ]; then + if [ -z "$PODMAN" ]; then echo "docker or podman are required!" exit 1 fi From 3a788a72e70ddfe5c19fd413a52b4750b1e231d9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 09:09:45 -0500 Subject: [PATCH 20/29] remove debug error raise --- pymongo/mongo_client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index 47ce0431c5..871c4545e5 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -694,7 +694,6 @@ def __init__( client.__my_database__ """ - raise ValueError("haha!") doc_class = document_class or dict self.__init_kwargs: Dict[str, Any] = { "host": host, From 5ec0197f9b466f1bf54ea236f4c19f4aec889f7b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 09:29:55 -0500 Subject: [PATCH 21/29] update readme --- test/lambda/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lambda/README.md b/test/lambda/README.md index 2581ca915c..2727a2cee9 100644 --- a/test/lambda/README.md +++ b/test/lambda/README.md @@ -13,4 +13,5 @@ Usage ===== - Start a local mongodb instance on port 27017 +- Run ``build.sh`` - Run ``test.sh`` From e1244092e80e57d0cba850e1d6fc5ee564e3d34c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 19 Jul 2023 09:32:16 -0500 Subject: [PATCH 22/29] clean up template --- test/lambda/template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lambda/template.yaml b/test/lambda/template.yaml index caabca0a0b..ff87ace6d7 100644 --- a/test/lambda/template.yaml +++ b/test/lambda/template.yaml @@ -35,11 +35,11 @@ Resources: Outputs: MongoDBApi: - Description: "API Gateway endpoint URL for Prod stage for Hello World function" + Description: "API Gateway endpoint URL for Prod stage for Python driver lambda function" Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" MongoDBFunction: - Description: "Hello World Lambda Function ARN" + Description: "Python driver lambda Function ARN" Value: !GetAtt MongoDBFunction.Arn MongoDBFunctionIamRole: - Description: "Implicit IAM Role created for Hello World function" + Description: "Implicit IAM Role created for Python driver lambda function" Value: !GetAtt MongoDBFunctionRole.Arn From 090f698d6968ca486e37b51832d0519a1878a08e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 25 Jul 2023 06:25:46 -0500 Subject: [PATCH 23/29] address review --- .evergreen/config.yml | 4 ++-- test/lambda/mongodb/app.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index f5eab0e0f2..877c45121b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -98,7 +98,7 @@ functions: # If this was a patch build, doing a fresh clone would not actually test the patch cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS else - git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS + git clone -b DRIVERS-2384 https://github.com/blink1073/drivers-evergreen-tools.git $DRIVERS_TOOLS fi echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config @@ -3310,7 +3310,7 @@ buildvariants: - name: rhel8-test-lambda display_name: AWS Lambda handler tests - run_on: rhel87-large + run_on: rhel87-small tasks: - name: test_aws_lambda_task_group diff --git a/test/lambda/mongodb/app.py b/test/lambda/mongodb/app.py index 4801f4ee88..66c2164672 100644 --- a/test/lambda/mongodb/app.py +++ b/test/lambda/mongodb/app.py @@ -7,7 +7,9 @@ import json import os +from bson import has_c as has_bson_c from pymongo import MongoClient +from pymongo import has_c as has_pymongo_c from pymongo.monitoring import ( CommandListener, ConnectionPoolListener, @@ -20,6 +22,10 @@ total_commands = 0 total_command_duration = 0 +# Ensure we are using C extensions +assert has_bson_c() +assert has_pymongo_c() + class CommandHandler(CommandListener): def started(self, event): From a3bb16b9279afa50bb119c59e9a66b0c32e5abf7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 25 Jul 2023 09:22:52 -0500 Subject: [PATCH 24/29] add missing dep --- test/lambda/mongodb/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt index e69de29bb2..2f73596797 100644 --- a/test/lambda/mongodb/requirements.txt +++ b/test/lambda/mongodb/requirements.txt @@ -0,0 +1 @@ +dnspython From 0c7a2e2ae2a2c7c8194d2d287cb7df169035874f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 26 Jul 2023 04:08:41 -0500 Subject: [PATCH 25/29] fix handling of so files --- test/lambda/mongodb/Makefile | 3 +++ test/lambda/mongodb/requirements.txt | 1 - test/lambda/template.yaml | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/lambda/mongodb/Makefile delete mode 100644 test/lambda/mongodb/requirements.txt diff --git a/test/lambda/mongodb/Makefile b/test/lambda/mongodb/Makefile new file mode 100644 index 0000000000..75998972e5 --- /dev/null +++ b/test/lambda/mongodb/Makefile @@ -0,0 +1,3 @@ + +build-MongoDBFunction: + cp -r . $(ARTIFACTS_DIR) diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt deleted file mode 100644 index 2f73596797..0000000000 --- a/test/lambda/mongodb/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -dnspython diff --git a/test/lambda/template.yaml b/test/lambda/template.yaml index ff87ace6d7..651ac4a8f8 100644 --- a/test/lambda/template.yaml +++ b/test/lambda/template.yaml @@ -32,6 +32,10 @@ Resources: Properties: Path: /mongodb Method: get + # Use a custom build method to make sure *.so files are copied. + # https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/building-custom-runtimes.html + Metadata: + BuildMethod: makefile Outputs: MongoDBApi: From b55315b65d73fbb372475901dbb03b3a5be2e9cc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 26 Jul 2023 04:29:14 -0500 Subject: [PATCH 26/29] add missing dep --- test/lambda/mongodb/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/lambda/mongodb/requirements.txt diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt new file mode 100644 index 0000000000..2f73596797 --- /dev/null +++ b/test/lambda/mongodb/requirements.txt @@ -0,0 +1 @@ +dnspython From adb246a24eeee221749b1bc9c188564cec72aafc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 26 Jul 2023 04:55:55 -0500 Subject: [PATCH 27/29] fix install --- test/lambda/mongodb/Makefile | 1 + test/lambda/mongodb/requirements.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 test/lambda/mongodb/requirements.txt diff --git a/test/lambda/mongodb/Makefile b/test/lambda/mongodb/Makefile index 75998972e5..3632dfb161 100644 --- a/test/lambda/mongodb/Makefile +++ b/test/lambda/mongodb/Makefile @@ -1,3 +1,4 @@ build-MongoDBFunction: cp -r . $(ARTIFACTS_DIR) + python -m pip install -t $(ARTIFACTS_DIR) dnspython diff --git a/test/lambda/mongodb/requirements.txt b/test/lambda/mongodb/requirements.txt deleted file mode 100644 index 2f73596797..0000000000 --- a/test/lambda/mongodb/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -dnspython From 809ff6d4ad26a7eb8fe054f694aad8da634a35d2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 3 Aug 2023 18:19:29 -0500 Subject: [PATCH 28/29] use updated path --- .evergreen/run-deployed-lambda-aws-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-deployed-lambda-aws-tests.sh b/.evergreen/run-deployed-lambda-aws-tests.sh index d312991255..aa16d62650 100644 --- a/.evergreen/run-deployed-lambda-aws-tests.sh +++ b/.evergreen/run-deployed-lambda-aws-tests.sh @@ -7,4 +7,4 @@ pushd ./test/lambda . build.sh popd -. ${DRIVERS_TOOLS}/.evergreen/run-deployed-lambda-aws-tests.sh +. ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh From 969bb07ecfb6efcf9f976c31a436a00fcdc52e13 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 11 Aug 2023 08:27:28 -0500 Subject: [PATCH 29/29] use final script versions --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 877c45121b..9c112dbaaa 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -98,7 +98,7 @@ functions: # If this was a patch build, doing a fresh clone would not actually test the patch cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS else - git clone -b DRIVERS-2384 https://github.com/blink1073/drivers-evergreen-tools.git $DRIVERS_TOOLS + git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS fi echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config