<#1318 fix(trigger): use task interface type for t...
# flyte-github
a
#1318 fix(trigger): use task interface type for trigger input literals Pull request opened by Ranjita100 Problem
process_default_inputs
in
trigger_serde.py
calls: TypeEngine.to_literal(v, type(v), variables_dict[k].type) When
v
is a plain Python list (e.g.
list(range(10))
),
type(v)
returns
<class 'list'>
with no element type. TypeEngine falls back to PickleFile/BINARY, which fails the deploy-time type-compatibility check:
Copy code
trigger inputs: wrong input "x_list" type,
expected "collection_type:{simple:INTEGER}", got "simple:BINARY" instead
Fix Replace
type(v)
with
TypeEngine.guess_python_type(literal_type)
so the conversion uses the type declared in the task interface (e.g.
List[int]
) rather than the runtime value's bare type. Test Added
test_collection_default_input
to
TestProcessDefaultInputs
covering a
List[int]
trigger input. All 6 tests in the class pass. flyteorg/flyte-sdk