amoghrajesh commented on code in PR #61311:
URL: https://github.com/apache/airflow/pull/61311#discussion_r2752894389
##########
providers/celery/tests/integration/celery/test_celery_executor.py:
##########
@@ -199,8 +199,20 @@ def fake_execute(input: str) -> None: # Use same
parameter name as Airflow 3 ve
TaskInstanceKey("id", "fail", "abc", 0, -1),
]
for w in (
- workloads.ExecuteTask.model_construct(ti=ti),
-
workloads.ExecuteTask.model_construct(ti=ti.model_copy(update={"task_id":
"fail"})),
+ workloads.ExecuteTask.make(
+ ti=ti,
+ dag_rel_path="dag_rel_path",
+ generator=None,
+ bundle_info=None,
+ sentry_integration="",
+ ),
+ workloads.ExecuteTask.make(
+ ti=ti.model_copy(update={"task_id": "fail"}),
+ dag_rel_path="dag_rel_path",
+ generator=None,
+ bundle_info=None,
+ sentry_integration="",
+ ),
Review Comment:
Yes seems like the right thing to do, actual executors do `make` cos
`model_construct` bypasses validation:
https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_construct
--
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]