-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add underscore to js evaluation to allow for use of get() #83
Conversation
On Performanceafter pulling up vm creation to an init function it is way way faster in every sense:
(tested on 1.5k entries) On shared stateI reckon overwriting the subject each operation will protect us from any serious issues and further effort is not warranted because:
|
Something isn't quite right here - when I test locally on the backstage samples, only catalog types defined without a filter are synced. Filters are checked in |
tweaked the jsonnet file, should be working now |
aliases: [ | ||
'$.metadata.name', | ||
'_.get($.badKey, "name", "default alias")', |
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.
did you mean to commit $badKey
?
also, in these cases, we're sure that accessing nested field as normal still works? i assume so but wanted to check. We probably don't need all the examples of _.get()
in the sample docs IMO (lmk what you think). Hopefully it's clear from expressions.md
that you can use both methods
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 think that was just testing out aliases. I've replaced it with something less confusing
This looks good and all works for me! You can merge and cut a minor release. Also it's probably worth following up w Hank from Netflix (you can find this on the original thread) |
This will help with nested fields that could potentially be
null