Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .evergreen/run-mongodb-aws-ecs-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ fi
# Now we can safely enable xtrace
set -o xtrace

# Install a c compiler.
# Install a C compiler (for the C extensions) and git (needed by uv to
# resolve the mockupdb git dependency)
apt-get -qq update < /dev/null > /dev/null
apt-get -q install -y build-essential
apt-get -q install -y build-essential git

export SET_XTRACE_ON=1
export CI=true
# This container has no git, so uv must never try to resolve the mockupdb
# git dependency; UV_NO_LOCK makes uv ignore any lock file entirely.
export UV_NO_LOCK=1
cd src
rm -rf .venv
# Discard any lockfile written by the host so we resolve from scratch
rm -f uv.lock
rm -f .evergreen/scripts/test-env.sh || true
rm -f .evergreen/scripts/env.sh || true
bash ./.evergreen/just.sh setup-tests auth_aws ecs-remote
Expand Down
2 changes: 0 additions & 2 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ else
fi

# Start the test runner.
# Never create or read a uv.lock; hosts without git can't resolve mockupdb.
export UV_NO_LOCK=1
echo "Running tests with UV_PYTHON=${UV_PYTHON:-}..."
echo "UV_ARGS=${UV_ARGS}"
uv run ${UV_ARGS} --reinstall-package pymongo .evergreen/scripts/run_tests.py "$@"
Expand Down
1 change: 0 additions & 1 deletion .evergreen/scripts/configure-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export CARGO_HOME="$CARGO_HOME"
export UV_TOOL_DIR="$UV_TOOL_DIR"
export UV_CACHE_DIR="$UV_CACHE_DIR"
export UV_TOOL_BIN_DIR="$DRIVERS_TOOLS_BINARIES"
export UV_NO_LOCK=1
export PYMONGO_BIN_DIR="$PYMONGO_BIN_DIR"
export PATH="$PATH_EXT"
# shellcheck disable=SC2154
Expand Down
10 changes: 4 additions & 6 deletions .evergreen/scripts/kms_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ def _setup_azure_vm(base_env: dict[str, str]) -> None:
env["AZUREKMS_CMD"] = "sudo apt-get install -y python3-dev build-essential"
run_command(f"{azure_dir}/run-command.sh", env=env)

env["AZUREKMS_CMD"] = (
"CI=true UV_NO_LOCK=1 bash .evergreen/just.sh setup-tests kms azure-remote"
)
env["AZUREKMS_CMD"] = "CI=true bash .evergreen/just.sh setup-tests kms azure-remote"
run_command(f"{azure_dir}/run-command.sh", env=env)
LOGGER.info("Setting up Azure VM... done.")

Expand All @@ -55,7 +53,7 @@ def _setup_gcp_vm(base_env: dict[str, str]) -> None:
env["GCPKMS_CMD"] = "sudo apt-get install -y python3-dev build-essential"
run_command(f"{gcp_dir}/run-command.sh", env=env)

env["GCPKMS_CMD"] = "CI=true UV_NO_LOCK=1 bash ./.evergreen/just.sh setup-tests kms gcp-remote"
env["GCPKMS_CMD"] = "CI=true bash ./.evergreen/just.sh setup-tests kms gcp-remote"
run_command(f"{gcp_dir}/run-command.sh", env=env)
LOGGER.info("Setting up GCP VM...")

Expand Down Expand Up @@ -132,10 +130,10 @@ def test_kms_send_to_remote(sub_test_name: str) -> None:
key_name = os.environ["KEY_NAME"]
key_vault_endpoint = os.environ["KEY_VAULT_ENDPOINT"]
env["AZUREKMS_CMD"] = (
f'KEY_NAME="{key_name}" KEY_VAULT_ENDPOINT="{key_vault_endpoint}" CI=true UV_NO_LOCK=1 bash ./.evergreen/just.sh run-tests'
f'KEY_NAME="{key_name}" KEY_VAULT_ENDPOINT="{key_vault_endpoint}" CI=true bash ./.evergreen/just.sh run-tests'
)
else:
env["GCPKMS_CMD"] = "CI=true UV_NO_LOCK=1 ./.evergreen/just.sh run-tests"
env["GCPKMS_CMD"] = "CI=true ./.evergreen/just.sh run-tests"
cmd = f"{DIRS[sub_test_name]}/run-command.sh"
run_command(cmd, env=env)

Expand Down
3 changes: 0 additions & 3 deletions .evergreen/scripts/setup-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ if [ -f $SCRIPT_DIR/env.sh ]; then
source $SCRIPT_DIR/env.sh
fi

# Never create or read a uv.lock; hosts without git can't resolve mockupdb.
export UV_NO_LOCK=1

echo "Setting up tests with args \"$*\"..."
uv run ${USE_ACTIVE_VENV:+--active} "$SCRIPT_DIR/setup_tests.py" "$@"
echo "Setting up tests with args \"$*\"... done."
3 changes: 0 additions & 3 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ defaults:
permissions:
contents: read

env:
UV_NO_LOCK: "1"

jobs:

static:
Expand Down
3 changes: 0 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# See https://just.systems/man/en/ for instructions
set shell := ["bash", "-c"]

# Don't let `uv` create or read uv.lock.
export UV_NO_LOCK := "1"

# Commonly used command segments.
typing_run := "uv run --group typing --extra aws --extra encryption --with numpy --extra ocsp --extra snappy --extra test --extra zstd"
docs_run := "uv run --extra docs"
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ Source = "https://github.com/mongodb/mongo-python-driver"
Tracker = "https://jira.mongodb.org/projects/PYTHON/issues"

[tool.uv]
# Only sync the (empty) dev group by default; groups like mockupdb require
# an explicit --group flag so hosts without git aren't forced to resolve it.
default-groups = ["dev"]
# Wait 7 days before resolving newly published package versions.
exclude-newer = "7 days"

Expand Down
Loading