voxpupuli / librarian-puppet

MIT License
95 stars 38 forks source link

More information about conflicting dependencies #16

Closed strarsis closed 5 years ago

strarsis commented 8 years ago

In this particular case, I tried to pull a newer release of puppetlabs-apt (2.2.2) together with puppetlabs-postgres 4.1.0 (legacy project being updated, hence the bit older release). There are also many other modules in the Puppetfile which should be pulled, too.

When running librarian-puppet, it aborts with an error:

Conflict between puppetlabs-apt (< 2.0.0, >= 1.1.0) <https://forgeapi.puppetlabs.com> and puppetlabs-apt/2.2.2 <https://github.com/puppetlabs/puppetlabs-apt.git#2.2.2>
Could not resolve the dependencies.

As the opposing module(s) with the conflicting puppetlabs-apt required version/version constraint are not logged by librarian-puppet, I had to comment out all modules in Puppetfiles and re-enable them one by one and re-invoke librarian-puppet each time in order finding out what else modules are actually conflicting. It also doesn't seem to be logged anywhere else during the process.

Eventually puppetlabs-postgres 4.1.0 was found being the responsible module after re-enabling it and encountering the conflict error, it has been then upgraded to version 4.7.1 which uses a newer puppetlabs-apt dependency version.

If there had been other modules with conflicts I would have had to repeat the debugging multiple times.

It would be very helpful if librarian-puppet logs more detalied information about modules with conflicting dependencies.

vide commented 8 years ago

+1 It's really frustrating to manually dig into tons of metadata.json or going trial-and-error with modules versions

vide commented 7 years ago

Is anybody looking after this project anymore? :(

mciurcio commented 7 years ago

I'm facing the same problem, and it seams a hard one to solve.

The exception is thrown from inside librarian, not librarian-puppet. I've tried to find out where the conflict comes from but my lack of knowledge about how librarian works stopped me.

mciurcio commented 7 years ago

As a work around I did this to have a better visualization of the problems: puppet module list --tree

nabertrand commented 6 years ago

PR #68 should help address this issue.

scoopex commented 5 years ago

This is a really annoying problem.

Trial-and-error debugging of puppet module conflicts are pretty time consuming procedure.

If a unresolvable dependency problem appears, it would be very helpful if "librarian-puppet" would show all modules which are requesting the dependency combined with their version constraints. The contents of "Puppetfile.lock" seem to be very useful to get a overview about the dependencies - but i only get this file after a successful dependency solving process.

Currently i get the following output:

$ librarian-puppet version
librarian-puppet v3.0.0

$ librarian-puppet update --verbose
[Librarian] Ruby Version: 2.3.1
[Librarian] Ruby Platform: x86_64-linux-gnu
[Librarian] Rubygems Version: 2.5.2.1
[Librarian] Librarian Version: 0.6.3
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 3.0.0
[Librarian] Project: /etc/puppetlabs/code/environments/production_master
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 2.7.4
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forge.puppet.com", {}]
[Librarian]   [:git, "git@github.com:redacted-org/puppet-hosting_basesetup.git", {:ref=>"master"}]
[Librarian]   [:git, "git@gitlab.foobar-redacted.org:ITOPS/puppet-redactedwebserver.git", {:ref=>"master"}]
[Librarian] Resolving puppetlabs-apt (< 7.0.0) <https://forge.puppet.com>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-apt found versions: 7.1.0, 7.0.1, 7.0.0, 6.3.0, 6.2.1, 6.2.0, 6.1.1, 6.1.0, 6.0.0, 5.0.1, 5.0.0, 4.5.1, 4.5.0, 4.4.1, 4.4.0, 4.3.0, 4.2.0, 4.1.0, 4.0.0, 3.0.0, 2.4.0, 2.3.0, 2.2.2, 2.2.1, 2.2.0, 2.1.1, 2.1.0, 2.0.1, 2.0.0, 1.8.0, 1.7.0, 1.6.0, 1.5.2, 1.5.0, 1.4.2, 1.4.0, 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.0.4, 0.0.3
[Librarian]     Checking puppetlabs-apt/7.1.0 <https://forge.puppet.com>
[Librarian]       Conflict between puppetlabs-apt/7.1.0 <https://forge.puppet.com> and puppetlabs-apt (< 7.0.0) <https://forge.puppet.com>
[Librarian]       Backtracking from puppetlabs-apt/7.1.0 <https://forge.puppet.com>
[Librarian]     Checking puppetlabs-apt/7.0.1 <https://forge.puppet.com>
[Librarian]       Conflict between puppetlabs-apt/7.0.1 <https://forge.puppet.com> and puppetlabs-apt (< 7.0.0) <https://forge.puppet.com>
[Librarian]       Backtracking from puppetlabs-apt/7.0.1 <https://forge.puppet.com>
[Librarian]     Checking puppetlabs-apt/7.0.0 <https://forge.puppet.com>
[Librarian]       Conflict between puppetlabs-apt/7.0.0 <https://forge.puppet.com> and puppetlabs-apt (< 7.0.0) <https://forge.puppet.com>
[Librarian]       Backtracking from puppetlabs-apt/7.0.0 <https://forge.puppet.com>
[Librarian]     Checking puppetlabs-apt/6.3.0 <https://forge.puppet.com>
[Librarian]       Resolved puppetlabs-apt (< 7.0.0) <https://forge.puppet.com> at puppetlabs-apt/6.3.0 <https://forge.puppet.com>
[Librarian]   Resolved puppetlabs-apt (< 7.0.0) <https://forge.puppet.com>
[Librarian] Resolving puppet-hosting_basesetup (>= 0) <git@github.com:redacted-org/puppet-hosting_basesetup.git#master>
[Librarian]   Checking manifests
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --> origin
[Librarian]     -->   origin/HEAD -> origin/master
[Librarian]     -->   origin/centos-compat
[Librarian]     -->   origin/master
[Librarian]     -->   origin/refactor
[Librarian]     -->   origin/remove_zabbix_dependcies
[Librarian]     --> 06ceb64f76a17dfff6022766ba823a4a3e0f6aa9
[Librarian]     --> 06ceb64f76a17dfff6022766ba823a4a3e0f6aa9
[Librarian]     Checking puppet-hosting_basesetup/0.1.0 <git@github.com:redacted-org/puppet-hosting_basesetup.git#master>
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
Dependency 'puppet-unattended_upgrades' duplicated for module puppet-hosting_basesetup, merging: ["puppet-unattended_upgrades (<= 3.2.1, >= 3.2.0) <https://forgeapi.puppetlabs.com>", "puppet-unattended_upgrades (>= 3.2.0) <https://forgeapi.puppetlabs.com>"]
[Librarian]       Resolved puppet-hosting_basesetup (>= 0) <git@github.com:redacted-org/puppet-hosting_basesetup.git#master> at puppet-hosting_basesetup/0.1.0 <git@github.com:redacted-org/puppet-hosting_basesetup.git#master>
[Librarian]   Resolved puppet-hosting_basesetup (>= 0) <git@github.com:redacted-org/puppet-hosting_basesetup.git#master>
[Librarian] Resolving puppet-redactedwebserver (>= 0) <git@gitlab.foobar-redacted.org:ITOPS/puppet-redactedwebserver.git#master>
[Librarian]   Checking manifests
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --> origin
[Librarian]     -->   origin/HEAD -> origin/master
[Librarian]     -->   origin/master
[Librarian]     --> ea4b3643c32a23e5d056d16da43ecb5e0660ba8b
[Librarian]     --> ea4b3643c32a23e5d056d16da43ecb5e0660ba8b
[Librarian]     Checking puppet-redactedwebserver/0.1.0 <git@gitlab.foobar-redacted.org:ITOPS/puppet-redactedwebserver.git#master>
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian]       Resolved puppet-redactedwebserver (>= 0) <git@gitlab.foobar-redacted.org:ITOPS/puppet-redactedwebserver.git#master> at puppet-redactedwebserver/0.1.0 <git@gitlab.foobar-redacted.org:ITOPS/puppet-redactedwebserver.git#master>
[Librarian]   Resolved puppet-redactedwebserver (>= 0) <git@gitlab.foobar-redacted.org:ITOPS/puppet-redactedwebserver.git#master>
[Librarian] Resolving puppetlabs-stdlib (< 6.0.0, >= 4.16.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-stdlib found versions: 6.0.0, 5.2.0, 5.1.0, 5.0.0, 4.25.1, 4.25.0, 4.24.0, 4.23.0, 4.22.0, 4.21.0, 4.20.0, 4.19.0, 4.18.0, 4.17.1, 4.17.0, 4.16.0, 4.15.0, 4.14.0, 4.13.1, 4.13.0, 4.12.0, 4.11.0, 4.10.0, 4.9.1, 4.9.0, 4.8.0, 4.7.0, 4.6.0, 4.5.1, 4.5.0, 4.4.0, 4.3.2, 4.3.0, 4.2.2, 4.2.1, 4.2.0, 4.1.0, 3.2.2, 3.2.1, 3.2.0, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 2.6.0, 2.5.1, 2.5.0, 2.4.0, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.1, 2.2.0, 2.1.3, 2.0.0, 1.1.0, 1.0.0, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1
[Librarian]     Checking puppetlabs-stdlib/6.0.0 <https://forge.puppet.com>
[Librarian]       Conflict between puppetlabs-stdlib/6.0.0 <https://forge.puppet.com> and puppetlabs-stdlib (< 6.0.0, >= 4.16.0) <(no source specified)>
[Librarian]       Backtracking from puppetlabs-stdlib/6.0.0 <https://forge.puppet.com>
[Librarian]     Checking puppetlabs-stdlib/5.2.0 <https://forge.puppet.com>
[Librarian]       Resolved puppetlabs-stdlib (< 6.0.0, >= 4.16.0) <(no source specified)> at puppetlabs-stdlib/5.2.0 <https://forge.puppet.com>
[Librarian]   Resolved puppetlabs-stdlib (< 6.0.0, >= 4.16.0) <(no source specified)>
[Librarian] Resolving puppetlabs-translate (< 2.0.0, >= 1.0.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-translate found versions: 2.0.0, 1.2.0, 1.1.0, 1.0.0, 0.1.0
[Librarian]     Checking puppetlabs-translate/2.0.0 <https://forge.puppet.com>
[Librarian]       Conflict between puppetlabs-translate/2.0.0 <https://forge.puppet.com> and puppetlabs-translate (< 2.0.0, >= 1.0.0) <(no source specified)>
[Librarian]       Backtracking from puppetlabs-translate/2.0.0 <https://forge.puppet.com>
[Librarian]     Checking puppetlabs-translate/1.2.0 <https://forge.puppet.com>
[Librarian]       Resolved puppetlabs-translate (< 2.0.0, >= 1.0.0) <(no source specified)> at puppetlabs-translate/1.2.0 <https://forge.puppet.com>
[Librarian]   Resolved puppetlabs-translate (< 2.0.0, >= 1.0.0) <(no source specified)>
[Librarian] Resolving camptocamp-postfix (>= 1.6.0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module camptocamp-postfix found versions: 1.8.0, 1.7.0, 1.6.0, 1.5.0, 1.4.0, 1.3.1, 1.2.13, 1.2.12, 1.2.11, 1.2.10, 1.2.9, 1.2.8, 1.2.7, 1.2.6, 1.2.5, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.2.2, 0.2.1, 0.2.0, 0.1.0
[Librarian]     Checking camptocamp-postfix/1.8.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved camptocamp-postfix (>= 1.6.0) <https://forgeapi.puppetlabs.com> at camptocamp-postfix/1.8.0 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved camptocamp-postfix (>= 1.6.0) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving ghoneycutt-ssh (>= 3.56.1) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module ghoneycutt-ssh found versions: 3.61.0, 3.60.1, 3.60.0, 3.59.0, 3.58.0, 3.57.1, 3.57.0, 3.56.1, 3.56.0, 3.55.0, 3.54.0, 3.53.0, 3.52.0, 3.51.1, 3.51.0, 3.49.1, 3.49.0, 3.48.0, 3.47.0, 3.46.0, 3.45.0, 3.44.0, 3.43.0, 3.42.0, 3.41.1, 3.41.0, 3.40.0, 3.39.0, 3.38.0, 3.37.1, 3.37.0, 3.36.0, 3.34.0, 3.33.1, 3.31.0, 3.30.0, 3.28.0, 3.27.1, 3.27.0, 3.25.0, 3.24.0, 3.23.1, 3.23.0, 3.22.0, 3.21.0, 3.20.0, 3.19.1, 3.19.0, 3.18.0, 3.17.0, 3.16.0, 3.15.2, 3.15.1, 3.15.0, 3.14.0, 3.13.0, 3.12.0, 3.11.0, 3.9.0, 3.8.0, 3.7.0, 3.6.0, 3.5.0, 3.4.0, 3.3.0, 3.2.1, 3.2.0, 1.0.3
[Librarian]     Checking ghoneycutt-ssh/3.61.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved ghoneycutt-ssh (>= 3.56.1) <https://forgeapi.puppetlabs.com> at ghoneycutt-ssh/3.61.0 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved ghoneycutt-ssh (>= 3.56.1) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving puppet-unattended_upgrades (<= 3.2.1, >= 3.2.0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module puppet-unattended_upgrades found versions: 4.0.0, 3.2.1, 3.2.0, 3.1.0, 3.0.1, 3.0.0, 2.2.0, 2.1.0, 2.0.0, 1.1.1, 1.1.0, 1.0.3, 1.0.2, 1.0.0
[Librarian]     Checking puppet-unattended_upgrades/4.0.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppet-unattended_upgrades/4.0.0 <https://forgeapi.puppetlabs.com> and puppet-unattended_upgrades (<= 3.2.1, >= 3.2.0) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppet-unattended_upgrades/4.0.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppet-unattended_upgrades/3.2.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppet-unattended_upgrades (<= 3.2.1, >= 3.2.0) <https://forgeapi.puppetlabs.com> at puppet-unattended_upgrades/3.2.1 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppet-unattended_upgrades (<= 3.2.1, >= 3.2.0) <https://forgeapi.puppetlabs.com>
[Librarian] Conflict between puppetlabs-apt (< 6.3.0) <https://forgeapi.puppetlabs.com> and puppetlabs-apt/6.3.0 <https://forge.puppet.com>
Could not resolve the dependencies.
/usr/lib/ruby/vendor_ruby/librarian/action/persist_resolution_mixin.rb:11:in `persist_resolution'
/usr/lib/ruby/vendor_ruby/librarian/action/resolve.rb:32:in `run'
/var/lib/gems/2.3.0/gems/librarian-puppet-3.0.0/lib/librarian/puppet/action/resolve.rb:10:in `run'
/var/lib/gems/2.3.0/gems/librarian-puppet-3.0.0/lib/librarian/puppet/cli.rb:104:in `resolve!'
/usr/lib/ruby/vendor_ruby/librarian/cli.rb:113:in `update'
/var/lib/gems/2.3.0/gems/librarian-puppet-3.0.0/lib/librarian/puppet/cli.rb:76:in `update'
/usr/lib/ruby/vendor_ruby/thor/command.rb:27:in `run'
/usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in `invoke_command'
/usr/lib/ruby/vendor_ruby/thor.rb:359:in `dispatch'
/usr/lib/ruby/vendor_ruby/thor/base.rb:440:in `start'
/usr/lib/ruby/vendor_ruby/librarian/cli.rb:26:in `block (2 levels) in bin!'
/usr/lib/ruby/vendor_ruby/librarian/cli.rb:31:in `returning_status'
/usr/lib/ruby/vendor_ruby/librarian/cli.rb:26:in `block in bin!'
/usr/lib/ruby/vendor_ruby/librarian/cli.rb:47:in `with_environment'
/usr/lib/ruby/vendor_ruby/librarian/cli.rb:26:in `bin!'
/var/lib/gems/2.3.0/gems/librarian-puppet-3.0.0/bin/librarian-puppet:7:in `<top (required)>'
/usr/local/bin/librarian-puppet:23:in `load'
/usr/local/bin/librarian-puppet:23:in `<main>'
ekohl commented 5 years ago

68 has been merged.