fix: Ensure scalingAdapter is included in generated DGD for autoscaling#7660
fix: Ensure scalingAdapter is included in generated DGD for autoscaling#7660AsadShahid04 wants to merge 1 commit intoai-dynamo:mainfrom
Conversation
|
👋 Hi AsadShahid04! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
WalkthroughThe PR modifies the DynamoGraphDeploymentRequest controller to automatically initialize the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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
`@deploy/operator/internal/controller/dynamographdeploymentrequest_controller.go`:
- Around line 1656-1662: The current check only initializes
dgd.Spec.ScalingAdapter when it's nil, but misses the case when ScalingAdapter
exists with Enabled: false; update the logic in the r.shouldEnableScalingAdapter
handling to also set dgd.Spec.ScalingAdapter.Enabled = true when
dgd.Spec.ScalingAdapter != nil && dgd.Spec.ScalingAdapter.Enabled == false, and
still create a new &dgdv1alpha1.ScalingAdapter{Enabled: true} when nil; keep the
existing logger.Info call (or adjust message) so the controller logs that
scalingAdapter was enabled on the generated DGD for autoscaling support; target
the block referencing r.shouldEnableScalingAdapter, dgd.Spec.ScalingAdapter, and
the ScalingAdapter.Enabled field.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fb63d100-7519-4877-868b-449456112e7d
📒 Files selected for processing (1)
deploy/operator/internal/controller/dynamographdeploymentrequest_controller.go
- Update shouldEnableScalingAdapter check to handle both nil and disabled cases - When ScalingAdapter is nil, create new one with Enabled: true - When ScalingAdapter exists but Enabled is false, set Enabled to true - Expand docstring on shouldEnableScalingAdapter for clarity - Add appropriate logger.Info messages for both scenarios Addresses CodeRabbit review feedback for PR ai-dynamo#7660 Signed-off-by: Asad Shahid <asad.shahid04@gmail.com>
- Update shouldEnableScalingAdapter check to handle both nil and disabled cases - When ScalingAdapter is nil, create new one with Enabled: true - When ScalingAdapter exists but Enabled is false, set Enabled to true - Expand docstring on shouldEnableScalingAdapter for clarity - Add appropriate logger.Info messages for both scenarios Addresses CodeRabbit review feedback for PR ai-dynamo#7660 Signed-off-by: Asad Shahid <asad.shahid04@gmail.com>
- Handle case where ScalingAdapter exists with Enabled=false - Enables ScalingAdapter when planner components are present - Improves logging to reflect when adapter is enabled - Fixes issue where DGDR with AI Configurator generates incomplete DGD spec Fixes ai-dynamo#6491 Signed-off-by: Asad Shahid <asad.shahid@berkeley.edu>
ab53cf7 to
784603e
Compare
Fixes #6491
Summary by CodeRabbit