-
Notifications
You must be signed in to change notification settings - Fork 70
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
fail soft when crds are not installed #153
fail soft when crds are not installed #153
Conversation
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.
Can we move this check to the caller logic and return a typed error from the provider, instead of having the same logic in each provider? Something like what I suggested here
/ltgm |
I dont think we should wrap an already Also, I less like the idea of a list of providers that participated in the translation. I think providers can still participate in the translation with ingress annotations and without CRDs installed. It is not ideal to have the same logic - hence a helper might be the way but I think we can not take it out to the caller, because we need to continue the execution of the provider even if the CRDs are not installed. cc: @levikobi |
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.
This looks good to me also TBH
I would have preferred having the NotFound
check once at the caller level, but the caller doesn't directly call readTCP...
or readUDP...
- it calls a method that aggregates the reading of specific CRDs. Since this mid level function that reads everything needs to keep going even if TCP for example isn't installed, we would have to make the check there...
The main issue is that we might have one error of resources not found, and another error since there was an actual problem reading from the cluster, and one error might override the other
In other words, even though I would have preferred it more, I don't see how we can move the check to the caller and preserve the required functionality
/cc @mlavacca can you relate to the feedback and lgtm if this looks good to you ? |
Oh yes, I get your point. It is not possible to move the logic entirely out of the provider, as the /lgtm |
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.
/approve
/unhold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LiorLieberman, mlavacca The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Execution should work regardless of whether CRDs are installed or not
Which issue(s) this PR fixes:
Fixes #138
Does this PR introduce a user-facing change?: