Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D debexpo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 42
    • Issues 42
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mentors.debian.net
  • debexpo
  • Merge requests
  • !114

django: plugins

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Baptiste Beauplat requested to merge lyknode/debexpo:dj/plugins into django Mar 08, 2020
  • Overview 1
  • Commits 15
  • Pipelines 1
  • Changes 41

Django migration: #47 (closed).

This MR re-adds the plugin implementation (not all the plugins itself) to django.

We have:

  • The plugin result model (PluginResults)
  • A plugin manager (PluginManager) that will:
    • Load the plugins registered in the settings
    • Run the plugins
    • Report the results (as a list of PluginResults)
  • A base class with:
    • A few helper method for the plugins (failed, add_result)
    • An abstract method (run) and an abstract property (name) that all plugin must implement
  • A default template for plugin without customized one

Plugin results are now being rendered in the package page.

The following changes have been made:

  • Possibility to run a plugin at a particular step has been removed. All plugin runs after the upload has been validated with the Changes and the Source object. The rational behind that is that code that requires more than consulting and reporting from processed upload should be in implemented as core and not plugins (such as the retrieval of origin tarball).

The distribution plugin has been implemented as an example. I've added a check for consistency between change{log,s} distributions.

Tests have been updated (for this MR, one statement is not covered by the tests, it will when plugin using a custom template will be added, later).

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: dj/plugins