Skip to content

Commit aa3f771

Browse files
committed
Build the binding and probed-artifact test params without required
TaskHandlerParam no longer has required. A model dump no longer carries it, so the expected result bodies must drop it, and the constructors would otherwise pass a keyword pydantic only ignores.
1 parent 459da04 commit aa3f771

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎airflow-core/tests/unit/dag_processing/test_collection.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,9 +2149,7 @@ class WorkdayPlugin(AirflowPlugin):
21492149
OTHER_TEAM_BUNDLE = "go-task-handlers"
21502150
TASK_HANDLERS = {
21512151
"etl": [
2152-
TaskHandlerDeclaration(
2153-
task_id="extract", binding="positional", params=[TaskHandlerParam(name=None, required=True)]
2154-
)
2152+
TaskHandlerDeclaration(task_id="extract", binding="positional", params=[TaskHandlerParam(name=None)])
21552153
]
21562154
}
21572155

‎airflow-core/tests/unit/dag_processing/test_processor.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,7 @@ def test_parsing_result_decodes_probed_artifacts(self):
25452545
TaskHandlerDeclaration(
25462546
task_id="extract",
25472547
binding="positional",
2548-
params=[TaskHandlerParam(name=None, required=True)],
2548+
params=[TaskHandlerParam(name=None)],
25492549
)
25502550
]
25512551
},

‎task-sdk/tests/task_sdk/execution_time/schema/test_migrator.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def result_with_probed_artifacts(self) -> DagFileParsingResult:
657657
TaskHandlerDeclaration(
658658
task_id="extract",
659659
binding="positional",
660-
params=[TaskHandlerParam(name=None, required=True)],
660+
params=[TaskHandlerParam(name=None)],
661661
)
662662
]
663663
},
@@ -688,9 +688,7 @@ def test_downgrade_keeps_probed_artifacts_at_head(self, real_migrator, result_wi
688688
{
689689
"task_id": "extract",
690690
"binding": "positional",
691-
"params": [
692-
{"name": None, "value_schema": None, "required": True, "exact_name": False}
693-
],
691+
"params": [{"name": None, "value_schema": None, "exact_name": False}],
694692
}
695693
]
696694
},

0 commit comments

Comments
 (0)