Skip to content
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(api): Peek #467

Merged
merged 4 commits into from
Jan 8, 2021
Merged

feat(api): Peek #467

merged 4 commits into from
Jan 8, 2021

Conversation

sh0rez
Copy link
Member

@sh0rez sh0rez commented Jan 7, 2021

Introduces a new functionality called Peek with behaves like Load, but
only loads metadata.

Because this is much faster than full loading, this can be used at
places where only metadata is required.

This formalizes behavior that was previously possible by passing
EnvsOnlyEvalScript. The benefit of having this as an interface
implementation is that it can make better use of underlying details,
such as that the static loader does need to start a costly Jsonnet VM
for only parsing spec.json

sh0rez added 2 commits January 7, 2021 16:28
Introduces a new functionality called Peek with behaves like Load, but
only loads metadata.

Because this is much faster than full loading, this can be used at
places where only metadata is required.

This formalizes behavior that was previously possible by passing
`EnvsOnlyEvalScript`. The benefit of having this as an interface
implementation is that it can make better use of underlying details,
such as that the static loader does need to start a costly Jsonnet VM
for only parsing `spec.json`
Applies the Peek function at places where it makes sense
@sh0rez sh0rez added kind/feature Something new should be added component/api labels Jan 7, 2021
Copy link
Member

@Duologic Duologic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much easier to review.

pkg/tanka/load.go Outdated Show resolved Hide resolved
pkg/tanka/load.go Outdated Show resolved Hide resolved
@sh0rez sh0rez requested a review from Duologic January 7, 2021 16:33
Copy link
Member

@Duologic Duologic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sh0rez sh0rez merged commit e5b5266 into master Jan 8, 2021
@sh0rez sh0rez deleted the peek branch January 8, 2021 08:15
@sh0rez sh0rez mentioned this pull request Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api kind/feature Something new should be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants