-
Notifications
You must be signed in to change notification settings - Fork 317
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
feat: user suppressions adaptations for namespaces #2604
Conversation
Codecov ReportBase: 43.75% // Head: 43.81% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2604 +/- ##
==========================================
+ Coverage 43.75% 43.81% +0.06%
==========================================
Files 186 186
Lines 39893 39905 +12
==========================================
+ Hits 17455 17485 +30
+ Misses 21344 21324 -20
- Partials 1094 1096 +2
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. |
7f78c6c
to
23c1eda
Compare
c4150a7
to
941e1e3
Compare
9a9a1bb
to
d23ec68
Compare
d23ec68
to
2391c2e
Compare
// Identifier abstracts how data-plane can be identified to the control-plane. | ||
// | ||
// Including both a unique identifier and the authentication method. | ||
type Identifier interface { | ||
ID() string | ||
BasicAuth() (string, string) | ||
Type() deployment.Type |
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.
Why not use reflection to determine the type?
It is quite an idiomatic way, the only downside is performance.
} | ||
|
||
func (suppressUser *SuppressRegulationHandler) setup(ctx context.Context) { | ||
suppressUser.RegulationBackendURL = configBackendURL | ||
switch suppressUser.ID.Type() { |
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 would suggest this approach mainly for consistency. I also find it more idiomatic, but that is up for discussion.
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.
Usually, it is considered to be a bad practice requiring from the consumer of an exported type to have to know both about the generic interface type and the concrete implementation types, since it beats the original purpose of the interface, that is abstracting from the underlying implementation(s).
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, a non-blocking comment regarding type.
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
Description
server can poll new namespaces endpoint to fetch the suppression for workspaces that constitute a namespace.
Notion Ticket
suppress-user adaptations for multitenant
Security