Fix Deploy UI showing Failed for ProjectReleaseBinding during namespace provisioning - #749
Conversation
|
Changeset detected — the following file(s) will be released with this PR: |
📝 WalkthroughWalkthroughThe release-binding transformer now treats ChangesRelease-binding status transformation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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
Updates OpenChoreo backend status-derivation logic so the Deploy UI treats NamespaceProgressing as an in-progress (pending) state for ProjectReleaseBinding while the DataPlane namespace is provisioning, instead of incorrectly showing it as Failed.
Changes:
- Added
NamespaceProgressingto thePROGRESSING_REASONSallow-list used byderiveBindingStatusDetailed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // ProjectReleaseBinding's DataPlane Namespace is still being created or has | ||
| // not yet been observed as ready. Pending, not an error. | ||
| 'NamespaceProgressing', |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
plugins/openchoreo-backend/src/services/transformers/release-binding.ts (1)
22-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd focused regression coverage for
NamespaceProgressing.The supplied test context covers
ResourcesProgressing, but it does not show a case for this new reason. Add or verify a test that sendsReady=Falsewith reasonNamespaceProgressingand expectsNotReady.🤖 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 `@plugins/openchoreo-backend/src/services/transformers/release-binding.ts` around lines 22 - 24, Add focused regression coverage for the release-binding readiness transformer covering a Ready=False condition with reason NamespaceProgressing, and assert that it produces NotReady rather than an error state. Reuse the existing ResourcesProgressing test setup and extend the relevant transformer test without changing unrelated readiness behavior.
🤖 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 `@plugins/openchoreo-backend/src/services/transformers/release-binding.ts`:
- Around line 22-24: Add focused regression coverage for the release-binding
readiness transformer covering a Ready=False condition with reason
NamespaceProgressing, and assert that it produces NotReady rather than an error
state. Reuse the existing ResourcesProgressing test setup and extend the
relevant transformer test without changing unrelated readiness behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e8146344-f92a-4cef-b074-6ed773a91569
📒 Files selected for processing (1)
plugins/openchoreo-backend/src/services/transformers/release-binding.ts
a0e9d20 to
92ca36f
Compare
…ding status Signed-off-by: chaninduimanjith <chanindu.imanjith@gmail.com>
Signed-off-by: chaninduimanjith <chanindu.imanjith@gmail.com>
Signed-off-by: chaninduimanjith <chanindu.imanjith@gmail.com>
9f56bc2 to
6bb1ed1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
plugins/openchoreo-backend/src/services/transformers/release-binding.test.ts:63
- PR description states "No new tests added" under Automation tests, but this PR introduces a new unit test covering the NamespaceProgressing reason. Please update the PR description to reflect that a test was added (or adjust the claim accordingly) to avoid confusion for reviewers and release notes automation.
it('returns NotReady for NamespaceProgressing reason', () => {
const binding = makeBinding([
{
type: 'Ready',
status: 'False',
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thank you for your contribution @ChaninduImanjith. LGTM and I will merge this. However, as I have explained in #743 (comment), we need to change the approach here to handle any new pending-states which will introduced in future. We will send in a follow up PR for that. |
Thank you @kaviththiranga for reviewing and merging this! I understand the concern about the allow-list approach — happy to contribute to the follow-up refactor if that would be helpful. |
Purpose
Resolves openchoreo/openchoreo#4440
Goals
Fix the Deploy UI incorrectly showing "Failed" for a ProjectReleaseBinding while its DataPlane Namespace is still being provisioned (normal
NamespaceProgressingstate).Approach
Added
NamespaceProgressingto thePROGRESSING_REASONSlist inderiveBindingStatusDetailed(release-binding.ts). This reason is set by the core controller when the Project's DataPlane Namespace is still being created or has not yet been observed as ready — it was previously falling through to the default "Failed" status branch since it wasn't recognized as a progressing state.User stories
As a developer deploying a Project for the first time, I want the Deploy UI to show a "Pending" or in-progress status while the namespace is provisioning, instead of a misleading "Failed" status that later flips to "Active" without any retry.
Release note
Fixed an issue where the Deploy UI showed "Failed" for a ProjectReleaseBinding during normal namespace-provisioning, before it became "Active".
Documentation
N/A - Bug fix, no doc impact.
Training
N/A
Certification
N/A - No impact on certification exams.
Marketing
N/A
Automation tests
Added a unit test for the NamespaceProgressing reason in release-binding.test.ts to verify it derives a NotReady status instead of Failed.
Security checks
Samples
N/A
Related PRs
N/A
Migrations
N/A
Test environment
Verified the logic change against the reported reproduction steps in openchoreo/openchoreo#4440.
Learning
Traced the status derivation logic from the reported UI symptom back to
deriveBindingStatusDetailedinrelease-binding.ts, whereNamespaceProgressingwas missing from thePROGRESSING_REASONSallow-list.Summary by CodeRabbit