<#3341 Add escape hatch for reference entities in ...
# flyte-github
a
#3341 Add escape hatch for reference entities in remote._get_image_names Pull request opened by wild-endeavor ## Why are the changes needed? There's an issue with using reference launch plans. This fix added images to the automatic version calculation so that `ImageSpec`s that effectively changed would result in a new version, but this shouldn't happen for reference entities. If you register the following @fl.task(cache=fl.Cache(version="1")) def return_val(a: int) -> int: print('Not cached!') return a @fl.workflow def source_cached_wf(a: int) -> int: v = return_val(a=a) return v and then try to
pyflyte run
the following @fl.reference_launch_plan( project="flytesnacks", domain="development", name="yt_dbg.scratchpad.reference_lp_source.source_cached_wf", version="-O-WKqjcCzxJCwQaxjD0yw", ) def source_cached_wf(a: int) -> int: ... @fl.workflow def target_wf(a: int) -> int: v = source_cached_wf(a=a) return v you get
AttributeError: 'ReferenceLaunchPlan' object has no attribute '_workflow'
## What changes were proposed in this pull request? Skip reference entities in the
_get_image_names
function. Also fixing the type-hint. Since the function recursively calls workflow nodes, all types can be called. ## How was this patch tested? Tested on by running against remote cluster. ### Setup process ### Screenshots ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link flyteorg/flytekit