-
Notifications
You must be signed in to change notification settings - Fork 54
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
🐛 wrap service account not found error #1477
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1477 +/- ##
==========================================
- Coverage 74.73% 74.63% -0.10%
==========================================
Files 42 42
Lines 3241 3244 +3
==========================================
- Hits 2422 2421 -1
- Misses 646 649 +3
- Partials 173 174 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fixes #1297 |
While PR creates a predictable error string, the message is still pretty much the same and does not yet fix the issue:
@rashmi43 Would you please create your own error type[1] and catch this error before it is written to the Condition message to provide your own custom error message? |
@rashmi43 @thetechnick I have a feeling that prefix to the error message of operator-controller/internal/action/restconfig.go Lines 15 to 32 in e5820ae
I imagine somewhere, either in the client-go or Helm code, there is an assumption that if these round trips fail it is likely due to the cluster being "unreachable" for some reason. I'm not sure that implementing a custom error type will remove that information from the error message. Would improving the message to be more reflective of the context in which it is being returned be more helpful? Maybe we can have something like: - lastTransitionTime: "2024-11-18T14:41:05Z"
message: 'Unable to apply bundle content to cluster: Kubernetes cluster unreachable: Get "https://10.96.0.1:443/version": Unable to authenticate with Kubernetes cluster using ServiceAccount "foo": ServiceAccount "foo" not found'
observedGeneration: 1
reason: Failed
status: Unknown
type: Installed Would that make it a bit more clear that in this case the Kubernetes cluster is unreachable when using a client relying on authenticating as the provided ServiceAccount since that ServiceAccount does not exist? |
Alternatively, with the custom error type we could attempt to parse the error string/type wherever it is returned and attempt to strip out what we think is the unnecessary prefix. |
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.
HI @rashmi43
Could you please rebase the commits?
Otherwise, when it gets merged, and we run git log
, it will result in a very lousy commit message.
Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
@everettraven By creating a custom error into the TokenGetter we can keep the error message short and precise. To pick up your example, I would be very happy if the condition message just reads: |
I think this is reasonable. I mostly wanted to call out that I think it will take more of an effort to restrict the error string that we place into the status than simply adding a custom error type that is returned in the TokenGetter. The custom error may help us to identify when we've hit that error type, but there is most certainly additional error wrapping happening beyond the error message that we are returning from the TokenGetter. |
Update go version checker (operator-framework#1474) * Handle new files (old version is empty) * Handle the case where .0 patch is added/removed Signed-off-by: Todd Short <[email protected]> sa not found Signed-off-by: rashmi_kh <[email protected]> 📖 Document OLMv1 permission model (operator-framework#1380) * changes to derice minimum service account Signed-off-by: rashmi_kh <[email protected]> * remove headers Signed-off-by: rashmi_kh <[email protected]> * add details about registry+v1 support * render yml correctly Signed-off-by: rashmi_kh <[email protected]> * create doc for olmv1 permission model Signed-off-by: rashmi_kh <[email protected]> * Delete docs/drafts directory * Update permission-model.md * update permission models with link Signed-off-by: rashmi_kh <[email protected]> * add space Signed-off-by: rashmi_kh <[email protected]> * add more structure Signed-off-by: rashmi_kh <[email protected]> * incorporate review comments Signed-off-by: rashmi_kh <[email protected]> * incorporate review comments Signed-off-by: rashmi_kh <[email protected]> * pers review comments-s * example as header-s * update the example Signed-off-by: rashmi_kh <[email protected]> --------- Signed-off-by: rashmi_kh <[email protected]> Delete docs/drafts/derive-serviceaccount.md add custom sa not found Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
Signed-off-by: rashmi_kh <[email protected]>
Description
Reviewer Checklist