fix: propagate job context to argo workflow job#1103
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new ChangesJob Dispatch Context Enrichment
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes workflow-triggered job dispatch so the persisted DispatchContext includes the resolved job agent metadata and merged job-agent config that downstream dispatchers expect. In the workspace-engine, this aligns workflow-run jobs with the existing dispatch-context contract already used by other job creation paths.
Changes:
- Add
buildJobDispatchContextto copy the base workflow dispatch context and populateJobAgentplus mergedJobAgentConfig. - Persist the enriched per-job dispatch context instead of the base workflow-only context when inserting workflow jobs.
- Add unit tests covering context population and the non-mutation behavior of the base context.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
apps/workspace-engine/svc/http/server/openapi/workflows/setters.go |
Builds and persists a per-job dispatch context with resolved agent details/config for workflow jobs. |
apps/workspace-engine/svc/http/server/openapi/workflows/workflows_test.go |
Adds tests for dispatch-context population and base-context immutability. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit