fix: align precondition env with step execution#2080
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughExtracts node environment setup into a new helper ChangesEnvironment Setup Refactor & Precondition Visibility
Integration Test Timeouts
Sequence Diagram(s)(Skipped) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/runtime/runner_test.go`:
- Around line 835-845: The test
PreconditionUsesSameRuntimeManagedStepEnvAsCommand uses POSIX shell commands
(`printf` in withCommand and `test -n` in withPrecondition) so make it skip on
Windows: at the start of the test body (inside the t.Run for
PreconditionUsesSameRuntimeManagedStepEnvAsCommand) add a Windows guard such as
`if runtime.GOOS == "windows" { t.Skip("skipping POSIX shell test on Windows")
}`, import the runtime package if not already imported, and leave the rest of
the newPlan/newStep/withCommand/withPrecondition setup unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e218ab66-d679-4ccc-ab6d-4e8f5d6805a0
📒 Files selected for processing (2)
internal/runtime/runner.gointernal/runtime/runner_test.go
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/intg/distr/execution_test.go (1)
256-340:⚠️ Potential issue | 🟠 Major | ⚡ Quick winComplete the artifact-timeout migration in the remaining artifact-persistence test.
artifactExecutionStatusTimeout()is now used in most artifact paths, but Line 229 still usesexecutionStatusTimeout()insidesharedNothingUploadsArtifactsToCoordinatorFilesystem. That keeps the shorter Windows timeout in the same mode this helper targets, so flakes can still occur.Suggested patch
- status := f.waitForStatus(core.Succeeded, executionStatusTimeout()) + status := f.waitForStatus(core.Succeeded, artifactExecutionStatusTimeout())🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/intg/distr/execution_test.go` around lines 256 - 340, In the test sharedNothingUploadsArtifactsToCoordinatorFilesystem replace the shorter timeout helper call executionStatusTimeout() with artifactExecutionStatusTimeout() so the test uses the artifact-specific (longer) timeout; update the waitForStatus call (and any other uses in that test) to call artifactExecutionStatusTimeout() instead of executionStatusTimeout() to complete the artifact-timeout migration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@internal/intg/distr/execution_test.go`:
- Around line 256-340: In the test
sharedNothingUploadsArtifactsToCoordinatorFilesystem replace the shorter timeout
helper call executionStatusTimeout() with artifactExecutionStatusTimeout() so
the test uses the artifact-specific (longer) timeout; update the waitForStatus
call (and any other uses in that test) to call artifactExecutionStatusTimeout()
instead of executionStatusTimeout() to complete the artifact-timeout migration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 01d8aba5-190c-4566-b066-ccef8bf84b61
📒 Files selected for processing (1)
internal/intg/distr/execution_test.go
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
Testing
Summary by CodeRabbit
Bug Fixes
Refactor
Tests