Option to provide custom datasources and managers #24729
Replies: 13 comments
-
|
@fgreinacher I think this should now be possible Both |
Beta Was this translation helpful? Give feedback.
-
|
Would it be possible to also have a config param which would point to a folder to load additional managers? Use cases:
|
Beta Was this translation helpful? Give feedback.
-
|
So from what i understand it is "out of the box" currently not possible to configure a custom datasource directly from renovate but through a custom development located in `lib/datasource/*``, correct? I worry less about the managers since the regex manager is quite powerful. E.g. I do have an Bot that uploads releases from a private vendor website to a common repository. My idea was that renovate calls a specific API or extracts the data from a file to basically get the latest version of a product. Currently - as i understand it - there is no such generic datasource, correct? I would have to build that myself and - to be able to ship it properly - would have to create a PR here. |
Beta Was this translation helpful? Give feedback.
-
Correct.
Correct. We're open to ideas about this though, e.g. in the same spirit as the regex manager but not necessarily using regex. I was looking into ideas like using JSONPath to transform results, with a few generic parsers supported (JSON, XML, TOML, YAML, etc). |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the confirmation, was reading code for a while since many of these datasources are totally unknown to me. https://docs.renovatebot.com/modules/datasource/ could use some links and a description to information of each of the datasources. I guess it makes sense to send a pull request with respective readmes for such a purpose. So my thoughts on the generic datasource:
I'm not too much an expert in renovate so far (although it worked pretty quickly i have to say!), so bear with me on the next lines. When looking at the file where i would want to exchange the version, i could envision this (extracted through the regexmanager): and in my config for renovate i would have a datasource configuration: Maybe that helps to get a discussion going? |
Beta Was this translation helpful? Give feedback.
-
|
Is there reluctance to add a full fledged manager plug-in support? |
Beta Was this translation helpful? Give feedback.
-
|
As far as I'm aware, there's nothing stopping you "dropping in" managers today if you then run the build command from source yourself. I'm not ready to commit to any run-time plugin architecture partly because I think we'll want to bundle Renovate into a single file to improve load time in the app. |
Beta Was this translation helpful? Give feedback.
-
But that means you need to basically clone renovate and run it from git? Or monkey-patch
I feel the sentiment - fair enough, but I do have to point out that the existing managers have a pretty nice API surface and adding new managers is not that hard, so good job there and I do think it's versatile enough going forward, should you chose to stick with that :) |
Beta Was this translation helpful? Give feedback.
-
No, I'd more anticipate somebody having an automated build process that takes Renovate, adds in additional files, then rebuilds and publishes it to some internal registry or Docker image. The resistance is mostly about unnecessarily painting ourselves into a corner. We've rearchitected our internal structures a lot and although happy with it for now, I don't know if in future we'll need more changes again, which would be made really hard if we've essentially "externalized" that API by making it officially in support of plugins. None of the maintainers have a need for plugins so it would require someone who does to step forward in the project and make us feel confident we're not getting saddled with technical debt that people expect us to maintain indefinitely. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
|
My feeling would be to solve this problem with external REST api endpoints (or grpc, or graphql), which means external servers for one or multiple datasources/managers (which e.g. you could write and deploy for yourself just following a given REST api scheme) which renovates understands and in the bot config one can just point to a list of reachable endpoints (or a list of endpoint configuration files / directory, since e.g. tls support and possible more is something one would want to add) As an example I think of something like in kubernetes you have admission controller, mutating and validating webhooks for example So like a datasource webhook |
Beta Was this translation helpful? Give feedback.
-
|
As another examples of possible "custom" datasource might be:
For us we use it for cmake and maven, for example: I see today this can be somehow workarounded by using some repology repo (at least I found ones for Maven and Cmake), but in general it might point to internal webserver with internal builds, so it would be still useful
For some libs we get them from a file share. Theoretically it can be turned into a webserver, but default flow would be to check the file properties, for example |
Beta Was this translation helpful? Give feedback.
-
|
Closing as we've supported these for a few years now 🚀 Feel free to raise fresh Discussion(s) if there are additional features to add |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What would you like Renovate to be able to do?
I as someone running a self-hosted Renovate bot would like to be able to add custom data sources and managers so that I can use Renovate to update dependencies using internal tools with non-standardized formats and APIs.
Describe the solution you'd like to have
The ability to inject custom data sources and managers, probably via some new global config options that specify where the custom logic can be found.
Describe alternatives you've considered
Additional context
I’d happily contribute this, if it sounds reasonable to you.
Beta Was this translation helpful? Give feedback.
All reactions