-
Notifications
You must be signed in to change notification settings - Fork 223
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 stack file template configuration to build #726
Add stack file template configuration to build #726
Conversation
6533820
to
8b3bff9
Compare
I'm not convinced about the UX here. I know the issue said pull the templates only if the template folder doesn't exist but lets consider where the template folder does exist but the language template isn't contained within. Should this work without overwrite? As its non-destructive it feels like it ought to. |
Hey Richard, I can remove overwrite flag from the build command and in case you want to overwrite something you can be explicit and use |
Possibly (having an |
I agree with you @rgee0 having overwrite on build is kind of confusing. I will probably remove the flag for this command. Otherwise if the template folder exists and we add another template to the configuration only the new templates will be pulled on build. I believe Lucas has the same question in his mind. And following the logic it works without overwrite 👍 I apologize for misreading the question first time, I had a ton of things going around at that moment and at those moments your brain just sings a song to keep you form concentrating 😄 |
8b3bff9
to
86b97f1
Compare
Removed |
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.
This worked for me and i think it looks good.
Also, i think once this is merged, i can add the "common" folder support to the StackConfiguration
as well
Not familiar with |
@martindekov feel free to ignore my comment about common folder, it is a separate feature, but the configuration will go inside StackConfiguration |
#322 is the common folder discussion |
@martindekov a rebase is required for this PR. Could you also add a flag that can be used by OpenFaaS Cloud and git-tar to turn off the custom template behaviour? i.e. |
Yeah Alex no problems 👍 |
Adding functionality which will pull templates defined in the function YAML file. Also removed the filtering funcitonality from template pull stack command and renamed the method which will be used to pull the configuration Signed-off-by: Martin Dekov <[email protected]>
86b97f1
to
ac60b4f
Compare
Done 👍 Tested
And with flag
|
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.
Approved
Adding functionality which will pull templates defined in the
function YAML file. Additionaly added overwrite flag to the
build command in order to enable the command to overwrite
templates. Also removed the filtering funcitonality from template
pull stack command and renamed the method which will be used to
pull the configuration
Signed-off-by: Martin Dekov [email protected]
Configuration in stack.yml file was used only by
template pull stack
command. Now the configuration is additionally red in the building phase of the function.Description
Adding
--overwrite
flag to thefaas-cli build
command as it reads and pull templatesdefined in the function YAML file. Removing the filtering logic of the
template pull stack
along with its testing as requested and renaming the method responsible for the pulling.
Motivation and Context
Closes #725
How Has This Been Tested?
Appended to a new function's
stack.yml
the following:and tested
faas-cli build
- pulled templates if not there, if there used them cachedfaas-cli build --overwrite
- pulled templates no matter present or notfaas-cli template pull stack
- same as abovefaas-cli template pull stack --overwrite
- same as aboveAdditional case when there are already existing templates(
perl-alpine
,rust
,valum-http
) and we decide to add additional template(crystal-http
) to the configuration the following happens.Removed the appended template configuration and re-ran the tests mentioned above and the building process was as it were without the change.
Types of changes
Checklist:
git commit -s