{"action":"created","issue":{"url":"https://api.github.com/repos/applicationsonline/librarian/issues/175","labels_url":"https://api.github.com/repos/applicationsonline/librarian/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/applicationsonline/librarian/issues/175/comments","events_url":"https://api.github.com/repos/applicationsonline/librarian/issues/175/events","html_url":"https://github.com/applicationsonline/librarian/issues/175","id":47716252,"number":175,"title":"Librarian exhibits degenerate conflict resolution behavior","user":{"login":"willglynn","id":118362,"avatar_url":"https://avatars.githubusercontent.com/u/118362?v=3","gravatar_id":"","url":"https://api.github.com/users/willglynn","html_url":"https://github.com/willglynn","followers_url":"https://api.github.com/users/willglynn/followers","following_url":"https://api.github.com/users/willglynn/following{/other_user}","gists_url":"https://api.github.com/users/willglynn/gists{/gist_id}","starred_url":"https://api.github.com/users/willglynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willglynn/subscriptions","organizations_url":"https://api.github.com/users/willglynn/orgs","repos_url":"https://api.github.com/users/willglynn/repos","events_url":"https://api.github.com/users/willglynn/events{/privacy}","received_events_url":"https://api.github.com/users/willglynn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-11-04T14:04:36Z","updated_at":"2015-07-20T20:16:00Z","closed_at":null,"body":"Consider the following `Cheffile`, adapted from a real one found in the wild:\r\n\r\n    site 'https://supermarket.getchef.com/api/v1'\r\n\r\n    cookbook 'apache2'\r\n    cookbook 'apt'\r\n    cookbook 'build-essential'\r\n    cookbook 'chef_gem'\r\n    cookbook 'chef_handler'\r\n    cookbook 'chef-client'\r\n    cookbook 'cron'\r\n    cookbook 'database'\r\n    cookbook 'logrotate'\r\n    cookbook 'java'\r\n    cookbook 'jenkins'\r\n    cookbook 'iptables-ng'\r\n    cookbook 'memcached'\r\n    cookbook 'mysql', '2.0.2'\r\n\r\n`librarian-chef install` takes forever – over 20 hours of CPU time on the original `Cheffile` so far – without success. Adding `--verbose` shows why: some version of something depends on `mysql >= 5.0.0` which conflicts with the `mysql 2.0.2` specified in the `Cheffile`. `librarian-chef` starts backtracking appropriately, but it doesn't notice the conflict until well after the cookbook with the `mysql >= 5.0.0` dependency, so the resulting search space is *huge*. Here's [a gist of the first million lines of search output](https://gist.github.com/willglynn/4f086324864d44ddf7fa).\r\n\r\n(Spoiler: turns out it's recent versions of `database` adding the conflicting dependency. `2.0.0` works fine, so it should only have to backtrack a few releases, but instead it backtracks through the entire version history of several other cookbooks first, going forwards through all the other dependencies again each time.)\r\n\r\nThere are several ways to address this. I'm preparing a pull request with my fix."},"comment":{"url":"https://api.github.com/repos/applicationsonline/librarian/issues/comments/123017087","html_url":"https://github.com/applicationsonline/librarian/issues/175#issuecomment-123017087","issue_url":"https://api.github.com/repos/applicationsonline/librarian/issues/175","id":123017087,"user":{"login":"mkropat","id":979677,"avatar_url":"https://avatars.githubusercontent.com/u/979677?v=3","gravatar_id":"","url":"https://api.github.com/users/mkropat","html_url":"https://github.com/mkropat","followers_url":"https://api.github.com/users/mkropat/followers","following_url":"https://api.github.com/users/mkropat/following{/other_user}","gists_url":"https://api.github.com/users/mkropat/gists{/gist_id}","starred_url":"https://api.github.com/users/mkropat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkropat/subscriptions","organizations_url":"https://api.github.com/users/mkropat/orgs","repos_url":"https://api.github.com/users/mkropat/repos","events_url":"https://api.github.com/users/mkropat/events{/privacy}","received_events_url":"https://api.github.com/users/mkropat/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T20:16:00Z","updated_at":"2015-07-20T20:16:00Z","body":"Dang, I ran into this too with the [wordpress cookbook](https://supermarket.chef.io/cookbooks/wordpress). I attempted to try the fix in #177 but I couldn't get `librarian-chef install` to run at all for some reason after that, sorry. My workaround for now is to switch to Berkshelf."}}