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

Fix: Process done marker not found in read with timeout #596

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

klieret
Copy link
Member

@klieret klieret commented Jun 19, 2024

Closes #595

Fix: Process done marker not found in read with timeout

This happened when both stderr and stdout were written to.
There was no guarantee that the suffix that prints the exit status would
actually be last.

Fix:

  • Add a bit of timeout
  • Search in all lines rather than just the last one for the exit code

Either of these should reasonably fix this.

This commit shouldn't change anything
@klieret klieret changed the title read with timeout experimental fix Fix: Process done marker not found in read with timeout Jun 19, 2024
This happened when both stderr and stdout were written to.
There was no guarantee that the suffix that prints the exit status would
actually be last.

Fix:
* Add a bit of timeout
* Search in all lines rather than just the last one for the exit code

Either of these should reasonably fix this.

Closes #595
@klieret klieret force-pushed the read-with-timeout-experimental-fix branch from 37327f4 to 1307e4d Compare June 19, 2024 21:53
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.28%. Comparing base (aa94a2e) to head (1307e4d).
Report is 3 commits behind head on main.

Files Patch % Lines
sweagent/environment/utils.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
+ Coverage   76.20%   76.28%   +0.08%     
==========================================
  Files          21       21              
  Lines        3320     3319       -1     
==========================================
+ Hits         2530     2532       +2     
+ Misses        790      787       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@klieret klieret merged commit 5f42dc8 into main Jun 19, 2024
7 checks passed
@klieret klieret deleted the read-with-timeout-experimental-fix branch June 19, 2024 22:39
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.

ValueError: Could not find process done marker in last line for some invalid commands
1 participant