Skip to content

Documentation on using Renovate with haskell-actions #111

@ysangkok

Description

@ysangkok

Value proposition

Developers using CI may also use a dependency bumping solution such as Renovate. Those users may also use haskell-actions to run tests.

Since Haskell libraries often have wide bounds, if there is no integration between Renovate and the test run, the test run might not actually use the newly released dependency. For example, the new version could be incompatible with the GHC version that they have configured.

Messaging updated dependency versions

A way to enforce the usage of the newly released dependency that triggered the Renovate PR would be:

  • Renovate generates git trailers that list the newly released dependency versions
  • The workflow using haskell-actions picks up on this git trailer and run the test suite on the PR with Cabal constraints enforcing the use of these versions

The way I see it, the use of git trailers to relay constraints is a protocol. Ideally, that protocol would be specified somewhere, though I am not sure where this would be. Maybe it is a bit early to pin down these details. If you accept, we could use the haskell-actions repo to iterate on this, as we gather experience.

Technical implementation proposal

I'd like to contribute a section to the README. The section would be below Model Cabal workflow with caching. The new section would make suggestions on how to configure Renovate and Github Actions.

The section would have an example of commitBody similar to what I have tested in pureMD5.

It would also contain an GitHub Actions step similar to the extraction step in pureMD5.

An example of a commit with the git trailer is ed02136. The Actions tab shows the corresponding CI run with trailer extraction working.

Limitations

I have only recently Cabal support to Renovate. Some limitations are listed in the documentation. But I think it would always provide some value to users, so that's why I submit this proposal now.

Non-upgradable libraries

Renovate doesn't run tests itself. So it submits PRs purely based on the updated dependency existing. I haven't integrated a list of non-upgradable boot libraries into Renovate. This means that Renovate will try to update e.g. base.

But Cabal's solver will just fail if you pass constraints: base==4.21.0.0 without setting the matching -w flag. And as far as I know, haskell-actions doesn't know about the mapping between base and GHC either. So it can't know which GHC versions to use for a given version of base.

  • It might make sense for users to just disable updating base, template-haskell etc using ignoreDeps.
  • It might make sense for other users to configure haskell-actions to not set constraints for non-upgradable boot libraries, since it will most likely just cause the tests to fail.

If I explicitly point out these issues in the README of this repo, users will know what they're getting into, if they add Renovate. Does that seem reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions