<#3794 [BUG] Map Tasks when using min_success_rati...
# flytekit
a
#3794 [BUG] Map Tasks when using min_success_ratio should fail registration if output isn't Optional #3542 Issue created by EngHabu Describe the bug Using a map task like this:
Copy code
@task
def some_task(inputs: typing.List[int]) -> int:
  ...

@workflow
def my_wf() -> typing.List[int]
  return map_task(some_task, min_success_ratio=0.5)(inputs=[1, 2, 3, 4])
if some of the items fail to process, the resulting output will have shorter length compared to the input list. This is confusing! Expected behavior The task either fails to register because the output should have been
Optional[int]
or the map task should fail completely because it can't "correctly" produce the output.. Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte