Skip to content

Conversation

@bfops
Copy link
Collaborator

@bfops bfops commented Nov 19, 2025

Description of Changes

API and ABI breaking changes

Expected complexity level and risk

Testing

  • serial testing with all values of start-server
  • parallel testing with all values of start-server
    • as well as a remote server
    • passing explicit batches
    • docker tests pass
  • surely other stuff

@bfops bfops linked an issue Nov 19, 2025 that may be closed by this pull request
@bfops bfops changed the title [bfops/parallel-smoketests]: empty CI - Parallelize smoketests Nov 19, 2025
@bfops bfops force-pushed the bfops/fix-list-tests branch from a8fee32 to 3f5e32a Compare November 19, 2025 22:34
@bfops bfops deleted the branch add/cargo-ci November 20, 2025 02:07
@bfops bfops closed this Nov 20, 2025
@bfops bfops reopened this Nov 20, 2025
@bfops bfops changed the base branch from bfops/fix-list-tests to master November 20, 2025 18:30
@bfops bfops changed the base branch from master to add/cargo-ci November 20, 2025 19:11
}
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

resolve this TODO

(false, None) => {}
}

// TODO: does this work on windows?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

resolve this TODO

}
};

// TODO: does this work on windows?
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

resolve this TODO

batch.clone(),
std::thread::spawn(move || {
println!("Running smoketests batch {batch}..");
// TODO: capture output and print it only in contiguous blocks
Copy link
Collaborator Author

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.
Copy link
Collaborator Author

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.
Copy link
Collaborator Author

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.
Copy link
Collaborator Author

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?
Copy link
Collaborator Author

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?
Copy link
Collaborator Author

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?!
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

resolve this TODO

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.

Parallelize smoketests

2 participants