-
Notifications
You must be signed in to change notification settings - Fork 226
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
fix: save fnConfig for custom path #3047
Conversation
fd636b9
to
893509c
Compare
893509c
to
e21bfc1
Compare
I liked current behavior of I believe we can have best of both the behaviors:
|
That's a good point. Would users ever want to use a fn-config outside of the kpt package? I am thinking of rather than enforcing the path be relative to the kpt package, how about keep a copy fn-config if the path is outside the pkg dir? Would that be more convenient for users or cause unnecessary confusions? |
Note users use
Copying |
Sounds good. I added a check to only save function if fn-config is inside kpt pkg. Please see the last commit |
496e16b
to
d4b9ff1
Compare
Problem:
When saving a function to the Kptfile with
--fn-config
flag, current code saves the fn-config relevant path to current dir. This is incorrect, the fn-config should be relevant path to the kpt package dir. See below exmapleExample:
Users run
kpt fn eval
against a custom path "yuyu" and not using the current working dir, e.g.The Kptfile is
After the fix, it will be
Updates:
Restrict conditions that the fn-config must be under kpt pkg if saving flags. if fn-config is outside pkg, here's the error message: