-
Notifications
You must be signed in to change notification settings - Fork 26
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
A Proposal to Manage Dependency Updates #140
Comments
@ryanmoran looking toward the future, is the idea that maintainers will need to manually update the |
@thitch97 Yes. I think this is ideal because it requires an acknowledgement by the buildpack maintainers that a new version line is now supported. At this point, they can consider if changes to the buildpack need to be made or if we need new test coverage. |
Really like the proposal. Couple of thoughts.
|
This sounds totally reasonable and would allow others to use their own
I think this introduces another set of rules that would need to be reverse-engineered and defined. Some of the dependencies keep major lines, others keep minor lines, still others keep only ranges of patch lines. This differs widely enough that you would need some set of rules that knows how to define the set of rules. It also brings back some of the concerns that @thitch97 has been looking into. How do we ensure that we have good coverage of a new line of dependencies if the whole process is automated? |
@ForestEckhardt and I are spinning out separate issues to break this work down into smaller pieces:
|
There are some remaining automation issues to work out, but this work as required in |
The current set of dependencies delivered in each of the Paketo buildpacks is managed and updated by an external system which makes this process opaque to external users and complicated to modify as maintainers and contributors. To address some of these concerns, we should introduce tooling that can be consumed in our public GitHub workflows to perform these same operations.
We currently use
jam
to perform similar types of operations and so it might be a good place for this new functionality. Let's explore what that might look like:A Set of Rules
Looking at the current set of dependencies we ship and the system that maintains them, it seems clear that we can express what dependencies should be included in a buildpack using a set of rules with three parts:
Taking an example, we can express the versions that should be included in the
bundler
buildpack using the following rules:We can see that we track the
1.*
and2.*
version lines of thebundler
dependency and that we keep 2 patch versions of each line.In continuing to review the rest of the dependencies included in the Paketo buildpacks, we can see that all of the current dependencies can be expressed with a similar set of rules.
A Simple Algorithm
Given this set of rules we can construct an algorithm for finding the set of dependencies that should be included with any given buildpack.
curl https://api.deps.paketo.io/v1/dependency?name=<id>
.N
patch versions.This algorithm can be repeated with each rule such that a complete set of dependencies matching all rules can be collected.
A Concrete Implementation
Given an algorithm to find those dependencies, we can imagine a more concrete implementation that involves some of our existing tooling and modifications to our configuration metadata. First, we can add some configuration to the existing
buildpack.toml
under themetadata
field. Specifically, we can express the rules we want to use when including dependencies for the buildpack. Let's take a look at what that could look like with ourbundler
example from above:As we can see, the rules from above are translated into TOML configuration data. We have a list of rules that outline what versions of the
bundler
dependency should be included in the buildpack. Then, given this configuration, we can add a new command to the existingjam
CLI to allow our automation to update the dependencies. Something like the following might do the trick.Given this command,
jam
would read in thebuildpack.toml
file, find the rules, and then perform the algorithm outlined above to find the set of dependencies to include. Once that is done, it would replace the existing set of dependencies with the new set, thus keeping the dependencies up-to-date with the latest offered dependencies in thedep-server
.The text was updated successfully, but these errors were encountered: