Skip to content

Feature Request: Package as Django "app" for reusability #33

@danpalmer

Description

@danpalmer

One of the nice features of this project is the ability to create custom interactions to power team processes.

Problem

Unfortunately to do this, users must essentially fork the codebase, add new actions, and then keep their branch up to date with master here. This isn't ideal for several reasons:

  • It's not obvious when new features/fixes/security releases are available upstream
  • It's not easy to update to only particular published versions (tags?)
  • Merging changes, particularly those to do with the infrastructure stuff here (Dockerfiles, etc) may be tricky.

Solution

I propose that a good solution for this would be to make response a Python package that provides a Django app.

What would this look like?

  • The existing apps: core, pagerduty, slack, and ui would be moved into the response app.
  • The response app would be decoupled from the Django installation currently there – removing manage.py, changing how the settings work, etc.
  • A new demo site would be created, that adds response to its INSTALLED_APPS, and perhaps implements one additional command to demonstrate how the extension would work.
  • The Docker setup provided would be updated to launch the demo site.
  • The response package would be published to PyPY, ideally with a nice CI setup in this repo for testing and publishing new versions.

This has the benefits of:

  • Pending updates are now just out of date Python packages, and we can use tooling such as Dependabot/piprot to detect, or the GitHub vulnerability alerts.
  • Updating to a new version is as simple as bumping the version requirements in your requirements.in or equivalent file, again utilising existing Python tooling such as pip-tools, pipenv, etc.
  • Merging changes is now much easier, and only becomes an issue when the public API of the response package changes (which can be tested for) rather than happening on conflicting file diffs.
  • Including custom infrastructure/deployment tooling in the repo is easier as it's not co-existing with the demo tooling provided here.

I'd appreciate any feedback or discussion on the alternatives to this approach – I'm sure there are other good options here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions