-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
errors.IsUnauthorized(err) no longer works with controller-runtime 0.15.0 #2513
Comments
Will we see the same behavior with IsForbidden, IsConflict, etc.? |
We have this code which handled the IsUnauthorized case with controller-runtime 0.13.2 but does not with controller-runtime 0.15.0. This code used to bypass the if block but now does not with 0.15.0 when unauthorized.
|
/kind support
Moving from v0.13.2 to v0.15.0 indicated some breaking changes that the users need to be aware of. Making a big jump to two minor version can face serious impact of change around this library and others that are shared between controller-runtime and k8s.io/* You may need to read from a different client |
Had to use this local function instead of just calling apierrors.IsUnauthorized(err) to get the same behavior as 0.13.2.
Seems like a breaking change to me that is not documented. I have seen others had to use something similar to replace apierrors.IsNotFound(err). |
This landed in v0.16.2 release |
Will this be backported to 0.15? Looks related but the PR mentions fixes use of meta.IsNoMatchError() which is not what I am using |
I'm not sure, if I make the backport, it will still need to be released by the maintainers. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
After calling client.Get we are checking for Unauthorized using errors.IsUnauthorized(err). This no longer works with controller-runtime 0.15.0. err is a wrapped error now which seems to be the root of the problem. errors is imported from k8s.io/apimachinery/pkg/api/errors. Is this expected behavior? I did not see any mention of this breakage in the release notes.
The text was updated successfully, but these errors were encountered: