sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.6k stars 441 forks source link

fix(Docker.*?Plugin): restore the sbt-standard task concurrency tags #1352

Closed cchepelov closed 4 years ago

cchepelov commented 4 years ago

The purpose of this PR is to restore (and adjust) the concurrency tags offered by sbt (https://www.scala-sbt.org/1.x/docs/Parallel-Execution.html) in order to control parallel execution.

By default, sbt tags the "publishLocal" and "publish" tasks with the Publish and Network tags so that one might limit the number of concurrent tasks competing for resources.

On a large multi-project, multiple subprojects might be attempting to publishLocal simultaneously (i.e. spin up containers in order to build images) which can exhaust memory available to Docker or cause a longer time to build due to contention on the disk. This PR restores tags on the Docker/publish and Docker/publishLocal tasks so that the user can limit publications and/or image constructions to levels consistent with capacity.

The difference with sbt defaults is that the publishLocal task is tagged with the Publish and Disk tags, while the publish task gets the sbt defaults Publish and Network. In practice, the publish task will remain throttled by the availability of the Disk tag as well, as it depends on publishLocal anyway.

muuki88 commented 4 years ago

Release 1.7.4 is on its way