-
Notifications
You must be signed in to change notification settings - Fork 592
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: add more logs data when unparsable Gateway API error is received #6673
base: main
Are you sure you want to change the base?
chore: add more logs data when unparsable Gateway API error is received #6673
Conversation
8094f6e
to
26427b1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6673 +/- ##
=======================================
+ Coverage 77.7% 80.1% +2.3%
=======================================
Files 202 203 +1
Lines 23798 23836 +38
=======================================
+ Hits 18497 19096 +599
+ Misses 4362 3775 -587
- Partials 939 965 +26 ☔ View full report in Codecov by Sentry. |
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.
👍
if strings.HasPrefix(tag, util.K8sNameTagPrefix) { | ||
re.Name = strings.TrimPrefix(tag, util.K8sNameTagPrefix) | ||
continue | ||
} | ||
if strings.HasPrefix(tag, util.K8sNamespaceTagPrefix) { | ||
re.Namespace = strings.TrimPrefix(tag, util.K8sNamespaceTagPrefix) | ||
continue | ||
} | ||
if strings.HasPrefix(tag, util.K8sKindTagPrefix) { | ||
gvk.Kind = strings.TrimPrefix(tag, util.K8sKindTagPrefix) | ||
continue | ||
} | ||
if strings.HasPrefix(tag, util.K8sVersionTagPrefix) { | ||
gvk.Version = strings.TrimPrefix(tag, util.K8sVersionTagPrefix) | ||
continue | ||
} | ||
// this will not set anything for core resources | ||
if strings.HasPrefix(tag, util.K8sGroupTagPrefix) { | ||
gvk.Group = strings.TrimPrefix(tag, util.K8sGroupTagPrefix) | ||
continue | ||
} | ||
if strings.HasPrefix(tag, util.K8sUIDTagPrefix) { | ||
re.UID = strings.TrimPrefix(tag, util.K8sUIDTagPrefix) | ||
continue | ||
} |
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.
Maybe turning this into a switch would make sense, WDYT?
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.
👍 PTAL 174a92a
658281b
to
51b0ee4
Compare
What this PR does / why we need it:
This makes the
Entity tags missing fields {"name": "", "error": "no name"}
errors, have a bit more context so that they are actually helpful in debugging:Related to #6660