Question: How do you handle baselining the original dependency tree? #8
-
This tool great, thanks for creating it. I'm curious where you get the baseline dependency output that you compare the new dependency output? My thought was to have the ability for someone to re-baseline when a change occurred, and to keep the dependencies output under source control. That way you'd always see the diff in git, and you'd have something to compare to. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The process is very similar to what I recommended for productionizing Diffuse. On every CI build (whether for a PR or your trunk branch), capture the dependency tree output from Gradle and store it somewhere using the git SHA. This somewhere can be the local filesystem if you have a single CI machine, a shared NFS filesystem, or a cloud storage mechanism like AWS S3. You are using this storage mechanism like a database that is indexed by git SHA so the most important property is to be able to re-resolve the file using a git SHA. On every CI build for a pull request, first compute the ancestor commit against your integration branch. This is done with Now that you have the old dependency tree text file, you just need to run Gradle to produce the new dependency tree after which time you can use the tool to compare them. This process of having a "database" of old dependency trees is much easier in practice than re-running Gradle using the merge-base commit. And since they're text file they are extremely small and cheap to store. And since no one will be branching from SHAs that are older than a few weeks, you can drop them after a few weeks so that the size and cost of storage remains relatively fixed. |
Beta Was this translation helpful? Give feedback.
The process is very similar to what I recommended for productionizing Diffuse.
On every CI build (whether for a PR or your trunk branch), capture the dependency tree output from Gradle and store it somewhere using the git SHA. This somewhere can be the local filesystem if you have a single CI machine, a shared NFS filesystem, or a cloud storage mechanism like AWS S3. You are using this storage mechanism like a database that is indexed by git SHA so the most important property is to be able to re-resolve the file using a git SHA.
On every CI build for a pull request, first compute the ancestor commit against your integration branch. This is done with
git merge-base --all $PR_SHA origin/trunk
…