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

Ensure self.process is None in CommandRunner in case it's reused #235

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

plars
Copy link
Collaborator

@plars plars commented Mar 24, 2024

Description

Tiny fix, for something I noticed after deploying the latest agent code.
We reuse the CommandRunner throughout the duration of a single job phase. We currently send the banner output for the top of the test phase as commands so that it goes to all the right logs, output buffer, etc. But there's a chance that the old process can be left over when we restart a new on, and this can result in the output not streaming properly from the command. Fortunately, the fix is pretty easy - just ensure that we reset self.process back to None before starting a command each time.

Tests

I tested this both locally after reproducing it, and with a real agent in the lab and was able to see the output streaming properly after I pushed the fix.

@plars plars requested a review from a team March 24, 2024 12:31
Copy link
Contributor

@kissiel kissiel left a comment

Choose a reason for hiding this comment

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

Makes total sense. +1

@plars plars merged commit 10d680d into main Mar 24, 2024
2 checks passed
@plars plars deleted the commandrunner-ensure-process-none branch March 24, 2024 13:40
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