Should we use Jinja templates for team config files?
- Dominant language
- Python
- Stars
- 2k
- Forks
- 347
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 5
Description
We use a file called `config.ini` in rally-teams to define variables that control Rally's behavior based on the Elasticsearch version and a few other parameters. For example, this file defines the download URL for artifacts. In earlier versions of Rally, it was sufficient to define a version placeholder in the URL and replace it with the actual version.
However, with the introduction of platform-dependent artifacts and JDK bundling, it got a little bit more complex (see https://github.com/elastic/rally/pull/853). We use a very simple approach (see class `TemplateRenderer`) to replace the placeholders instead of a fully-fledged template language. Although it works fine for our purposes, it has shortcomings.
While we should not define any logic in templates, it could be worthwhile to use Jinja (the template language that we use in Rally for such purposes) to help with issues like backwards-compatibility in case we introduce new variables so we can define e.g. fallback values for older versions of Rally.
Contributor guide
Assessment
This issue has not been assessed yet.