Feature: Ability to Export Dashboard Data #29105
Closed
Arc676
started this conversation in
Suggest an Idea
Replies: 1 comment 3 replies
-
I think you are looking for this: https://docs.renovatebot.com/self-hosted-configuration/#reporttype |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tell us more.
Motivation
Suppose you have a large number of interdependent repositories with dependencies kept up to date by Renovate. Each repository has a Dependency Dashboard that shows what each individual application depends on, but there is no central data source from which you can see how the repositories are all connected. One possible solution is to use Renovate's
postUpgradeTasks
; after each update, store the dependency information and upload it to some central repository. While functional, this is comparatively inefficient because an action has to be taken for each individual dependency. Also, the central repository would only be updated when Renovate commits changes. If you want to record version information in the central repository, it will always be either ahead of or behind the true state of the applications (unless you always automerge Renovate's changes).In fact, the Dependency Dashboard is the ideal data source for building this central repository, since it contains all of a repository's dependencies in one place. Thus, the feature request: make it possible to configure additional behavior after creating the dashboard such that this data can be exported somehow (see also #Alternative Solutions at the end of this post).
Concrete Example
My own end goal here is to build a dependency graph for a large number of repositories. The dependency graph I'm building is accessible via REST API, so the approaches mentioned above would be
curl
in thepostUpgradeTasks
orfetch
in Renovate itself. I've included the patch for my specific use case below to illustrate the relevant change to Renovate. For general use, the exact behavior would have to be configurable in some way. It should also be noted that this feature could be implemented with more isolated changes, but I wanted to avoid copying the dependency list multiple times.Alternative Solutions
It is not strictly necessary for Renovate itself to upload the dashboard data. The end goal is also achievable by adding an option to have Renovate dump the Dependency Dashboard (or, preferably, a JSON-encoded list of the dependencies as constructed in the patch above) to disk once it's done processing each individual repository. The key difference from
postUpgradeTasks
is providing access to the metadata of all the dependencies at once, as well as running strictly once per repository only.While this feature could just be implemented in a fork, that would result in a separate codebase to maintain and keep up to date with Renovate's upstream changes, which isn't ideal.
It must also be acknowledged that this could be done without modifying Renovate by just writing another crawler and searching for the Dependency Dashboard in each repository, but this would mean visiting all the repositories twice. In particular, the crawler would have to query the dashboards even if Renovate didn't find any outdated dependencies, since it has no way of knowing which repositories had their dependencies updated. The goal of this discussion is to probe the interest in having this feature (or something similar) built directly into Renovate itself so that the end goal can be achieved more efficiently.
Beta Was this translation helpful? Give feedback.
All reactions