<#1112 feat(convert): expose current output name t...
# flyte-github
a
#1112 feat(convert): expose current output name to type transformers Pull request opened by EngHabu What Adds a contextvar that exposes the name of the output slot currently being serialized (e.g.
o0
) to type transformers, plus a
current_output_name()
accessor.
convert_from_native_to_outputs
sets the contextvar around each
TypeEngine.to_literal
call (and clears it in a
finally
), so a transformer can attribute a returned value to the specific output it's being serialized as — without threading the name through `to_literal`'s signature, which every transformer would otherwise have to adopt. •
None
on the input path and outside output conversion; readers treat absence as "unknown". • Scoped per-conversion via `set`/`reset`, so it never leaks across outputs. Why The
flyteplugins-union
Volume lineage work needs to record which task output a
Volume
was returned as (so
flyte volume explore
can deep-link to a specific output and stamp
produced_by.output_name
). That information only exists at output-conversion time. This is the minimal, generic hook that surfaces it; the plugin reads it defensively and degrades to
None
against an SDK without this change. Scope ~24 lines in
convert.py
, behind the existing output loop. No behavior change for existing transformers. šŸ¤– Generated with Claude Code flyteorg/flyte-sdk