-
Notifications
You must be signed in to change notification settings - Fork 225
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
use template store pull in build for fetching the configured template before default templates #965
base: master
Are you sure you want to change the base?
Conversation
… first Signed-off-by: Nikhil Sharma <[email protected]>
@alexellis PTAL |
Hi @NikhilSharmaWe will do. Could you format your commit message please? |
It's not what I was asking for, but this behaviour may be better. We also need to handle the case where someone's set up the configuration section in the YAML file to specify which templates to download. See the note here: #927 (comment) That section needs to be considered. This works because golang-middleware is in the template store to - but a custom template may not be in the store - therefore, you'd have the URL in the config section.. and the CLI would need to iterate / check there and download those templates (if required). |
@alexellis In this : #927 (comment), you are using
instead of
Here I try it out with no source and with a custom source, and it works. PTAL: https://asciinema.org/a/OWfpfF1AQe39tgB1km5zu1tX3 Please give your thoughts. |
Interesting... I wonder whether that was the issue all along - that it worked, but I was giving the wrong name for the section in the YAML. But I also like the idea of looking at the store for any templates that are not found in a local directory. |
@alexellis Please inform me if just in case something else needs to be added here. |
We need to have several people play with this, and ideally draw up a truth table of how the command works in different scenarios. No templates locally, no config section, named function not in store This is at least 3x3 configurations to evaluate. |
if pullErr := pullTemplates(templateAddress); pullErr != nil { | ||
return fmt.Errorf("could not pull templates for OpenFaaS: %v", pullErr) | ||
for _, function := range services.Functions { | ||
runTemplateStorePull(cmd, []string{function.Language}) |
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.
@alexellis Just informing you that I'm a little busy with my exams this week, so I'll be able to test the scenarios for these changes after this week.
Thank you
@alexellis Any updates regarding this? |
@alexellis PTAL at my previous comment. |
I left a comment, I'm not sure if you've seen it yet? #965 (comment) |
Description
This PR makes the
faas-cli
fetch the template specified in the config yaml of a function before pulling the default templates fromhttps://github.com/openfaas/templates.git
.Motivation and Context
Fixes: [Feature Request] Fetch templates from configuration first #927
How Has This Been Tested?
Demo: https://asciinema.org/a/5caWeeVN1fDHWZ8gNqU6GADi5
Types of changes
Checklist:
git commit -s