Fix DevWorkspace watcher handling for forbidden namespaces - #365
Fix DevWorkspace watcher handling for forbidden namespaces#365msivasubramaniaan wants to merge 1 commit into
Conversation
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe DevWorkspace watcher now handles Kubernetes ChangesDevWorkspace watcher lifecycle
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The change improves handling of forbidden and missing namespaces without any actionable merge-blocking risk remaining; it is merge-ready after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
==========================================
+ Coverage 0.00% 35.04% +35.04%
==========================================
Files 4 113 +109
Lines 26 4917 +4891
Branches 0 946 +946
==========================================
+ Hits 0 1723 +1723
- Misses 26 2942 +2916
- Partials 0 252 +252 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What does this PR do?
Handles Kubernetes
403 Forbiddenand404 Not Founderrors when creating DevWorkspace watchers for namespaces where the user does not have permission to watchdevworkspaces.Why is this needed?
The initial DevWorkspace listing can succeed even when the user does not have
watchpermission. The watcher was created outside the exception handling block, causing theApiExceptionto escape the coroutine and terminate the watcher.This change:
tryblock.403/404errors without repeatedly retrying.This allows the Gateway to gracefully handle namespaces where DevWorkspace watch permissions are unavailable.