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

Process logs before waiting container #6

Merged
merged 4 commits into from
Sep 5, 2024
Merged

Conversation

jrm5100
Copy link
Contributor

@jrm5100 jrm5100 commented Sep 5, 2024

We may process the wait_container before all logs are collected, causing us to lose some.

Instead we can process the logs until that stream ends (which happens when the container ends) then process the wait_container.

Before:

Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }

After:

Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }
Reply: Reply { executions: NonEmpty { head: ExecutionResult { status: 0, stdout: "'hello, world!'\n", stderr: "" }, tail: [] } }

@jrm5100 jrm5100 merged commit 0c20aff into main Sep 5, 2024
6 checks passed
@jrm5100 jrm5100 deleted the jm-fix-race-condition branch September 5, 2024 15:32
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