-
Notifications
You must be signed in to change notification settings - Fork 667
console-shared: Move pod's getNodeName() selector #2809
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
console-shared: Move pod's getNodeName() selector #2809
Conversation
|
/hold These selectors are an anti-pattern imo. We should be trying to remove them instead of adding more. |
|
/hold cancel |
@spadgett , Can you please explain? I see following benefits when used:
|
|
Sorry, I missed your comment in #2808 |
This isn't parsing anything. It's returning a straight property value.
We shouldn't be doing "logic coded as a string" at all. That's my point :)
IMO, it actually obscures what's really happening for someone who knows the API. You don't know if there's extra logic in the helper or what field it's really returning. It's an unnecessary level of indirection.
Shouldn't this still be possible checking references to a property in a type definition? In fact, I think this makes it harder to know where things are being used.
These APIs are stable. I see more of an argument for these helpers for alpha APIs, but that's not how we've been using these. |
Right, that's the reason for the quotes. But as there is no validation when parsing (or following the parser), the selectors can be the place to safely and once deal with unexpected input.
I agree. I have changed this PR to avoid |
|
Rebased. |
spadgett
left a comment
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.
/approve
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mareklibra, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Will be reused by cluster dashboard.
Depends on:
Just the last commit is relevant.