Remove cheetah from templater (SC-964)#1416
Conversation
holmanb
commented
Apr 28, 2022
|
The failure: cheetah-fail.log |
TheRealFalcon
left a comment
There was a problem hiding this comment.
We should be able to clear out this file too:
https://github.com/canonical/cloud-init/blob/main/tests/unittests/__init__.py/
Verified there's no templates using cheetah anywhere in the code base and that it's impossible to use a cheetah template as user data. It is still theoretically possible to include a cheetah template somewhere in /etc/cloud (cloud-init devel render can still render it), but given that there were multiple bugs almost 10 years ago complaining about how old and unsupported cheetah is, jinja is ubiquitous and has been for years, and we have no reference to it anywhere in our docs, I think the regression risk is small enough that we can just drop it.
@blackboxsw , do you agree?
|
Yes good suggestion here. I agree that this should be dropped. And per @TheRealFalcon's concern about someone potentially adding a What we get is an error along the lines of the following (confirmed with either jinja or cheetah templates) 2022-04-29 20:14:55,007 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 3 column 2: "while scanning for the next tokenGenerally speaking though, I think it would be a pretty useful feature to allow templates in /etc/cloud/cloud.cfg.d. We should discuss this and decide whether we can carve out some time to provide that feature (it's been requested a few times in drive-by questions in IRC). |
|
The issue we'd have to solve if we wanted to support rendering jinja templates from |
blackboxsw
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the view to remove antiquated content/functionality.
|
Oh, I assumed templating was already a thing for /etc/cloud. If it's not, I'm not sure I want to support it 😄 . I'm assuming the main reason people are asking is so they can shove more userdata into |
|
@blackboxsw @TheRealFalcon Thanks for the reviews! |