Git Product home page Git Product logo

Comments (1)

pblesi avatar pblesi commented on May 30, 2024

I agree that the alternate runs backend should not be defined before all of Runbook is loaded. Breaking out all require statements to be present in all files where they are needed seems like it would incur quite a bit of overhead as opposed to simply including each file once, up front.

The extensions are implemented the way they are as a proof of concept for how Runbook can be extended with plugins. One solution could be to simply require the shared_variables extension before runbook/run.rb, drop the Runbook.runs logic in the extension and invoke ::Runbook::Extensions::SharedVariables::RunHooks.register_shared_variables_hooks within the Runbook::Run.included method.

I think the broader pattern that is missing is a place to invoke initialization logic, after any plugins or extensions have been loaded, but before the runbook is loaded/evaluated.

For individual projects, this is the Configuration.load_config method that is invoked before any Runbook logic, however there isn't any explicit pattern for initialization code that could be used for Runbook or other plugins. Long term, this is probably the missing pattern that needs to be implemented.

from runbook.

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.