ashb commented on code in PR #46032:
URL: https://github.com/apache/airflow/pull/46032#discussion_r1939644646
##########
task_sdk/src/airflow/sdk/api/datamodels/_generated.py:
##########
@@ -239,7 +239,7 @@ class TaskInstance(BaseModel):
dag_id: Annotated[str, Field(title="Dag Id")]
run_id: Annotated[str, Field(title="Run Id")]
try_number: Annotated[int, Field(title="Try Number")]
- map_index: Annotated[int, Field(title="Map Index")] = -1
+ map_index: Annotated[int | None, Field(title="Map Index")] = None
Review Comment:
Currently it can't, but the `map_index=-1` was only to because map_index
was part of the primary key of the row, and you can't have a null value in a PK
column.
This change is to support that change (so that the SDK doesn't have to know
that -1 = non mapped, that can be kept entirely in the server side to
eventually in 3.1 or 3.2 be silently changed.)
--
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]