Skip to content
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] missing button to rerun subworkflow #5852

Open
2 tasks done
marcellomonachesi-tomtom opened this issue Oct 17, 2024 · 4 comments
Open
2 tasks done

[BUG] missing button to rerun subworkflow #5852

marcellomonachesi-tomtom opened this issue Oct 17, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@marcellomonachesi-tomtom
Copy link

marcellomonachesi-tomtom commented Oct 17, 2024

Describe the bug

I don't know if this is by design, but the "Rerun Task" button doesn't appear in the sub-workflow.
It appears in the parent workflow:
image

But it doesn't appear in the sub-workflow:
image

If this is by design, how to structure the workflow to relaunch a dynamic sub-workflow?

Use case: the "multiple" (dynamic) workflow launches many "single" (dynamic) workflows. The "single" workflow is independent from the others. If one single workflow fails others should continue. Then we would like to relaunch the failed single workflow. The "recover" function doesn't work for this use case. Please check the example code below.

Expected behavior

The UI provides a button to relaunch the subworkflow.

Additional context to reproduce

This is the example to replicate the issue:

from flytekit import (
    task,
    dynamic,
    Resources,
)
import typing


def get_resources() -> dict:
    # This is hardcoded but should be loaded from a file
    return {"job_a": {"cpu": "1", "mem": "1Gi"}, "job_b": {"cpu": "2", "mem": "2Gi"}}


@dynamic
def multiple(jobs: typing.List[str]):
    resources = get_resources()
    for job in jobs:
        single(job=job, resources=resources[job])


@dynamic
def single(job: str, resources: dict):
    process(job=job).with_overrides(
        requests=Resources(cpu=resources["cpu"], mem=resources["mem"])
    )
    # other tasks...


@task
def process(job: str):
    print("Process job", job)

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@marcellomonachesi-tomtom marcellomonachesi-tomtom added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Oct 17, 2024
Copy link

welcome bot commented Oct 17, 2024

Thank you for opening your first issue here! 🛠

@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Oct 17, 2024
@marcellomonachesi-tomtom
Copy link
Author

To be able to relaunch the sub-workflow I found this option: #3169
Launching the sub-workflow as a launch plan will create a new execution. The new execution can then be relaunched.
I don't know if this is the only way to achieve this, but it works for now.

@pvditt
Copy link
Contributor

pvditt commented Oct 23, 2024

@marcellomonachesi-tomtom Re-running a subworkflow (workflow node) from that view is a missing feature. We have briefly discussed adding support for rerunning nodes as opposed to rerunning just tasks, but there aren't any plans on adding that any time soon.

If there's more open source demand that could prompt adding that feature - would you mind making an issue for a feature request to add support rerunning nodes?

Relaunching would be a work around.

@marcellomonachesi-tomtom
Copy link
Author

Hi @pvditt , I created this feature request #5893
Feel free to adjust it if something is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants