Dependency Resolution Performs Extremely Slowly
kruegerkyle95 opened this issue · 2 comments
Describe the Bug
Dependency resolution takes an unreasonable amount of time to complete.
Expected Behavior
Expect the command to complete within seconds
Steps to Reproduce
Using Bolt to generate a Puppetfile using the contents of a bolt-project.yaml file performs extremely slowly if there are multiple "layers" of dependencies to resolve.
For example, my bolt-project.yaml file may contain a single internally developed module that lists 5 other modules as a dependency. Most of these 5 modules list their own dependencies, resulting in 3 "layers" of dependencies (original module -> 5 dependencies -> those module's dependencies). These layers resulted in a Puppetfile that contained 10 modules using the "bolt module install" command. This took over 1 minute to generate.
The time it takes to resolve dependencies increases dramatically if we introduce new layers of dependencies. In an example where I try to resolve all of the dependencies of a "profile" module that itself has ~20 or so dependencies, Bolt can take hours to generate a Puppetfile. Because we use a role/profile/component module paradigm for modules, there is at least three layers of dependencies that need to be resolved, but often times there are several more, depending on the contents of the component modules.
Bolt will write "Resolving module dependencies, this might take a moment" to STDOUT, and then not proceed for a very long time. Running Bolt with the debug command line option doesn't provide any additional detail.
We use Artifactory as a module repository from which Bolt installs modules.
Create a bolt-project.yaml file with one module listed. Can be in the form of -
module-install:
forge:
baseurl: <url, to use artifactory as a forge>
modules:
name: internal-module
version_requirement: "1.0.0"
Where "internal-module" is a module listed a handful of dependencies, where those modules in term list a few dependencies. Run "bolt module install --force" to resolve dependencies and generate a Puppetfile.
Environment
- Tested on ubuntu 20.04.6 with Bolt 3.27.1
Thanks for filing this bug report. I'm sure you have ruled out network performance as a cause?
Right, we have very good connectivity between the nodes where Bolt is installed and Artifactory