jolly-florist-66728
09/27/2024, 2:59 PMLaunchPlan.get_or_create(...), then running pyflyte register path/to/workflow.py -p project -d domain. Everything runs fine, and it shows the new version string. In the flyte console, I can see the launchplan itself in the Launch Plans tab with the new version, but when I go to the workflow in the Workflows tab, and click Launch Workflow, its only showing older versions in the Workflow version dropdown, and the new launchplan isn't shown in the Launch Plan dropdown.
Is the workflow version the same as the version shown when registering? This only just now seems to be an issue, it was working fine up until recently
# Answer
The issue you're experiencing might be related to how Flyte handles the registration and display of workflows and launch plans. When you register a workflow, Flyte automatically creates a default launch plan for it. However, if you create an explicit launch plan using LaunchPlan.get_or_create(), it should also be registered and associated with the workflow.
According to this GitHub issue, Flyte automatically creates a default launch plan for every workflow, which might be causing confusion. Additionally, there might be a caching issue or a delay in the Flyte console updating to reflect the new launch plan.
To ensure that the new launch plan is correctly registered and associated with the workflow, you can try the following steps:
1. Register Tasks and Workflows Separately:
FLYTE_SDK_LOGGING_LEVEL=20 pyflyte register --non-fast -p project -d domain path/to/workflow.py --version new_version --tasks-only
FLYTE_SDK_LOGGING_LEVEL=20 pyflyte register --non-fast -p project -d domain path/to/workflow.py --version new_version --workflows-only
2. Register Launch Plans:
FLYTE_SDK_LOGGING_LEVEL=20 pyflyte register --non-fast -p project -d domain path/to/workflow.py --version new_version --launchplans-only
This approach ensures that the tasks, workflows, and launch plans are registered separately, which might help in resolving the issue.
Would you like more detail on this process or any specific part of it?
Sources:
- GitHub Issue: Launch Plan Registered Twice
Slack Link
https://.slack.com/archives/CP2HDHKE1/p1727449185.594979 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.