Reputation: 715
C:\git\test (master) × berks --version
7.0.8
I have an issue with Berkshelf resolving chained git dependencies.
I have a test cookbook I generated to narrow down the issue, this cookbook depends on the cookbook windows-automation
via a git reference.
# frozen_string_literal: true
source 'https://supermarket.chef.io'
cookbook 'win-telegraf', path: '../win-telegraf/'
cookbook 'windows-automation', '~> 0.4.0', git: '[email protected]:ops/chef-windows-automation.git', branch: 'master'
# cookbook 'windows-library', '~> 0.1.0', git: '[email protected]:ops/chef-windows-library.git', branch: 'master'
metadata
depends 'win-telegraf'
depends 'windows-automation', '~> 0.4.0'
# depends 'windows-library', '~> 0.1.0'
windows-automation
depends on windows-library
via another git reference
source 'https://supermarket.chef.io'
metadata
cookbook 'powershell', '~> 6.1.3'
cookbook 'windows', '~> 4.2.5'
# cookbook 'windows-library', path: '../chef-windows-library'
cookbook 'windows-library', '~> 0.1.0', git: '[email protected]:ops/chef-windows-library.git', branch: 'master'
supports 'windows'
depends 'powershell', '~> 6.1.3'
depends 'windows-library', '~> 0.1.0'
This issue comes when I try to run berks install
for the test cookbook. I get the following output
C:\git\test (master) × berks install
Resolving cookbook dependencies...
Fetching 'test' from source at .
Fetching 'win-telegraf' from source at ../win-telegraf
Fetching 'windows-automation' from [email protected]:ops/chef-windows-automation.git (at master)
Fetching cookbook index from https://supermarket.chef.io...
Unable to satisfy constraints on package windows-library, which does not exist, due to solution constraint (test = 0.1.0). Solution constraints that may result in a constraint on windows-library: [(test = 0.1.0) -> (windows-automation = 0.4.0) -> (windows-library >= 0.0.0)], [(windows-automation = 0.4.0) -> (windows-library >= 0.0.0)]
Missing artifacts: windows-library
Demand that cannot be met: (test = 0.1.0)
Unable to find a solution for demands: test (0.1.0), win-telegraf (0.1.0), windows-automation (0.4.0)
This issue gets resolved if in the test cookbook I add a dependency to windows-library. But I am wondering why berkshelf cannot resolve this without the dependency. I feel like I should not need to explicitly depend on all transative git dependencies.
Upvotes: 0
Views: 256
Reputation: 715
Known issue with berkshelf that is marked as wontfix.
https://github.com/berkshelf/berkshelf/issues/1829
Upvotes: 0