[chef] Re: Re: Re: Librarian-Chef and Nexus Cookbook


Chronological Thread 
  • From: Jay Feldblum < >
  • To:
  • Subject: [chef] Re: Re: Re: Librarian-Chef and Nexus Cookbook
  • Date: Wed, 19 Dec 2012 09:09:42 -0500

David,

It's just bad form for two projects to take circular dependencies on each other. Regardless of whether the surrounding tools can or can't handle circular dependencies, it's just something to avoid doing. So I would open the issue with the two cookbook projects.

Circular dependencies can often be broken by splitting one of the two projects. Suppose A depends on B and B depends on A. But suppose A has two parts internally, A1 and A2, where A2 depends on B but A1 does not, and B would depend on A1 and not on A2 if there were a way for it to do so. Then if A were split up into A1 and A2, that would break the circular dependency.

Cheers,
Jay

On Wed, Dec 19, 2012 at 8:53 AM, David Petzel < " target="_blank"> > wrote:
Thanks Jay,
So in your opinion which would be the appropriate project to open an issue on? 


On Tue, Dec 18, 2012 at 4:06 PM, Jay Feldblum < " target="_blank"> > wrote:
David,

The problem is indeed the circular dependencies. Or Librarian-Chef tsorting the dependencies after successfully resolving them. Although a generic dependency-installer does need to install in tsorted order, as does a cookbook uploader.

Cheers,
Jay


On Tue, Dec 18, 2012 at 2:30 PM, < " target="_blank"> > wrote:

I was attempting to add the Nexus Cookbook into my Cheffile today, and I'm
getting the following exception (snipped for readability):

/opt/chef/embedded/lib/ruby/1.9.1/tsort.rb:152:in `block in tsort_each':
topological sort failed: ["nexus", "artifact"] (TSort::Cyclic)
        from /opt/chef/embedded/lib/ruby/1.9.1/tsort.rb:183:in `block (2
levels) in each_strongly_connected_component'
        from /opt/chef/embedded/lib/ruby/1.9.1/tsort.rb:210:in `block (2
levels) in each_strongly_connected_component_from'
        from /opt/chef/embedded/lib/ruby/1.9.1/tsort.rb:219:in
`each_strongly_connected_component_from'
......

Some Googling seems to indicate the problem might be because of the circular
dependencies.

Nexus Metadatab.rb has: depends "artifact", "~> 0.11.0"
Artifact Metadatab.rb has: depends "nexus", ">= 0.17.0"

Are such circular dependencies valid in Chef in general, or this problem
specific to Librarian?

Shy of forking, and hacking up the depends, is there something more basic I'm
missing to get this working?

Thanks






Archive powered by MHonArc 2.6.16.

§