pierrejeambrun commented on code in PR #48239:
URL: https://github.com/apache/airflow/pull/48239#discussion_r2014650090
##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -193,8 +203,15 @@ class TriggerStateChanges(BaseModel):
ToTriggerRunner = Annotated[
- Union[workloads.RunTrigger, messages.CancelTriggers,
messages.StartTriggerer],
- Field(discriminator="kind"),
+ Union[
+ Annotated[workloads.RunTrigger, Tag("RunTrigger")],
+ Annotated[messages.CancelTriggers, Tag("CancelTriggersMessage")],
+ Annotated[messages.StartTriggerer, Tag("StartTriggerer")],
+ Annotated[ConnectionResult, Tag("ConnectionResult")],
+ Annotated[VariableResult, Tag("VariableResult")],
+ Annotated[ErrorResponse, Tag("ErrorResponse")],
Review Comment:
Good catch thanks. That was needed before when they were not sharing the
same discriminator and I was using a Custom discriminator function. Now that I
updated all models to use `type` I can just remove it, ty.
--
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]