-
Notifications
You must be signed in to change notification settings - Fork 822
feat: use consts instead of hardcoded string for statuses #5696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: use consts instead of hardcoded string for statuses #5696
Conversation
Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
WalkthroughTwo controller files undergo systematic state constant renaming to improve namespace clarity: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
deploy/operator/internal/controller/dynamographdeploymentrequest_controller.go (1)
665-686: Replace the remaining hardcoded "Pending" to keep state casing consistent.
This PR’s goal is to remove hardcoded status strings; the success path still sets"Pending"which now mismatchesDGDStatePending("pending").🔧 Suggested fix
- State: "Pending", + State: string(DGDStatePending),
julienmancuso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, coderabbit made a good comment, please take it into account
Overview:
Use existing consts instead of relying on hardcoded strings for statuses within the Dynamo operator. Also, differentiate DGDR vs DGD statuses.
Details:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.