Skip to content

Conversation

@wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Oct 21, 2025

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 ImageSpecs 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

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.19%. Comparing base (a693622) to head (632150b).
⚠️ Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (a693622) and HEAD (632150b). Click for more details.

HEAD has 52 uploads less than BASE
Flag BASE (a693622) HEAD (632150b)
54 2
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3341      +/-   ##
==========================================
- Coverage   81.31%   76.19%   -5.12%     
==========================================
  Files         220      221       +1     
  Lines       22965    22966       +1     
  Branches     2970     2971       +1     
==========================================
- Hits        18673    17498    -1175     
- Misses       3463     4665    +1202     
+ Partials      829      803      -26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wild-endeavor wild-endeavor merged commit 0663d8e into master Oct 21, 2025
117 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants