The faas-cli used to be the home for the OpenFaaS templates, but now it's the templates repo instead. We should delete the template folder from the faas-cli repo when we're comfortable that everyone has upgraded to a version of the CLI that points to the templates repo
https://github.com/openfaas/templates/
We will also need to update the build/deploy scripts for the samples so they do a faas template pull before building - otherwise it will generate an error.
The duplicate templates exist here - https://github.com/openfaas/faas-cli/tree/master/template
@BurtonR @rgee0 FYI
Is this on the correct repo?
What is meant when we refer to future? Is it hours, days, weeks?
This is where the anonymous analytics would have really helped out. Using av we could measure __an__ impact of this change to inform our comfort levels.
Yes this is the best repo to surface and to track suggestions.
We are where we are, so when do we do this work?
@alexellis @rgee0 I would like to work on this issue by submitting a pull request. Before doing that, I've reviewed the code. In the current HEAD version, the DefaultTemplateRepository is already set to https://github.com/openfaas/templates.git.
And in the build script, it already calls the PullTemplates method, which will pull templates from default repo https://github.com/openfaas/templates.git if no repo is indicated. In the deploy script, it will check the ./template folder, and ask to run faas template pull command if there is no template in ./template folder, which will still work if we delete the template folder from the faas-cli repo.
So does that mean we just need to simply delete the template folder from the faas-cli repo, as all others are already ready?
I do believe that you are correct @stantonxu! Thanks for taking the time to dig through all the code to be sure of that though!
Be sure to check out the contribution guide and don't forget to sign your commit :smile:
Thank you @BurtonR for your quick confirm. Working on it.
https://github.com/openfaas/faas-cli/pull/419 ready for review.
Please be advised that this is potentially a breaking change for some users and so timing of any merge will be a consideration. In light of that please provide details of affected versions and dates in the PR detail as this will help the decision process.
@rgee0 thanks, is there a template for the affected versions and dates to be included in the PR details?
By the way, it depends on when you guys decide to approve and merge the PR. I see the current released version is 0.6.10 by Alex on Jun 5th. So should I say that the affected versions are 0.6.10 and below, and dates are Jun 5th and before?
Description of the PR https://github.com/openfaas/faas-cli/pull/419 was updated as following,
Remove the "template" folder in the faas-cli repo. The default template will be pulled from the template repo.
The
templaterepo https://github.com/openfaas/templates was added to the CLI as the default source to pull template. The change was made here on Dec 6 2017, and was release in 0.5.2 on Jan 17 2018. Anyone using an earlier version will be affected by that change.
If you land here via Google or searching issues, please let us know if you had an issue with this change. We recommend you update your CLI via curl, brew or the releases page.
Thanks @stantonxu for your first PR 馃帀
Thank you @burtonr @rgee0 @alexellis