Skip to content

Commit

Permalink
Merge branch 'master' into PYTHON-4851
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahStapp authored Dec 2, 2024
2 parents af09be1 + bc66598 commit ed0b008
Show file tree
Hide file tree
Showing 46 changed files with 46 additions and 83 deletions.
Empty file modified .evergreen/combine-coverage.sh
100644 → 100755
Empty file.
99 changes: 32 additions & 67 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ functions:
# Applies the subitted patch, if any
# Deprecated. Should be removed. But still needed for certain agents (ZAP)
- command: git.apply_patch

"setup system":
# Make an evergreen expansion file with dynamic values
- command: subprocess.exec
params:
Expand All @@ -49,13 +51,19 @@ functions:
- command: expansions.update
params:
file: src/expansion.yml

"prepare resources":
- command: subprocess.exec
params:
include_expansions_in_env: ["PROJECT_DIRECTORY", "DRIVERS_TOOLS"]
binary: bash
args:
- src/.evergreen/scripts/prepare-resources.sh
# Run drivers-evergreen-tools system setup
- command: subprocess.exec
params:
include_expansions_in_env: ["PROJECT_DIRECTORY", "DRIVERS_TOOLS"]
binary: bash
args:
- ${DRIVERS_TOOLS}/.evergreen/setup.sh

"upload coverage" :
- command: ec2.assume_role
Expand Down Expand Up @@ -511,41 +519,32 @@ functions:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/cleanup.sh

"teardown":
"teardown system":
- command: subprocess.exec
params:
binary: bash
working_dir: "src"
args:
- ${DRIVERS_TOOLS}/.evergreen/teardown.sh

"fix absolute paths":
# Ensure the instance profile is reassigned for aws tests.
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh
- command: subprocess.exec
params:
binary: bash
working_dir: "src"
args:
- src/.evergreen/scripts/fix-absolute-paths.sh

"windows fix":
- ${DRIVERS_TOOLS}/.evergreen/csfle/teardown.sh
- command: subprocess.exec
params:
binary: bash
working_dir: "src"
args:
- src/.evergreen/scripts/windows-fix.sh

"make files executable":
- command: subprocess.exec
params:
binary: bash
args:
- src/.evergreen/scripts/make-files-executable.sh

"init test-results":
- ${DRIVERS_TOOLS}/.evergreen/ocsp/teardown.sh
- command: subprocess.exec
params:
binary: bash
working_dir: "src"
args:
- src/.evergreen/scripts/init-test-results.sh
- ${DRIVERS_TOOLS}/.evergreen/teardown.sh

"install dependencies":
- command: subprocess.exec
Expand Down Expand Up @@ -621,21 +620,6 @@ functions:
args:
- src/.evergreen/scripts/stop-load-balancer.sh

"teardown_docker":
- command: subprocess.exec
params:
binary: bash
args:
- src/.evergreen/scripts/teardown-docker.sh

"teardown_aws":
- command: subprocess.exec
params:
binary: bash
args:
- src/.evergreen/scripts/run-with-env.sh
- src/.evergreen/scripts/teardown-aws.sh

"teardown atlas":
- command: subprocess.exec
params:
Expand Down Expand Up @@ -665,33 +649,27 @@ functions:

pre:
- func: "fetch source"
- func: "prepare resources"
- func: "windows fix"
- func: "fix absolute paths"
- func: "init test-results"
- func: "make files executable"
- func: "setup system"
- func: "install dependencies"
- func: "assume ec2 role"

post:
# Disabled, causing timeouts
# - func: "upload working dir"
- func: "teardown"
- func: "teardown system"
- func: "upload coverage"
- func: "upload mo artifacts"
- func: "upload test results"
- func: "stop mongo-orchestration"
- func: "teardown_aws"
- func: "cleanup"
- func: "teardown_docker"

task_groups:
- name: serverless_task_group
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800 # 30 minutes
setup_group:
- func: "fetch source"
- func: "prepare resources"
- func: "setup system"
- command: subprocess.exec
params:
binary: bash
Expand All @@ -714,9 +692,7 @@ task_groups:
setup_group_timeout_secs: 1800 # 30 minutes
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- command: subprocess.exec
params:
binary: bash
Expand All @@ -735,9 +711,7 @@ task_groups:
- name: testazurekms_task_group
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- command: subprocess.exec
params:
binary: bash
Expand All @@ -761,9 +735,7 @@ task_groups:
- name: testazureoidc_task_group
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- command: subprocess.exec
params:
binary: bash
Expand All @@ -785,9 +757,7 @@ task_groups:
- name: testgcpoidc_task_group
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- command: subprocess.exec
params:
binary: bash
Expand All @@ -809,9 +779,7 @@ task_groups:
- name: testk8soidc_task_group
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
Expand All @@ -835,9 +803,7 @@ task_groups:
- name: testoidc_task_group
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- func: "assume ec2 role"
- command: subprocess.exec
params:
Expand All @@ -859,7 +825,7 @@ task_groups:
- name: test_aws_lambda_task_group
setup_group:
- func: fetch source
- func: prepare resources
- func: setup system
- func: setup atlas
teardown_task:
- func: teardown atlas
Expand All @@ -871,9 +837,7 @@ task_groups:
- name: test_atlas_task_group_search_indexes
setup_group:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
- func: setup system
- func: setup atlas
teardown_task:
- func: teardown atlas
Expand Down Expand Up @@ -1584,7 +1548,7 @@ tasks:
- name: testazurekms-fail-task
commands:
- func: fetch source
- func: make files executable
- func: setup system
- func: "bootstrap mongo-orchestration"
vars:
VERSION: "latest"
Expand Down Expand Up @@ -1640,6 +1604,7 @@ tasks:
params:
binary: bash
working_dir: src
include_expansions_in_env: ["PYTHON_BINARY"]
args:
- .evergreen/scripts/check-import-time.sh
- ${revision}
Expand Down
Empty file modified .evergreen/hatch.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/install-dependencies.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/run-azurekms-fail-test.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/run-azurekms-test.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/run-deployed-lambda-aws-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/run-gcpkms-test.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/run-perf-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/archive-mongodb-logs.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/bootstrap-mongo-orchestration.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/check-import-time.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/cleanup.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/configure-env.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/download-and-merge-coverage.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/fix-absolute-paths.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/init-test-results.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/install-dependencies.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/make-files-executable.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/prepare-resources.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-atlas-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-aws-ecs-auth-test.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-doctests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-enterprise-auth-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-gcpkms-fail-test.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-getdata.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-load-balancer.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-mockupdb-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-mod-wsgi-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-ocsp-test.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-perf-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/run-with-env.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/setup-encryption.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/setup-tests.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/stop-load-balancer.sh
100644 → 100755
Empty file.
7 changes: 0 additions & 7 deletions .evergreen/scripts/teardown-aws.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .evergreen/scripts/teardown-docker.sh

This file was deleted.

Empty file modified .evergreen/scripts/upload-coverage-report.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/scripts/windows-fix.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/setup-encryption.sh
100644 → 100755
Empty file.
Empty file modified .evergreen/teardown-encryption.sh
100644 → 100755
Empty file.
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,15 @@ repos:
# - test/versioned-api/crud-api-version-1-strict.json:514: nin ==> inn, min, bin, nine
# - test/test_client.py:188: te ==> the, be, we, to
args: ["-L", "fle,fo,infinit,isnt,nin,te,aks"]

- repo: local
hooks:
- id: executable-shell
name: executable-shell
entry: chmod +x
language: system
types: [shell]
exclude: |
(?x)(
.evergreen/retry-with-backoff.sh
)
2 changes: 1 addition & 1 deletion pymongo/asynchronous/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ async def to_list(self, length: Optional[int] = None) -> list[_DocumentType]:
>>> await cursor.to_list()
Or, so read at most n items from the cursor::
Or, to read at most n items from the cursor::
>>> await cursor.to_list(n)
Expand Down
2 changes: 1 addition & 1 deletion pymongo/synchronous/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ def to_list(self, length: Optional[int] = None) -> list[_DocumentType]:
>>> cursor.to_list()
Or, so read at most n items from the cursor::
Or, to read at most n items from the cursor::
>>> cursor.to_list(n)
Expand Down
Empty file modified tools/synchro.sh
100644 → 100755
Empty file.

0 comments on commit ed0b008

Please sign in to comment.