Skip to content

Use native sbt-dependency-tree plugin for all compatible versions

Olivier Gonzalez requested to merge fix_sbt_key_not_found into master

What does this MR do?

To improve the support for sbt and partialy address Gemnasium fails when running sbt dependencyDot:... (gitlab-org/gitlab#390287 - closed) this MR adjusts what plugin we use to generate the list of dependencies for sbt prjects. Additionally this revisits the support of offline environments for sbt 1.6.2 to align with what we currently use for sbt 1.9.7 (JAVA 21).

  1. bundle the sbt-dependency-tree plugin in our image on top of the existing sbt-dependency-graph plugin
  2. specify which plugin to use based on the version of sbt:
    1. sbt versions below 1.4 are not bundled in the image and don't support offline environments.These versioon are not compatible with the sbt-dependency-tree plugin so we keep using the deprecated sbt-dependency-graph plugin.
    2. sbt 1.6.2 is the default version that we bundle in the image and it must support offline environments. We now use the sbt-dependency-tree plugin and the compatible compiler-bridge version that allows to support offline environments by providing the necessary build dependencies locally.
    3. for all other versions of sbt we install the sbt-dependency-tree plugin and the compiler-bridge version that is compatible with sbt 1.9.7. This allows to support JAVA 21 offline environments by providing the necessary build dependencies locally for 1.9.7 and it doesn't impact other versions of sbt that are not supported in offline environements since they will be fetching their necessary dependencies at runtime.
  3. Increase MAX_IMAGE_SIZE_MB by ~125MB to account for additional bundled dependencies

this does not totally address the bug, see issue discussions for more details: gitlab-org/gitlab#390287 (comment 1797908143)

What are the relevant issue numbers?

gitlab-org/gitlab#390287 (closed)

Does this MR meet the acceptance criteria?

Edited by Olivier Gonzalez

Merge request reports