C:\git\test (master) × berks --version
7.0.8
У меня проблема с Berkshelf, разрешающая цепочечные git зависимости.
У меня есть тестовая поваренная книга, сгенерированная мной, чтобы сузить проблему, эта поваренная книга зависит от поваренной книги windows-automation
через ссылку git.
test Berksfile
# frozen_string_literal: true
source 'https://supermarket.chef.io'
cookbook 'win-telegraf', path: '../win-telegraf/'
cookbook 'windows-automation', '~> 0.4.0', git: 'git@git.osky.io:ops/chef-windows-automation.git', branch: 'master'
# cookbook 'windows-library', '~> 0.1.0', git: 'git@git.osky.io:ops/chef-windows-library.git', branch: 'master'
metadata
test metadata.rb
depends 'win-telegraf'
depends 'windows-automation', '~> 0.4.0'
# depends 'windows-library', '~> 0.1.0'
windows-automation
зависит от windows-library
через другую git ссылку
windows -автоматика Berksfile
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: 'git@git.osky.io:ops/chef-windows-library.git', branch: 'master'
windows -автоматизация метаданных
supports 'windows'
depends 'powershell', '~> 6.1.3'
depends 'windows-library', '~> 0.1.0'
Эта проблема возникает, когда я пытаюсь запустить berks install
для тестовой поваренной книги. Я получаю следующий вывод
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 git@git.osky.io: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)
Эта проблема будет решена, если в тестовой поваренной книге я добавлю зависимость в windows -библиотеку. Но мне интересно, почему Berkshelf не может решить эту проблему без зависимости. Я чувствую, что не должен явно зависеть от всех транзитивных git зависимостей.