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
Default to gcr.io/kpt-fn/ #2126
Conversation
e2e tests? docs? |
I like this change a lot. It will help us with adoption of the pipeline in Skaffold. They are looking for simplicity @yuwenma . |
85f514d
to
a0f83f3
Compare
Already added one e2e test and updated unit tests. Added reference docs. |
@phanimarupaka I don't see the change implemented for We can make this change in a central place in |
3775220
to
e7ee118
Compare
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.
The change is looking good, but needs a rebase.
e7ee118
to
a62ce79
Compare
@droot Done. |
a62ce79
to
db69c16
Compare
db69c16
to
52d2487
Compare
site/book/04-using-functions/01-declarative-function-execution.md
Outdated
Show resolved
Hide resolved
e2e/testdata/fn-eval/simple-function-short-image-path/.expected/config.yaml
Outdated
Show resolved
Hide resolved
e2e/testdata/fn-render/basicpipeline-image-short-path/.expected/diff.patch
Outdated
Show resolved
Hide resolved
internal/fnruntime/container.go
Outdated
@@ -197,6 +197,7 @@ func (f *ContainerFn) prepareImage() error { | |||
// This can help to ensure we have the latest release for "moving tags" like | |||
// v1 and v1.2. The performance cost is very minimal, since `docker pull` | |||
// checks the SHA first and only pull the missing docker layer(s). | |||
f.Image = AddDefaultImagePathPrefix(f.Image) |
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.
We probably want to resolve this at the higher layer. Look where we create containerRunner
and functionRunner
in runner.go
because there might be other pieces where full name is probably desired ?
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.
That is not propagating it in all places. It is safe to resolve it as places we make calls to docker cli and displaying results.
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 looked at the code. There are two places where the changes will ensure that they are propagated in all places:
- for
fn eval
, we should resolve this in the command runner itself like we are doing in thecmdfndoc.go
- for
fn render
, doing it infnChain
function which will ensure it's propagated in all places. Another option is doing it inpkg.Pipeline()
function.
Calling it individually where we make calls to docker or displayResults is not safe IMO.
52d2487
to
2b9fd04
Compare
7f017c9
to
3bcde50
Compare
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 have a suggestion on where to resolve the image in the call stack. Happy to discuss.
internal/fnruntime/container.go
Outdated
@@ -197,6 +197,7 @@ func (f *ContainerFn) prepareImage() error { | |||
// This can help to ensure we have the latest release for "moving tags" like | |||
// v1 and v1.2. The performance cost is very minimal, since `docker pull` | |||
// checks the SHA first and only pull the missing docker layer(s). | |||
f.Image = AddDefaultImagePathPrefix(f.Image) |
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 looked at the code. There are two places where the changes will ensure that they are propagated in all places:
- for
fn eval
, we should resolve this in the command runner itself like we are doing in thecmdfndoc.go
- for
fn render
, doing it infnChain
function which will ensure it's propagated in all places. Another option is doing it inpkg.Pipeline()
function.
Calling it individually where we make calls to docker or displayResults is not safe IMO.
Add default image prefix(
gcr.io/kpt-fn/
) if full path is not specified.Introduce short form for
--include-meta-resources, m
flag.