You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jobs@airflow.apache.org by GitBox <gi...@apache.org> on 2025/09/19 21:26:33 UTC
[GH] (airflow/fix-weight-rule): Workflow run "Tests AMD" failed!
The GitHub Actions job "Tests AMD" on airflow.git/fix-weight-rule has failed.
Run started by GitHub user kaxil (triggered by kaxil).
Head commit for run:
612bb9295ede5206f47f7555a61af59db47ad204 / Kaxil Naik <ka...@gmail.com>
Fix DAG deserialization failure with non-default ``weight_rule``
Resolves an issue where DAGs using non default value like `weight_rule='absolute'` would fail during
deserialization with `'Unknown priority strategy'` error. The problem occurred
when the scheduler attempted to deserialize tasks that had already been
converted to `PriorityWeightStrategy` instances.
The `validate_and_load_priority_weight_strategy` function now properly handles
cases where a `PriorityWeightStrategy` instance is passed, returning it directly
instead of attempting to re-validate it.
This fix ensures that all weight rule options (`downstream`, `upstream`, `absolute`)
work correctly in the complete DAG processing pipeline including serialization,
storage, and deserialization.
To Reproduce the bug, run the following dag or just run the added unit test without code changes:
```py
from airflow import DAG
from airflow.sdk import task
from airflow.task.weight_rule import WeightRule
with DAG("xcom_backend_dag"):
@task()
def xcom_producer():
return "my_value"
@task(weight_rule=WeightRule.ABSOLUTE)
def xcom_consumer(value):
assert value == "my_value"
xcom_consumer(xcom_producer())
```
which will then fail, when you try to trigger the dag from UI.
Report URL: https://github.com/apache/airflow/actions/runs/17869321843
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: jobs-unsubscribe@airflow.apache.org
For additional commands, e-mail: jobs-help@airflow.apache.org