feat: crd report scaleddown phase status#1846
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)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds detection and reporting for when Backend, Frontend, and Langflow are all desired at 0 replicas: a new ChangesScaled-Down State Handling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
🧹 Nitpick comments (1)
kubernetes/operator/internal/controller/status.go (1)
37-45: 💤 Low valueConsider improving message clarity for the transitional scaled-down state.
The message on line 44 reads: "All components are set to be scaled to 0 replicas but waiting to scale down to be complete"
This is verbose and grammatically awkward. Consider a clearer alternative:
- "Scaling down all components to 0 replicas (in progress)"
- "Waiting for scale-down to 0 replicas to complete"
- "Scale-down to 0 replicas in progress"
The logic itself is correct: treating scaled-down-with-backend-ready as a successful terminal state (ScaledDown phase) and scaled-down-but-not-ready as a transitional state (Reconciled phase with waiting message).
✨ Suggested message improvement
} else { // Desired state is scaled down but backend condition is not true, treat as scaled down but not ready - message = "All components are set to be scaled to 0 replicas but waiting to scale down to be complete" + message = "Scaling down all components to 0 replicas (in progress)" }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kubernetes/operator/internal/controller/status.go` around lines 37 - 45, Replace the awkward transitional message when scaledDown is true but backendConditionStatus != metav1.ConditionTrue with a clearer, concise phrase; update the assignment to message in the status calculation block (the branch using scaledDown and backendConditionStatus) to something like "Scale-down to 0 replicas in progress" or "Waiting for scale-down to 0 replicas to complete" so the conditional handling in the status.go logic (variables scaledDown, backendConditionStatus, metav1.ConditionTrue and phase variable/phaseScaledDown) remains the same but the user-facing message is clearer and grammatically correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@kubernetes/operator/internal/controller/status.go`:
- Around line 37-45: Replace the awkward transitional message when scaledDown is
true but backendConditionStatus != metav1.ConditionTrue with a clearer, concise
phrase; update the assignment to message in the status calculation block (the
branch using scaledDown and backendConditionStatus) to something like
"Scale-down to 0 replicas in progress" or "Waiting for scale-down to 0 replicas
to complete" so the conditional handling in the status.go logic (variables
scaledDown, backendConditionStatus, metav1.ConditionTrue and phase
variable/phaseScaledDown) remains the same but the user-facing message is
clearer and grammatically correct.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ba53611a-48a2-4d0e-ba31-08dfca4f73d5
📒 Files selected for processing (2)
kubernetes/operator/internal/controller/openrag_controller.gokubernetes/operator/internal/controller/status.go
* crd report scaleddown phase status * improve status message
…dingly (#1851) * fix: handle document processing errors and update task statuses accordingly * fix: add OCR handling for raster images during file ingestion * style: ruff autofix (auto) * fix: google to support WEBHOOK_BASE_URL (#1849) * Update connector.py * update env in settings * fix webhook url of sharepoint * feat: crd report scaleddown phase status (#1846) * crd report scaleddown phase status * improve status message * chore: release 0.4.0.dev0 of sdks (#1847) * release 0.4.1 of sdks * dev 0 * dev 0 * 0.4.0-dev0 * feat: sdk scripts (#1848) * sdk scripts * Update main.py * fix: put correct file type in langflow-less ingestion (#1842) * FIxed no langflow ingestion * style: ruff autofix (auto) * add fallback for mime types * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments Standalone uv project under scripts/test_scripts/sdk/python that exercises every openrag-sdk functionality (settings, models, documents, search, chat, knowledge filters, error handling) against a remote instance using IBM SaaS header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to console, markdown, JSON, and a run log. * style: ruff autofix (auto) * Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Lucas Oliveira <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <[email protected]> Co-authored-by: ming <[email protected]> Co-authored-by: Lucas Oliveira <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…dingly (langflow-ai#1851) * fix: handle document processing errors and update task statuses accordingly * fix: add OCR handling for raster images during file ingestion * style: ruff autofix (auto) * fix: google to support WEBHOOK_BASE_URL (langflow-ai#1849) * Update connector.py * update env in settings * fix webhook url of sharepoint * feat: crd report scaleddown phase status (langflow-ai#1846) * crd report scaleddown phase status * improve status message * chore: release 0.4.0.dev0 of sdks (langflow-ai#1847) * release 0.4.1 of sdks * dev 0 * dev 0 * 0.4.0-dev0 * feat: sdk scripts (langflow-ai#1848) * sdk scripts * Update main.py * fix: put correct file type in langflow-less ingestion (langflow-ai#1842) * FIxed no langflow ingestion * style: ruff autofix (auto) * add fallback for mime types * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments Standalone uv project under scripts/test_scripts/sdk/python that exercises every openrag-sdk functionality (settings, models, documents, search, chat, knowledge filters, error handling) against a remote instance using IBM SaaS header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to console, markdown, JSON, and a run log. * style: ruff autofix (auto) * Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Lucas Oliveira <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <[email protected]> Co-authored-by: ming <[email protected]> Co-authored-by: Lucas Oliveira <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* crd report scaleddown phase status * improve status message
…dingly (#1851) * fix: handle document processing errors and update task statuses accordingly * fix: add OCR handling for raster images during file ingestion * style: ruff autofix (auto) * fix: google to support WEBHOOK_BASE_URL (#1849) * Update connector.py * update env in settings * fix webhook url of sharepoint * feat: crd report scaleddown phase status (#1846) * crd report scaleddown phase status * improve status message * chore: release 0.4.0.dev0 of sdks (#1847) * release 0.4.1 of sdks * dev 0 * dev 0 * 0.4.0-dev0 * feat: sdk scripts (#1848) * sdk scripts * Update main.py * fix: put correct file type in langflow-less ingestion (#1842) * FIxed no langflow ingestion * style: ruff autofix (auto) * add fallback for mime types * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments Standalone uv project under scripts/test_scripts/sdk/python that exercises every openrag-sdk functionality (settings, models, documents, search, chat, knowledge filters, error handling) against a remote instance using IBM SaaS header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to console, markdown, JSON, and a run log. * style: ruff autofix (auto) * Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Lucas Oliveira <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <[email protected]> Co-authored-by: ming <[email protected]> Co-authored-by: Lucas Oliveira <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Summary by CodeRabbit