Code Monkey home page Code Monkey logo

Comments (5)

Ancillas avatar Ancillas commented on August 21, 2024

I created a small workaround for this last week in my environment, but it's not good enough to be considered a patch.

https://gist.github.com/Ancillas/6135084

Line 72 is what I commented out to stop r10k from purging.

from r10k.

adam-vessey avatar adam-vessey commented on August 21, 2024

Been looking into this a bit... Looks like it's because both use the same "basedir", and so detect each others directories as being "stale"... So when the first purges it's stale stuff, it deletes those of the second, and then the second deletes those of the first. This seem to come out of a bad assumption made in https://github.com/adrienthebo/r10k/blob/master/lib/r10k/util/purgeable.rb#L21-L28, where assumes each "managed directory" is only used by a single source.

... I'm thinking that it may be necessary to:

  1. list the contents of each managed directory (in a hash of arrays?),
  2. iterate over each source and remove the "desired" contents from our listing
  3. delete all entries remaining in the listing from the filesystem

Poking around the code (and being new to Ruby), I'm not sure where would be the place to make this change... Alternatively, could make the created environments be prefixed with the name used in yaml? So in the example above, we might end up metro_dev, metro_test, env_ir_dev and env_ir_test... Seems like this alternative might address #48 as well.

... I may take a shot at this...

from r10k.

adam-vessey avatar adam-vessey commented on August 21, 2024

... Which is to say, that I have. :P

#53 allows prefixes to be used... Would pretty much have to be used in the case that multiple sources are in use. This should satisfy #48.

from r10k.

Ancillas avatar Ancillas commented on August 21, 2024

What does the file system look like if prefixes are used?

Greg

On Thursday, August 1, 2013, Adam wrote:

... Which is to say, that I have. :P

#53 #53 allows prefixes to be
used... Would pretty much have to be used in the case that multiple sources
are in use. This should satisfy #48#48
.

β€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-21978807
.

from r10k.

lutaylor avatar lutaylor commented on August 21, 2024

This has been addressed by Adam's fix.

from r10k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.