ninsbl opened a new issue, #46824:
URL: https://github.com/apache/airflow/issues/46824

   ### 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
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to