Show link-access SecuredAccess failures instead of only logging them#2514
Show link-access SecuredAccess failures instead of only logging them#2514evanwang9x wants to merge 2 commits into
Conversation
…only logging them
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesSecuredAccess error propagation
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR aims to ensure link-access SecuredAccess ensure failures are surfaced via Site configured status (instead of only being logged), addressing issue #2513 so a Site can’t appear healthy while link access is broken.
Changes:
- In
Site.reconcile()initialization, attempts to reflectcheckSecuredAccess()failures in configured status. - Updates
checkSecuredAccess()to aggregateSecuredAccessFactory.Ensure(...)failures and return an error. - Adds unit tests asserting
checkSecuredAccess()returns errors and that configured status can be set to not-configured on failure.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/kube/site/site.go | Propagates SecuredAccess ensure failures upward (now returning an error from checkSecuredAccess) and attempts to reflect initialization failures in site status. |
| internal/kube/site/site_test.go | Adds tests for checkSecuredAccess() error behavior and configured-status reporting on failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/kube/site/site.go (1)
227-233: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReturn the
checkSecuredAccess()error fromreconcile()
Reconcile()already appliesupdateConfigured(err)to the returned error, so this branch should return thecheckSecuredAccess()failure instead of swallowing it; otherwise the failure is lost and the later success update can overwrite the status.
🧹 Nitpick comments (1)
internal/kube/site/site.go (1)
1542-1542: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
errors.Joinfor the aggregated SecuredAccess errors. This repo targets Go 1.25.0, so the current comma-joined string can be replaced with a joined error to preserveerrors.Is/errors.Assupport.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d701051d-beb5-41f0-8ffe-544337df8093
📒 Files selected for processing (2)
internal/kube/site/site.gointernal/kube/site/site_test.go
Closes #2513
Summary by CodeRabbit