-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] LaunchPlan created as part of a workflow that is called from a reference workflow uses incorrect project and domain #3169
Comments
Thank you for opening your first issue here! 🛠 |
The registration flow being used here is Some background here... the registration step is split into two stages since
Where it gets a bit tricky is with dynamic tasks. A dynamic task is a task that compiles down to a workflow, at run time, rather than at compile time, which is how it's able to do things like range() over an input. The spec that it produces has a list of tasks and subworkflows. It gets these because typically tasks called by a dynamic task are defined in the same python project. So the code will just This means it doesn't matter typically what the names/project/domain of these tasks are. Since the definition for these tasks is in-lined, Propeller has all the information it needs - it doesn't need to call Admin to fetch their definitions again so it doesn't matter what the name in the Task id is. Note the dynamic job spec does not include launchplans, so for launch plans, it does matter what the id is. Any Launch Plans referenced in the dynamic job spec will be pulled by Propeller. Because of this, the ID actually matters. [side note - this bundling of subworkflows and tasks into the spec is also why When a dynamic task runs, it's compiled and then converted into protobuf objects, much like the pyflyte serialize step. However at this step, it uses the For this reason (and some others) when you But in the multi-step |
additional use-case for fixing this: https://discuss.flyte.org/t/8421373/hi-there-i-am-wondering-if-there-is-a-way-to-dynamically-set (https://flyte-org.slack.com/archives/CP2HDHKE1/p1673646315622989) |
For the record, this was an incomplete patch that we did (flyteorg/flytekit#1378) that was later reverted (flyteorg/flytekit#1460) because it caused another issue. We'll put in another patch that's hopefully a bit more correct today. And hopefully we can have time soon to implement the correct fix. |
Describe the bug
When calling a workflow that contains a LaunchPlan with a reference workflow in another project, the project/domain of the LaunchPlan matches the reference workflow rather than the project/domain of the originally registered workflow.
Expected behavior
The LaunchPlan being called by the reference workflow would have its project and domain be consistent with the originally registered
Additional context to reproduce
Let's say I have 2 projects (Project A and Project B). In Project A I have a workflow that uses a LaunchPlan, which executes fine if being called from Project A. However, if I try to call this workflow via a ReferenceLaunchPlan in Project B, Flyte attempts to find the LaunchPlan in Project B instead of Project A.
Project A:
Where
test__workflow.py
Project B
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: