Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 3.59 KB

dependency-upgrades.adoc

File metadata and controls

59 lines (49 loc) · 3.59 KB

Dependency upgrades

Solr has lots of 3rd party dependencies, defined mainly in versions.props. Keeping them up-to-date is crucial for a number of reasons:

  • minimizing the risk of critical CVE vulnerabilities by staying on a recent and supported version

  • avoiding "dependency hell", that can arise from falling too far behind

Read the help/dependencies.txt file for an in-depth explanation of how gradle is deployed in Solr, using Gradle consistent-versions plugin.

Manual dependency upgrades

In order to upgrade a dependency, you need to run through a number of steps:

  1. Identify the available versions from e.g. Maven Central

  2. Update the version in versions.props file

  3. Run ./gradlew --write-locks to re-generate versions.lock. Note that this may cause a cascading effect where the locked version of other dependencies also change.

  4. Run ./gradlew updateLicenses to re-generate SHA1 checksums of the new jar files.

  5. Once in a while, a new version of a dependency will transitively bring in brand-new dependencies. You’ll need to decide whether to keep or exclude them. See help/dependencies.txt for details.

Renovate bot Pull Requests

A member of the Solr community operates a Github bot running Renovate, which files Pull Requests to Solr with dependency upgrade proposals. The PRs are labeled dependencies and do include changes resulting from gradle --write-locks and updateLicenses.

Community members and committers can then review, and if manual changes are needed, help bring the PR to completion. For many dependencies, a changelog is included in the PR text, which may help guide the upgrade decision.

The scans are run on a schedule. New PRs are filed every Sunday, and only dependency versions that are at least 5 days old are suggested, to guard against bad apples. If a new major version of a dependency is available, that will get its own separate Pull Request, so you can choose.

If an upgrade is decided, simply merge (and backport) the PR. To skip an upgrade, close the PR. If a PR is left open, it will be re-used and auto updated whenever a newer patch- or minor version gets available. Thus, one can reduce churn from frequently-updated dependencies by delaying merge until a few weeks before a new release. One can also choose to change to a less frequent schedule or disable the bot, by editing renovate.json

Configuring renovate.json

While the bot runs on a GitHub repo external to the project, the bot behavior can be tailored by editing .github/renovate.json in this project. See Renovatebot docs for available options.