fix: dont dereference required job agent selector field#47
fix: dont dereference required job agent selector field#47adityachoudhari26 merged 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughThis PR updates deployment schema definitions by renaming a plan target status enum, restructuring deployment plan target modeling with new result tracking, removing job agent fields from deployment requests, and making job agent selector required as a direct string. Example terraform files are reformatted for alignment. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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.
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/api/client.gen.go`:
- Around line 410-411: The generated comment for the DependsOn field contains an
example CEL expression that ends with an extra period making it invalid; update
the OpenAPI schema/source that defines the description for the "dependsOn"
property (not the generated internal/api/client.gen.go) to remove the trailing
'.' from the example "version.tag.startsWith('v2.')" so the example becomes
valid CEL; regenerate the client so the DependsOn string field's docstring is
fixed in client.gen.go.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: c2162f8d-5a7f-4115-b639-f963cd61fc47
📒 Files selected for processing (8)
examples/argocd-nginx/deployments.tfexamples/deployment-variables/deployments.tfexamples/github-runner/deployments.tfexamples/gradual-rollout/deployments.tfexamples/relationship-variables/deployments.tfexamples/simple-progression/deployments.tfinternal/api/client.gen.gointernal/provider/deployment_resource.go
| // DependsOn CEL expression to match upstream deployment(s) that must have a successful release before this deployment can proceed. The expression can reference both deployment properties (deployment.id, deployment.name, deployment.slug, deployment.metadata) and the currently deployed version properties (version.id, version.tag, version.name, version.status, version.metadata, version.createdAt). For example: deployment.name == 'db-migration' && version.tag.startsWith('v2.'). | ||
| DependsOn string `json:"dependsOn"` |
There was a problem hiding this comment.
Trim the trailing period from the CEL example.
Line 410 currently ends the example with version.tag.startsWith('v2.').; copied literally, that final . makes the expression invalid CEL. Since this file is generated, fix the OpenAPI description/source comment rather than patching the generated output directly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@internal/api/client.gen.go` around lines 410 - 411, The generated comment for
the DependsOn field contains an example CEL expression that ends with an extra
period making it invalid; update the OpenAPI schema/source that defines the
description for the "dependsOn" property (not the generated
internal/api/client.gen.go) to remove the trailing '.' from the example
"version.tag.startsWith('v2.')" so the example becomes valid CEL; regenerate the
client so the DependsOn string field's docstring is fixed in client.gen.go.
Summary by CodeRabbit
Breaking Changes
New Features