-
Notifications
You must be signed in to change notification settings - Fork 649
CI - Parallelize smoketests #3702
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
base: add/cargo-ci
Are you sure you want to change the base?
Conversation
…are-python-deps' into bfops/fix-list-tests
…are-python-deps' into bfops/fix-list-tests
…are-python-deps' into bfops/fix-list-tests
a8fee32 to
3f5e32a
Compare
…ter' into bfops/parallel-smoketests
…/cargo-ci' into bfops/parallel-smoketests
… of github.com:clockworklabs/SpacetimeDB into bfops/parallel-smoketests
tools/ci/src/main.rs
Outdated
| } | ||
| let test_result = bash!(&format!("{python} -m smoketests {}", smoketests_args.join(" "))); | ||
|
|
||
| // TODO: Make an effort to run the wind-down behavior if we ctrl-C this process |
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.
resolve this TODO
tools/ci/src/main.rs
Outdated
| (false, None) => {} | ||
| } | ||
|
|
||
| // TODO: does this work on windows? |
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.
resolve this TODO
tools/ci/src/main.rs
Outdated
| } | ||
| }; | ||
|
|
||
| // TODO: does this work on windows? |
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.
resolve this TODO
| println!("Running smoketests.."); | ||
| let test_result = bash!(&format!("{python} -m smoketests {}", args.join(" "))); | ||
|
|
||
| // TODO: Make an effort to run the wind-down behavior if we ctrl-C this process |
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.
resolve this TODO
| // before the server is up. | ||
| bash!("cargo build -p spacetimedb-cli -p spacetimedb-standalone")?; | ||
|
|
||
| // TODO: Make sure that this isn't brittle / multiple parallel batches don't grab the same port |
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.
resolve this TODO
…lready building it
| batch.clone(), | ||
| std::thread::spawn(move || { | ||
| println!("Running smoketests batch {batch}.."); | ||
| // TODO: capture output and print it only in contiguous blocks |
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.
resolve this TODO
| let start_server_clone = start_server.clone(); | ||
| let python_clone = python.clone(); | ||
| let mut batch_args: Vec<String> = Vec::new(); | ||
| // TODO: this doesn't work properly if the user passed multiple batches as input. |
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.
resolve this TODO
| list_args.push("--list=json".to_string()); | ||
| let list_cmdline = format!("{python} -m smoketests {}", list_args.join(" ")); | ||
|
|
||
| // TODO: do actually check the return code here. and make --list=json not return non-zero if there are errors. |
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.
resolve this TODO
|
|
||
| // Pre-build so that `cargo run -p spacetimedb-cli` will immediately start. Otherwise we risk starting the tests | ||
| // before the server is up. | ||
| // TODO: The `cargo run` invocation still seems to rebuild a bunch? investigate.. maybe we infer the binary path from cargo metadata. |
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.
fix this TODO (I think it has been resolved)
| let python = if let Some(p) = python { | ||
| p | ||
| } else { | ||
| // TODO: does this work on windows? |
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.
resolve this TODO
| pid | ||
| )); | ||
| } else { | ||
| // TODO: I keep getting errors about the pid not existing.. but the servers seem to shut down? |
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.
resolve this TODO
I think it's because we're not specifying new --data-dirs so they conflict with one another
| }; | ||
|
|
||
| println!("Running smoketests.."); | ||
| // TODO: Don't we need to _use_ the port here?! |
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.
resolve this TODO (this is done)
| .read() | ||
| .unwrap_or_default(); | ||
| } else { | ||
| // TODO: Maybe we do this in a thread instead? Then it's easier to kill |
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.
resolve this TODO
Description of Changes
API and ABI breaking changes
Expected complexity level and risk
Testing