Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hermit cli version from Renovate bot #345

Open
OmarTawfik opened this issue Nov 14, 2022 · 3 comments
Open

Update hermit cli version from Renovate bot #345

OmarTawfik opened this issue Nov 14, 2022 · 3 comments

Comments

@OmarTawfik
Copy link
Contributor

OmarTawfik commented Nov 14, 2022

Follow up from #342

The current Renovate plugin supports updating versions of the binaries, but not the version of the hermit binary itself.

This is usually specified in the bin/hermit file, and it defaults to using the stable channel:

export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}"

This means projects using Hermit can and will be broken if a bad version of Hermit gets released to Stable channel.

One solution would be to set a custom env var HERMIT_DIST_URL like https://github.com/cashapp/hermit/releases/download/v0.31.1. But that has two problems:

  1. This variable needs to be set before Hermit is actually invoked and loaded, which means that we need an external way to set it, other than the supported/recommended way in hermit.hcl env property.
  2. That will quickly go out of sync, and users need to update it manually regularly.

I suggest that if a repo locks the default installation URL in bin/hermit to specific versions, that Renovate bot updates it during regular updates. This means:

  1. Users will stay up to date.
  2. No need for an external (additional to Hermit) solution to manage environment variables before Hermit gets loaded.
  3. This change is backwards compatible. users can still stay on stable channel if they want, and the bot won't change it if so.
@OmarTawfik
Copy link
Contributor Author

@alecthomas actually, I tried to lock the hermit version downloaded in bin/hermit like this:

export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/v0.31.2}"

But this produces an error:

fatal:hermit: builtin:////hermit.hcl: no channel [email protected] found in channels (hermit@canary, hermit@stable) or versions (): unknown package

Is this a supported use case? Is there something else that can be modified to allow this?

@alecthomas
Copy link
Collaborator

Bit of an odd error, but no it is not supported. Hermit itself can currently only be updated from a channel.

@OmarTawfik
Copy link
Contributor Author

Thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants