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

make eval to use kpt container & exec runtime #1898

Merged
merged 2 commits into from May 5, 2021

Conversation

Shell32-Natsu
Copy link
Contributor

fn eval is using container and exec runtime from kyaml. These runtimes are hardcoding the command error outputs to os.Stderr so we cannot get the stderr output from the runtime.

One alternative is refactoring the kyaml implementation to accept a writer for stderr. However, given we have had our own container runtime in kpt and is used by render. It's better to make eval and render to use the same runtime.

This PR is modifying the container runtime in kpt to support the functionalities required by fn eval and adding an exec runtime for fn eval.

@Shell32-Natsu Shell32-Natsu added this to the v1.0 m2 milestone May 4, 2021
@Shell32-Natsu Shell32-Natsu added this to In Review in kpt kanban board via automation May 4, 2021
@@ -17,5 +17,4 @@ exitCode: 1
image: gcr.io/kpt-fn/dne # non-existing image
args:
namespace: staging
stdErr: "Failed to fetch \"latest\" from request \"/v2/kpt-fn/dne/manifests/latest\""

stdErr: 'failed to check function image existence: function image "gcr.io/kpt-fn/dne" doesn''t exist'
Copy link
Contributor

Choose a reason for hiding this comment

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

Not this PR: Can we remove this failed to check function image existence part from the error ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We probably need to define a struct for this error?

@Shell32-Natsu Shell32-Natsu merged commit 47bbdb3 into kptdev:next May 5, 2021
kpt kanban board automation moved this from In Review to Done May 5, 2021
@Shell32-Natsu Shell32-Natsu deleted the container-runtime branch May 5, 2021 17:56
frankfarzan pushed a commit to frankfarzan/kpt that referenced this pull request Jun 3, 2021
* change eval to use kpt container runtime

* make eval to use kpt exec runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants