FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
  • Dr Rich Wareham's avatar
    5e998990
    feat: template minimum version numbers for dependencies · 5e998990
    Dr Rich Wareham authored
    In #98 some of the challenges with having renovate keep dependencies
    fresh in this repo were discussed. In particular the contents of the
    template/ directory are, well, templated and so there's no guarantee
    that renovatebot will be able to parse them. Even if we made them
    parseable, it's hard to enforce continued parse-ability in CI.
    
    Instead, lean in to the templating approach by adding files which
    renovatebot *can* parse specify the minimum version requirements and
    have copier read from that file to populate the requirements within the
    template.
    
    Fortunately the copier installed alongside renovatebot has support for
    copier-templates-extensions installed which, in turn, allows adding
    custom extensions to the template context via Python scripts inside the
    template repo.
    
    Combine both things together: we now have `template*requirements.txt`
    files which renovatebot *can* parse and update which are used to
    replace constructions such as `{{ deps.somepackagename.version }}` in
    the `pyproject.toml` and `.gitlab/webapp.gitlab-ci.yml` files. When
    renovatebot updates the `template*requirements.txt` files, the templates
    will automatically make use of the new minimum versions.
    
    Note that these are always *minimum* versions. We don't want to stop
    renovate from being able to _additionally_ update dependencies in
    templated repos even if a new version of the template with bumped
    dependencies hasn't been released.
    
    Add some configuration to `renovate.json` to reduce the number of MRs
    likely to be raised by renovate to a manageable rate.
    
    [1] https://github.com/renovatebot/renovate/discussions/34368
    5e998990
    History
    feat: template minimum version numbers for dependencies
    Dr Rich Wareham authored
    In #98 some of the challenges with having renovate keep dependencies
    fresh in this repo were discussed. In particular the contents of the
    template/ directory are, well, templated and so there's no guarantee
    that renovatebot will be able to parse them. Even if we made them
    parseable, it's hard to enforce continued parse-ability in CI.
    
    Instead, lean in to the templating approach by adding files which
    renovatebot *can* parse specify the minimum version requirements and
    have copier read from that file to populate the requirements within the
    template.
    
    Fortunately the copier installed alongside renovatebot has support for
    copier-templates-extensions installed which, in turn, allows adding
    custom extensions to the template context via Python scripts inside the
    template repo.
    
    Combine both things together: we now have `template*requirements.txt`
    files which renovatebot *can* parse and update which are used to
    replace constructions such as `{{ deps.somepackagename.version }}` in
    the `pyproject.toml` and `.gitlab/webapp.gitlab-ci.yml` files. When
    renovatebot updates the `template*requirements.txt` files, the templates
    will automatically make use of the new minimum versions.
    
    Note that these are always *minimum* versions. We don't want to stop
    renovate from being able to _additionally_ update dependencies in
    templated repos even if a new version of the template with bumped
    dependencies hasn't been released.
    
    Add some configuration to `renovate.json` to reduce the number of MRs
    likely to be raised by renovate to a manageable rate.
    
    [1] https://github.com/renovatebot/renovate/discussions/34368
Code owners
Assign users and groups as approvers for specific file changes. Learn more.