Skip to content

Conversation

blink1073
Copy link
Member

@blink1073 blink1073 commented Jan 27, 2025

  • Break up run-tests.sh into a setup phase and a test run phase
  • The setup phase handles loading secrets, setting up test environment variables, and starting services. It sets up the args for the uv environment and the pytest invocation.
  • The majority of the configuration is done as a python script, setup-tests.py.

Follow up PRs will move more of the "other" tests such as Auth AWS and Auth OIDC into this centralized pattern of just setup-test and just test-eg.

Scheduled a cross-section of tasks for this build: https://spruce.mongodb.com/version/67abd5b92d7b8f00078f297b/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredible work, I'm weeping with joy.

tags = ["load-balancer", auth, ssl]
bootstrap_vars = dict(TOPOLOGY="sharded_cluster", AUTH=auth, SSL=ssl, LOAD_BALANCER="true")
bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=bootstrap_vars)
balancer_func = FunctionCall(func="run load-balancer")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional removal of balancer_func?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was absorbed into setup_test.py

else
_BIN_DIR=$HOME/.local/bin
HERE=$(dirname ${BASH_SOURCE:-$0})
pushd "$(dirname "$(dirname $HERE)")" > /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing matching popd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

UV_ARGS.append(f"--extra {extra}")

for env_var, suite in TEST_SUITE_MAP.items():
if TEST_SUITES:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this loop sets TEST_SUITES equal to the first encountered suite?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That or if the environment variable was set

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make more sense to have the continue to be a break then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


if AUTH != "noauth":
if is_set("TEST_DATA_LAKE"):
DB_USER = "mhuser"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we save these into environment variables in our secrets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I scheduled an ADL test for the latest commit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blink1073 blink1073 requested a review from NoahStapp February 12, 2025 14:29
Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming the tests pass. Thanks a ton, Steve!

@blink1073 blink1073 merged commit 6198805 into mongodb:master Feb 12, 2025
45 of 48 checks passed
@blink1073 blink1073 deleted the PYTHON-4540-jan branch February 12, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants