-
Notifications
You must be signed in to change notification settings - Fork 136
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
Change logic in WorkLoad retrieval when OwnerReference of Pod is no Controller #3170
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3170 +/- ##
==========================================
- Coverage 59.30% 59.30% -0.01%
==========================================
Files 319 319
Lines 17477 17481 +4
==========================================
+ Hits 10365 10367 +2
- Misses 5947 5948 +1
- Partials 1165 1166 +1 ☔ 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.
<This was just a draft 😅 moved comment to the line>
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.
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.
line 93
t.Run("should be empty if owner is not well known", func(t *testing.T) {
vvvv
t.Run("should be unknown if owner is not well known", func(t *testing.T) {
Co-authored-by: aorcholski <84514340+aorcholski@users.noreply.github.com>
Description
Respective ticket: https://dt-rnd.atlassian.net/browse/K8S-9998
Because we normally assign the podName to the workload info in a certain corner case (when we have a ownerreference which is no controller) it can occur that the DT_WORKLOAD_KIND env var is set to empty.
This is fixed by simply using GenerateName instead of Name.
How can this be tested?