ashb commented on code in PR #44725:
URL: https://github.com/apache/airflow/pull/44725#discussion_r1874569466


##########
task_sdk/src/airflow/sdk/execution_time/comms.py:
##########
@@ -138,7 +138,9 @@ class PutVariable(BaseModel):
     type: Literal["PutVariable"] = "PutVariable"
 
 
+RTIFPayload = RootModel[dict[str, Optional[str]]]

Review Comment:
   I think in this case it needs to be a BaseModel so that it can have a `type` 
field in-order to get the the discriminator to work
   
   ```
   FAILED 
task_sdk/tests/execution_time/test_supervisor.py::TestWatchedSubprocess::test_reading_from_pipes
 - TypeError: 'dict' is not a valid discriminated union variant; should be a 
`BaseModel` or `dataclass`
   ```



-- 
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