-
-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Forked worker processes now inherit PATH from parent #1448
Conversation
🦋 Changeset detectedLatest commit: 6e7abf4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request introduces modifications to the "trigger.dev" configuration and the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
.changeset/warm-keys-perform.md (1)
4-5
: Consider enhancing the changeset description.While the description is clear, it would be more helpful to include:
- The problem being solved (why PATH inheritance was an issue)
- The impact of this fix (what improves after this change)
- Any related changes (e.g., the TaskRunProcess modifications)
Consider expanding the description like this:
-Set parent PATH on forked worker processes +Fixes worker process PATH inheritance to ensure child processes have access to the same +executable paths as their parent process. This resolves potential command resolution +issues in forked workers by properly inheriting the parent's PATH environment variable +through the TaskRunProcess initialization.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
.changeset/warm-keys-perform.md
(1 hunks)packages/cli-v3/src/executions/taskRunProcess.ts
(1 hunks)
🔇 Additional comments (3)
.changeset/warm-keys-perform.md (1)
1-3
: LGTM on version bump choice!
The patch version bump is appropriate for this type of fix, as it maintains backward compatibility while fixing the PATH inheritance behavior.
packages/cli-v3/src/executions/taskRunProcess.ts (2)
124-127
: Verify completeness of environment inheritance.
The current implementation inherits only specific environment variables. Consider whether other critical environment variables should also be inherited for proper process execution.
Let's check for other environment variable usage in the codebase:
126-126
: 🛠️ Refactor suggestion
Ensure consistent PATH inheritance across platforms.
The addition of PATH
inheritance is crucial for command resolution in child processes. However, consider the following platform-specific considerations:
- On Windows, the environment variable is case-insensitive ('Path' vs 'PATH')
- Some systems might use additional path-like variables (e.g., 'Path' on Windows)
Let's verify the PATH handling across platforms:
Consider making the PATH inheritance more robust:
- PATH: process.env.PATH,
+ PATH: process.env.PATH || process.env.Path || '',
Summary by CodeRabbit
New Features
Bug Fixes