Closed mariajgrimaldi closed 3 years ago
Thanks for the pull request, @mariajgrimaldi! I've created BLENDED-806 to keep track of it in Jira.
When this pull request is ready, tag your edX technical lead.
Hey! I made a PR showing how it'll look adding the async feature -if we decide that this repository is the best place for Hooks Extension Framework-: https://github.com/edx/edx-django-utils/pull/111
Closing PR following recommendations made on this post: https://discuss.openedx.org/t/configuration-for-the-hooks-extension-framework/4527 From now on, this PR is going to be found here: https://github.com/eduNEXT/openedx-filters
Description:
This PR adds a new module for the tools needed by the Hooks Extension Framework to execute filters. This project is described in more depth in the OEP-50.
This tooling will allow us to extend the platform by adding triggers in specific places, those triggers will be able to execute a list of filters previously configured.
For that to happen, we are introducing two functions called
triggers_filter
. When called, these functions will execute a Pipeline with the list of functions specified by the configuration. This pipeline is defined in ADR Hooks tooling: pipelineNow, this configuration as indicated in ADR: Configuration for the Hook Extension Framework is defined using Django settings and looks like this (extended format):
Pipeline
is the list of functions that the pipeline runner will execute, andasync
indicates how the pipeline is going to run, asynchronous or synchronous. Please be aware that this PR does not add the asynchronous feature, only the synchronous, that feature is meant to be added in another PR to reduce complexity.Please, check out the ADR where the other configuration formats are defined.
JIRA:
XXX-XXXX
Dependencies:
List dependencies on other outstanding PRs, issues, etc.
Merge deadline:
None
Testing instructions:
make lms-shell
pip install -e git+https://github.com/edx/edx-django-utils.git@MJG/hooks_pipeline_tool#egg=edx_django_utils
pip install -e https://github.com/eduNEXT/openedx-basic-hooks.git
, you can also use your own test library. Here are defined the functions that will be executed by a trigger.Year of birth
add 2020.Reviewers:
Merge checklist:
Post merge:
Author concerns: