Skip to content
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

test: more readable logging for smoke tests #5099

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

conorsch
Copy link
Contributor

@conorsch conorsch commented Feb 19, 2025

Describe your changes

Moving the smoke test invocations out of the process-compose wrapper, preferring running raw cargo test invocations instead. Doing so ensures that the test output is readable, both locally, and crucially in CI.

Screenshot before

smoke-test-before

Screenshot after

smoke-logs-after

Issue ticket number and link

No guiding issue, just trying to improve the testing setup opportunistically. We did have inscrutable smoke test failures on #5063 & #5081, both of which were failures of the new pindexer integration tests (#5057), but it was hard to see the specific failure at a glance, which slowed down development.

Testing and review

Check the CI logs for the smoke test job. Are they readable? Consider running just smoke locally and confirm the same.

Checklist before requesting a review

  • I have added guiding text to explain how a reviewer should test these changes.

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    tests-only, no code changes

Moving the smoke test invocations out of the process-compose wrapper,
preferring running raw `cargo test` invocations instead. Doing so
ensures that the test output is readable, both locally, and crucially in
CI.
@conorsch conorsch force-pushed the smoke-test-readable-output branch from 0a67537 to 7a71867 Compare February 19, 2025 15:40
@conorsch conorsch marked this pull request as ready for review February 19, 2025 16:43
@conorsch conorsch requested a review from cronokirby February 19, 2025 16:43
Copy link
Contributor Author

@conorsch conorsch left a comment

Choose a reason for hiding this comment

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

Added a few comments in-line to guide review.

@@ -39,9 +40,9 @@ const TIMEOUT_COMMAND_SECONDS: u64 = 20;
// The "unbonding_delay" value is specified in blocks, and in the smoke tests,
// block time is set to ~500ms, so we'll take the total number of blocks
// that must elapse and sleep half that many seconds.
static UNBONDING_DURATION: Lazy<Duration> = Lazy::new(|| {
static UNBONDING_DELAY: Lazy<Duration> = Lazy::new(|| {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed for consistency, so the value is greppable throughout the tests.

.unwrap_or_else(|_| "http://127.0.0.1:8080".to_owned())
.parse()
.expect("failed to parse PENUMBRA_NODE_PD_URL");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a sane default for which grpc node pcli should talk to, same as already exists in the other tests. This value takes precedence when no env var override exists.

@@ -36,8 +36,11 @@ else
use_tui="false"
fi

# Set unique API port for controlling running services.
export PC_PORT_NUM="8888"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: we can and should use unix sockets where possible, but I'm punting on that for now, and just using 8888/TCP for the compose API port.

let blocks: f64 = std::env::var("UNBONDING_DELAY")
.unwrap_or("100".to_string())
.unwrap_or("50".to_string())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adjusted default value to match what we being set in the smoke tests, via env var override.

@conorsch conorsch merged commit 02e5b90 into main Feb 19, 2025
9 checks passed
@conorsch conorsch deleted the smoke-test-readable-output branch February 19, 2025 21:17
@conorsch conorsch mentioned this pull request Feb 20, 2025
2 tasks
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.

2 participants