-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(templates): add ability to call templates within a template #794
Conversation
Codecov Report
@@ Coverage Diff @@
## main #794 +/- ##
==========================================
+ Coverage 66.13% 66.21% +0.08%
==========================================
Files 297 297
Lines 13876 13900 +24
==========================================
+ Hits 9177 9204 +27
+ Misses 4252 4250 -2
+ Partials 447 446 -1
|
We may want to consider adding some caching for the getTemplate function to avoid fetching the same templates multiple times. EDIT: the extra compile duration caused by these changes could be concerning without caching since GitHub expects a response to webhooks within 10 seconds for github.com or 30 seconds for GHES. |
I really like the idea of caching templates. I know we have at least a few templates that have widespread usage and definitely would take up permanent residence in that cache. As for the extra compile duration, that is definitely something to consider. In my testing the responses were rather quick, but since template depth is renewed for each individual step, it could definitely get messy with dozens of steps each calling a chain of templates. It would be worth investigating some of those recommendations in the links related to queuing up work and giving the SCM a quick response... |
Putting in draft for now. Let's reopen this discussion after |
Bringing this out of draft |
putting this back in draft, as I decided to tackle |
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.
bunch of minor things and a couple of questions.
should we validate the value that was provided for max-template-depth
?
… feat/templateception
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.
nice work - would like to see docs pr as well
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.
nice, i like the tests
Closes go-vela/community#256
Using a configurable max depth, this change would allow Vela users to call templates within templates.