-
Notifications
You must be signed in to change notification settings - Fork 228
Fix pull stack command #1013
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 pull stack command #1013
Conversation
AI Pull Request OverviewSummary
Summary per fileSummary per file
Overall AssessmentOverall AssessmentThe changes effectively address the regression in template pulling functionality introduced by prior template pinning modifications. The fix ensures that Detailed ReviewDetailed Reviewcommands/fetch_templates.go
commands/template_pull_stack.go
General Concerns
Prioritize adding comprehensive tests and minor refactoring to prevent future issues. AI agent details. |
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
2ac1815 to
89146ff
Compare
AI Pull Request OverviewSummary
Summary per fileSummary per file
Overall AssessmentOverall AssessmentThe changes correctly address the reported regression in the The implementation is straightforward and maintains backward compatibility. However, there are opportunities for improvement in error handling and test coverage. Detailed ReviewDetailed ReviewCode Changes Analysiscommands/template_pull_stack.go:
commands/fetch_templates.go:
Strengths
Areas for ImprovementError Handling:
Test Coverage:
Code Consistency:
Security and Performance
Migration and Compatibility
Recommendations
The fix is solid and addresses the immediate issue. The suggested improvements would enhance robustness and maintainability. AI agent details. |
Description
Fix template handling for
faas-cli template pull stackThis PR fixes an issue where templates defined in a stack’s
configuration.templatessection were not being pulled.Example configuration in
stack.yamlExpected behaviour:
faas-cli template pull stackshould pull each template from its specified source and copy only the template matching the configured name into thetemplate/directory, even when multiple templates come from the same repository. Templates should be stored using the names defined in the config.Expected output:
This restores the behaviour of the current faas-cli release.
Motivation and Context
Fix a regression for the
template pull stackcommand with template pinning.How Has This Been Tested?
All existing Unit test pass.
Tested the
build,publishandtemplate pull stackcommand with the providedstack.yamlfile and verified the correct templates are fetched.The template folder is removed between running the different commands.
Running
faas-cli template pull stackOutput:
Resulting template folder:
Running
faas-cli build --shrinkwrapOutput:
Resulting template folder:
Types of changes
Checklist:
git commit -s