-
Notifications
You must be signed in to change notification settings - Fork 589
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
fix(config): correctly check types.NamespacedName
flags are set
#3602
Conversation
7670012
to
e14147e
Compare
Codecov ReportBase: 72.6% // Head: 72.7% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #3602 +/- ##
=====================================
Coverage 72.6% 72.7%
=====================================
Files 131 131
Lines 15675 15694 +19
=====================================
+ Hits 11385 11411 +26
+ Misses 3535 3529 -6
+ Partials 755 754 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
overall LGTM, some minor comments.
10939dd
to
17daf2a
Compare
17daf2a
to
3dec228
Compare
@randmonkey @pmalek PTAL again, I believe all of your suggestions have been addressed: 3dec228. |
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 believe this should do it. Just one nit is that we might consider adding a type alias for mo.Option[types.NamespacedName]
(this can be done in a separate PR though).
Let's do it straight away: 5c46810 |
What this PR does / why we need it:
Makes every
types.NamespacedName
flag in themanager.Config
amo.Option
which directly express the fact that these flags are optional.mo.Option
have handy methods that allow checking whether a value was set or not (IsPresent() bool
,IsAbsent() bool
orGet() (value T, ok bool)
).We had a few cases in which we were checking that
types.NamespacedName
is not empty using itsString()
method which is implemented like so:Even with no
Namespace
andName
set,String() != ""
checks always evaluated totrue
due to the fixed separator.Which issue this PR fixes:
Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR