-
Notifications
You must be signed in to change notification settings - Fork 97
python: configure workers and hosts for tests #5474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
blp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me.
I didn't look over all the details.
|
@blp The intent for this PR is primarily to help you in testing. When I ran it, several seemed to stall indefinitely, so I was unable to really paste an error. |
7ce5745 to
85ebb62
Compare
f791755 to
d689cf2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR configures Python tests to use explicit worker and host counts via environment variables FELDERA_TEST_NUM_WORKERS and FELDERA_TEST_NUM_HOSTS, defaulting to 8 and 1 respectively. This ensures tests explicitly control these runtime parameters rather than relying on backend defaults.
Changes:
- Added environment variable support for configuring test worker and host counts
- Updated all test files to pass these values in RuntimeConfig
- Modified the RuntimeConfig class to accept a hosts parameter
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/feldera/testutils.py | Defines environment variables for test worker and host configuration |
| python/feldera/runtime_config.py | Adds hosts parameter to RuntimeConfig constructor |
| python/tests/shared_test_pipeline.py | Updates test base classes to use configured workers and hosts |
| python/tests/runtime_aggtest/aggtst_base.py | Adds worker and host configuration to aggregation tests |
| python/tests/runtime/test_udf.py | Adds worker and host configuration to UDF tests |
| python/tests/runtime/test_uda.py | Adds worker and host configuration to UDA tests |
| python/tests/runtime/test_transactions.py | Adds worker and host configuration to transaction tests |
| python/tests/runtime/lateness/test_issue4895.py | Adds worker and host configuration to lateness tests |
| python/tests/runtime/lateness/test_issue4457.py | Adds worker and host configuration to lateness tests |
| python/tests/platform/test_update_runtime.py | Adds worker and host configuration to runtime update tests |
| python/tests/platform/test_shared_pipeline.py | Adds worker and host configuration to shared pipeline tests |
| python/tests/platform/test_pipeline_builder.py | Adds worker and host configuration to pipeline builder tests |
| python/tests/platform/test_nowstream.py | Adds worker and host configuration to nowstream tests |
| python/tests/platform/test_checkpoint_sync.py | Adds worker and host configuration to checkpoint sync tests |
| python/tests/platform/test_bootstrapping.py | Adds worker and host configuration to bootstrapping tests |
| python/tests/platform/negative_test.py | Adds worker and host configuration to negative compilation tests |
| python/tests/platform/helper.py | Adds worker and host configuration to helper functions |
The number of workers and hosts can be set for several Python tests through the environment variables `FELDERA_TEST_NUM_WORKERS` and `FELDERA_TEST_NUM_HOSTS`. The only difference this PR results in, is that the tests no longer use the default number of workers or hosts that is set by the backend if no workers or hosts are specified. The environment variables are set by default to these current values (8 and 1 respectively), but if these defaults are ever changed, they also need to be updated in the Python tests. Signed-off-by: Simon Kassing <[email protected]>
d689cf2 to
9c94225
Compare
The number of workers and hosts can be set for several Python tests through the environment variables
FELDERA_TEST_NUM_WORKERSandFELDERA_TEST_NUM_HOSTS.The only difference this PR results in, is that the tests no longer use the default number of workers or hosts that is set by the backend if no workers or hosts are specified. The environment variables are set by default to these current values (8 and 1 respectively), but if these defaults are ever changed, they also need to be updated in the Python tests.
Commands to try: