Collect unset values in std::template and raise them all at once
@edvgui is already working on this.
Since Aug 12, 2026.
- Dominant language
- Python
- Stars
- 0
- Forks
- 6
- Avg merge
- 12h 25m
- Merged PRs (30d)
- 5
Description
The future module has a performance improvement for templates which have lots of unset values: it tries to resolve them all, catch all unset once and raise them all at once, such that the compiler doesn't re-evaluate the template every time one value is resolved, but only once they all are.
- https://code.inmanta.com/solutions/modules/future/-/blob/master/inmanta_plugins/future/std/monkeypatch.py?ref_type=heads#L117
- https://code.inmanta.com/solutions/modules/future/-/blob/master/inmanta_plugins/future/std/__init__.py?ref_type=heads#L117
- https://code.inmanta.com/solutions/modules/future/-/blob/master/inmanta_plugins/future/std/__init__.py?ref_type=heads#L415
This is done in another plugin (future::std::jinja) which has the same function. This plugin also supports references, which std::template doesn't, but this is out of scope for now.
Import the performance improvement, and make sure it is tested.
Other place where the improvement exists, which may (or may not) contain more test coverage: https://github.com/edvgui/inmanta-module-files/blob/6922a2e84aafc50659b1cadc601f77a958010756/tests/test_jinja.py#L241
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.