Git Product home page Git Product logo

Comments (8)

iranzo avatar iranzo commented on June 12, 2024

@larsks Want to take this one?

from risu.

larsks avatar larsks commented on June 12, 2024

Sure!

from risu.

larsks avatar larsks commented on June 12, 2024

So, the problem here is that without --live, we assume that the first argument is a filesystem snapshot. What if we were to change the behavior so that by default citellus would run in live mode, and an explicit snapshot argument would be required for snapshot mode? So on a live system you would run:

citellus

And for sos reports you would run:

citellus --snapshot /cases/123456/...

This would allow --list-plugins to work without introducing some convoluted logic to use different plugin path semantics with --list-plugins than we use for actual citellus runs.

from risu.

iranzo avatar iranzo commented on June 12, 2024

Wouldn't running the check for --list-plugins be executed earlier allow to keep actual behaviour?

For example:
change the actual else at line 304:
for:

elif not options.list_plugins:
# This will execute if options.list_plugins is set to false, hence, exitting if not Live is active

from risu.

larsks avatar larsks commented on June 12, 2024

Right, but at the moment we can only do plugin discovery in general after deciding whether we're in live mode or not. We could also do plugin discovery earlier for --list-plugins, but then we'd need it in two places, which is silly. Or we would need some sort of "if --live or --list-plugins..." then logic.

Making the snapshot path an explicit argument rather than an implicit argument would make everything nicer.

from risu.

iranzo avatar iranzo commented on June 12, 2024

I do use it mostly against snapshots, so having to declare it will be more typing afaik.

from risu.

zerodayz avatar zerodayz commented on June 12, 2024

@larsks @iranzo Explicit is better than Implicit. We can add argument -s/--snapshot that will not add too much typing and code will be more read-able, it will be easier and less prone to errors. Agree?

from risu.

iranzo avatar iranzo commented on June 12, 2024

Not requiring to modify already existing docs and integrations approach: http://review.gerrithub.io/377922

from risu.

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.