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
plan/example-rust: fix the test with new sdk and optimize build #1327
Conversation
37665e1
to
90ca3f3
Compare
90ca3f3
to
ef6d8b7
Compare
@mxinden @ackintosh ready for review! |
76b4af8
to
0558859
Compare
aca40f1
to
ab728ee
Compare
ab728ee
to
03e5078
Compare
619a356
to
7f382ce
Compare
7f382ce
to
e2960d9
Compare
Note: |
plans/example-rust/src/main.rs
Outdated
println!("TODO: why is this necessary to make the test go green?"); | ||
let (client, _run_parameters) = testground::client::Client::new().await?; |
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.
println!("TODO: why is this necessary to make the test go green?"); | |
let (client, _run_parameters) = testground::client::Client::new().await?; | |
let (client, _run_parameters) = testground::client::Client::new().await?; | |
client.wait_network_initialized().await?; |
Would this resolve the failures as well @laurentsenta?
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.
That looks much more stable, thanks for the patch @mxinden
A quick note, the tests are still failing because the run.out
file is empty, it's a file we collect (via --collect
) at the end of the run. It looks like testground expects the SDK to write logs to a predefined folder,
Related code in the go-sdk:
I'm going to skip this check:
- The rust SDK doesn't implement this logger yet as far as I can tell,
- More importantly, it might be a good time to discuss logging, do we even need that parser, why not "just" rely on stdout and stderr? (and get rid of the pretty.go file at the same time).
- When we fix A testground run might end with a status code = 0 despite the job failing (hence the need for the entrypoint.sh script) #1349 simply
--wait
'ing for a run will detect eventual failures.
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.
The rust SDK doesn't implement this logger yet as far as I can tell,
The rust-sdk does have the stdout hack:
It does not support run.out
.
More importantly, it might be a good time to discuss logging, do we even need that parser, why not "just" rely on stdout and stderr? (and get rid of the pretty.go file at the same time).
Off the top of my head, that would be the cleaner solution.
@laurentsenta what do you think of simply adding a touch run.out &&
before the entrypoint in the Dockerfile
?
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.
It's a fair solution,
The way we test success with run.out
made sort of sense without the --wait
fix but it's arbitrary: https://github.com/testground/testground/blob/master/integration_tests/header.sh#L33-L38
If we both think it's worth looking into getting rid of run.*
files, I'm in favor of not cluttering the images at all and starting relying on actual exit codes.
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.
If we both think it's worth looking into getting rid of
run.*
files, I'm in favor of not cluttering the images at all and starting relying on actual exit codes.
Off the top of my head I don't have a use-case for it. That said, I am not a testground expert. 👍 for proposing to remove it in this repository.
9f9bdf9
to
ece558a
Compare
aa159bd
to
2a7903f
Compare
groups
typo. sdk-rust#14),