Skip to content

Conversation

@pingsutw
Copy link
Member

@pingsutw pingsutw commented Jul 2, 2025

Why are the changes needed?

The version won’t change if you update the requirements.txt file in the imageSpec and run a launch plan with Pyflyte.

from union import workflow, task, LaunchPlan, ImageSpec

custom_image = ImageSpec(
    name="runlp",
    requirements="requirements.txt",
    registry="pingsutw",
    builder="default",
    pip_extra_args="--prerelease=allow",
)


@task(container_image=custom_image)
def something(region: str, start_date: str) -> str:
    return f"{start_date}-{region}"


@workflow
def wf(region: str = "eu", start_date: str = "2024-01") -> str:
    return something(region=region, start_date=start_date)


qa_lp = LaunchPlan.get_or_create(
    name="qa_lp",
    workflow=wf,
)

What changes were proposed in this pull request?

This pull request updates the _get_image_names method in flytekit/remote/remote.py to handle LaunchPlan entities. The most important change is the addition of logic to extract image names from the nodes of a LaunchPlan's associated workflow.

Key Changes:

Enhancement to _get_image_names method:

  • Added a condition to check if the entity is a LaunchPlan. If true, the method now iterates over the nodes in the LaunchPlan's workflow to collect image names, ensuring proper handling of this entity type. ([flytekit/remote/remote.pyR1341-R1345](https://github.com/flyteorg/flytekit/pull/3290/files#diff-c56afc489e5060224889036253b85ae7c7f1df9f0f7b1130916d9c614293cbb9R1341-R1345))## Tracking issue

Summary by Bito

This pull request enhances the `_get_image_names` method in `flytekit/remote/remote.py` by adding logic to handle `LaunchPlan` entities, enabling the correct extraction of image names from associated workflow nodes. This addresses a limitation in the previous implementation.

@pingsutw pingsutw merged commit 237fb73 into master Jul 2, 2025
111 of 115 checks passed
Atharva1723 pushed a commit to Atharva1723/flytekit that referenced this pull request Oct 5, 2025
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.

4 participants