fix: include agent selector in deployment CEL ctx#942
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 (1)
📝 WalkthroughWalkthroughA single field, Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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
Adds jobAgentSelector to the deployment map that is exposed to CEL selectors, so CEL expressions can reference a deployment’s job-agent selection criteria.
Changes:
- Include
Deployment.JobAgentSelectorin thedeploymentCEL evaluation context.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| m["name"] = d.Name | ||
| m["slug"] = d.Slug | ||
| m["jobAgentConfig"] = d.JobAgentConfig | ||
| m["jobAgentSelector"] = d.JobAgentSelector |
There was a problem hiding this comment.
This adds a new field to the deployment CEL context, but there’s no test asserting that jobAgentSelector is present in BuildEntityContext/deploymentToMap. Consider extending apps/workspace-engine/pkg/selector/langs/cel/cel_test.go (e.g. TestBuildEntityContext_AllPopulated) to set Deployment.JobAgentSelector and assert depMap["jobAgentSelector"] matches, so regressions are caught.
Resolves #941
Summary by CodeRabbit