-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AIP-84 Get Mapped Task Instance Tries #44303
base: main
Are you sure you want to change the base?
AIP-84 Get Mapped Task Instance Tries #44303
Conversation
1b5e318
to
3c81dd4
Compare
task_instances = [ | ||
TaskInstanceHistoryResponse.model_validate(task_instance, from_attributes=True) | ||
for task_instance in task_instance_select | ||
] | ||
return TaskInstanceHistoryCollectionResponse( | ||
task_instances=task_instances, | ||
total_entries=len(task_instances), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
task_instances = [ | |
TaskInstanceHistoryResponse.model_validate(task_instance, from_attributes=True) | |
for task_instance in task_instance_select | |
] | |
return TaskInstanceHistoryCollectionResponse( | |
task_instances=task_instances, | |
total_entries=len(task_instances), | |
) | |
return TaskInstanceHistoryCollectionResponse( | |
task_instances=task_instance_select, | |
total_entries=len(task_instance_select), | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TaskInstanceHistoryCollectionResponse
will take the list of TaskInstanceHistoryResponse
.
As a first step, I am changing the airflow.models.taskinstance.TaskInstance
to TaskInstanceHistoryResponse
and then passing it to TaskInstanceHistoryCollectionResponse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use cast
like here:
task_instances=cast(list[TaskInstanceResponse], task_instances), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this doesn't work. please close this conversation.
3c81dd4
to
a22e190
Compare
related to: #42370