Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@snkas
Copy link
Contributor

@snkas snkas commented Jan 20, 2026

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.

Commands to try:

cd python
export FELDERA_HOST="https://localhost"  # Point to instance that supports multihost
export FELDERA_HTTPS_TLS_CERT="..."  # Point to any TLS certificate that needs to be used
export FELDERA_TEST_NUM_HOSTS=2
export FELDERA_TEST_NUM_WORKERS=3
uv run python -m pytest tests/platform
uv run python -m pytest tests/runtime
uv run python -m pytest tests/runtime_aggtest
uv run python -m pytest tests/workloads

@snkas snkas requested a review from blp January 21, 2026 19:47
Copy link
Member

@blp blp left a 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.

@snkas
Copy link
Contributor Author

snkas commented Jan 21, 2026

@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.

@blp blp force-pushed the coordinator branch 2 times, most recently from 7ce5745 to 85ebb62 Compare January 21, 2026 23:55
Base automatically changed from coordinator to main January 22, 2026 01:58
@snkas snkas force-pushed the coordinator-python-test branch from f791755 to d689cf2 Compare January 26, 2026 11:20
@snkas snkas marked this pull request as ready for review January 26, 2026 11:46
Copilot AI review requested due to automatic review settings January 26, 2026 11:46
Copy link
Contributor

Copilot AI left a 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]>
@snkas snkas force-pushed the coordinator-python-test branch from d689cf2 to 9c94225 Compare January 27, 2026 11:45
@snkas snkas enabled auto-merge January 27, 2026 11:47
@snkas snkas added this pull request to the merge queue Jan 27, 2026
Merged via the queue into main with commit 55dd452 Jan 27, 2026
1 check passed
@snkas snkas deleted the coordinator-python-test branch January 27, 2026 13:57
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.

4 participants