Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-7058

Cherry-pick bot technically loads plugin code even if disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • production
    • Cherry-pick bot
    • None

    Description

      Cherry-pick bot should avoid loading any plugin code unless explicitly enabled.
      The current loading routine uses the `autoloader` package on the entire plugin_bots directory. As a result, each file in the directory structure is loaded and initialized before config is checked. While the plugins ultimately don't get mounted to the Notifier instance and are not allowed access to the rest of cherry-pick bot, using autoloader indiscriminately could lead to undefined behavior if a plugin has a startup routine. Further, autoloader loads non-target files, which means that any development scripts that may reside in a plugin directory are unintentionally loaded and executed when starting the main application.

      This can be fixed by ditching autoloader and being more intentional about what gets loaded, and when. Check the config first, and then explicitly use require to load the module and then create an instance of the plugin before binding it.

      Attachments

        For Gerrit Dashboard: QTQAINFRA-7058
        # Subject Branch Project Status CR V

        Activity

          People

            daniel.smith Daniel Smith
            daniel.smith Daniel Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change