-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(manager): support mise backends #33113
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
const toolConfig = getToolConfig(depName, version); | ||
// Parse the tool options in the tool name | ||
const { name: depName, options: optionsInName } = | ||
// istanbul ignore next: groups is always defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This directive is not working. Since the regex includes (?<name>.+?)
, groups
should never be undefined.
|
||
Note that some tools in the registry are not using the `asdf` backend. We are currently not supporting those tool short names. | ||
|
||
TODO: Change the registry lookup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
|
||
If you are wanting to add support for an existing `asdf-x` plugin to `mise`, you can create a PR to extend Renovate's `asdf` manager, which indirectly helps Renovate's `mise` manager as well. | ||
Renovate's `mise` manager does not support the following tool syntax: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these have issues created, if they are feasible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the following issues could be listed.
- Add
aqua
datasource, which internally hasgithub_releases
or other datasources. - Add
mise
datasource to support mise registry shorthand. For example, resolveact
ofmise
datasource toaqua:nektos/act
, and then tonektos/act
ofaqua
datasource.
For other limitations, asdf
& vfox
plugins, and incompatibility of regex with tag_regex
, are not feasible, I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the limitation section about v
prefix since it works with extractVersion
set.
https://github.com/risu729/renovate/blob/be4fec7590231f9923f3cae0a8919ac14b3df16b/lib/modules/manager/mise/backends.ts#L37-L39
If `mise` adds support for more tools via its own [core plugins](https://mise.jdx.dev/plugins.html#core-plugins), you can create a PR to extend Renovate's `mise` manager to add support for the new tooling. | ||
If `mise` adds support for more tools via its own [core tools](https://mise.jdx.dev/core-tools.html), you can create a PR to extend Renovate's `mise` manager to add support for the new core tools. | ||
|
||
If you are wanting to add support for an other tools' short names to `mise`, you can create a PR to extend Renovate's `asdf` manager, which indirectly helps Renovate's `mise` manager as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is accurate advice these days. Only a fraction of mise tools make use of asdf any more, and I don't think any more are accepted. jdx/mise#4054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. Yes, it is outdated, but it's the only way to add support for short names for now.
Maybe we need to add a new datasource to support mise registry.
Changes
Supports mise backends.
https://mise.jdx.dev/dev-tools/backends/
core
asdf
aqua
cargo
dotnet
gem
go
npm
pipx
spm
ubi
vfox
Questions
Default Registry
Since the default registry now includes several backends, we need to reconsider how to store upgradeable tooling information.
Previously,
mise
only supportedasdf
plugins (and core plugins), but it now supports multiple backends. The default registry includes various backends, and some tools have fallbacks.For example:
Currently, Renovate supports these short names if they are manually registered in
upgradeable-tooling.ts
. However, we could potentially support tools not registered there by reading the registry. This approach would allow us to infer package names for backends such asaqua
,ubi
,pipx
, etc.Could creating a new datasource solve this issue? I’m not very familiar with how datasources work, but it seems the
go
datasource functions similarly by supporting multiple backend datasources.Additionally, tools in the registry can include options like:
Since the only relevant option for us is
tag_regex
, and only two tools in the registry usetag_regex
, we could ignore it.Aqua Backend
The
aqua
backend is based on aqua-registry, a registry for aqua, a CLI version manager. This registry defines how to download GitHub release binaries and specifies which ones to use.It might be beneficial to set the
extractVersion
property for GitHub releases/tags using theversion_filter
from theaqua
registry. Currently, we defineextractVersion
manually inupgradeable-tooling.ts
.While Aqua has its own Renovate config preset, aqua-renovate-config, it also sets
extractVersion
manually.v
prefixmise automatically strips
v
prefix. Even if the version is set to1.7.5
and the github release isv1.7.5
, it can be installed foraqua
andubi
backend.I feel it is redundant that Renovate requires
extractVesion="^v(?<version>.+)"
in the config for all of these tools.Are there any solutions for this?
=> Not a clean solution, but trimmed the
v
prefix from version and setextractVersion
for aqua and ubi backend.Context
Closes #30387.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
https://github.com/risu729/renovate-mise-backends/blob/main/.mise.toml
I'm going to test in a test repository and update the docs.