fix: use unique env-file path in DaytonaPtyProcess to avoid race conditions#200
Merged
fix: use unique env-file path in DaytonaPtyProcess to avoid race conditions#200
Conversation
…itions DaytonaPtyProcess.start() used a hardcoded /tmp/.benchflow_env path, meaning concurrent instances on the same host would overwrite each other's env file. Use uuid.uuid4().hex[:16] suffix to match the pattern already used in DaytonaProcess.start(). Also removes redundant local 'import uuid' since it's already imported at module level. Flagged by Devin Review on PR #198. Co-Authored-By: Xiangyi Li <venusli370306@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DaytonaPtyProcess.start()used a hardcoded/tmp/.benchflow_envpath for writing env vars into the container. ConcurrentDaytonaPtyProcessinstances on the same host would overwrite each other's env file, silently corrupting environment variables.This applies the same
uuid.uuid4().hex[:16]suffix pattern already used inDaytonaProcess.start()(fixed in PR #198) to the PTY code path.Also removes a redundant local
import uuidsince it's already imported at module level.Flagged by Devin Review on PR #198 (flag: "DaytonaPtyProcess uses hardcoded env path").
Review & Testing Checklist for Human
DaytonaPtyProcess.start()now uses a unique suffix (process.py:471-476)/tmp/.benchflow_envpaths remain in the codebaseNotes
ruff check .clean--env-fileformat — no change neededLink to Devin session: https://app.devin.ai/sessions/9709f34c9a064c67a40a8dfad5640c0b
Requested by: @xdotli