-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Description
What do you see as an issue?
I am trying to implement a custom weight rule, following the documentation (https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/priority-weight.html#priority-weights).
When I try using the examples as a basis for customization, there seems to be a missing link between the example plugin code and the example DAG code. If I use the example DAG code it throws an import error, that the module custom_weight_rule_module is not found. And when I store the plugin code in a plugin prioritization_plugins and adjust the import, I get the following warning/error message in the Airflow UI:
'prioritization_plugins.DecreasingPriorityStrategy' is not one of ['downstream', 'upstream', 'absolute'] Failed validating 'enum' in schema['properties']['weight_rule']: {'description': 'Weight rule.', 'type': 'string', 'enum': ['downstream', 'upstream', 'absolute']} On instance['weight_rule']:
and all tasks have priority_weight=1
As a result I cannot figure out how to use cusom weight rules...
Solving the problem
It would be very helpful for new users of the feature to have a working, fully reproducible example that covers all necessary steps for using cusom weight rules.
Anything else
I would be willing to provide a PR, but I can not figure out how to get the feature working. Thus, I can not provide an improved documentation...
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct