-
Notifications
You must be signed in to change notification settings - Fork 6.4k
chore: bump gitops-engine for error wrapping #23282
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
chore: bump gitops-engine for error wrapping #23282
Conversation
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@@ -43,23 +43,19 @@ var ErrAnotherOperationInProgress = status.Errorf(codes.FailedPrecondition, "ano | |||
|
|||
// AugmentSyncMsg enrich the K8s message with user-relevant information | |||
func AugmentSyncMsg(res common.ResourceSyncResult, apiResourceInfoGetter func() ([]kube.APIResourceInfo, error)) (string, error) { | |||
switch res.Message { | |||
case "the server could not find the requested resource": | |||
if strings.Contains(res.Message, "the server could not find the requested resource") { |
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.
I refactored this function to return early and short-circuit instead of having a lot of nested logic. But the only functional change is to use strings.Contains instead of an exact match, in order to cope with the now-wrapped error message.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23282 +/- ##
==========================================
- Coverage 60.00% 59.93% -0.08%
==========================================
Files 341 342 +1
Lines 57818 58548 +730
==========================================
+ Hits 34694 35090 +396
- Misses 20344 20617 +273
- Partials 2780 2841 +61 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Philippe Merle <philippe.merle@inria.fr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: enneitex <etienne.divet@gmail.com>
Bumping for this change: argoproj/gitops-engine#732