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] Nested conditionals #6185

Open
2 tasks done
wild-endeavor opened this issue Jan 23, 2025 · 0 comments
Open
2 tasks done

[BUG] Nested conditionals #6185

wild-endeavor opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
backlogged For internal use. Reserved for contributor team workflow. bug Something isn't working

Comments

@wild-endeavor
Copy link
Contributor

Describe the bug

Can we get this to work in local execution?

conditional("single_task_in_conditional")
        .if_(is_heads.is_true())
        .then(
            conditional("inner_nested_conditions")
            .if_(evaluated_branch_id == "if_")
            .then(calculate_circle_circumference(radius=evaluated_radius))  # this is executed when it should not be.
            .elif_(evaluated_branch_id == "elif_1")
            .then(calculate_circle_circumference(radius=evaluated_radius))
            .elif_(evaluated_branch_id == "elif_2")
            .then(calculate_circle_circumference(radius=evaluated_radius))
            .else_()
            .fail(RADIUS_NEGATIVE_ERROR)
        )
        .else_()
        .then(echo_radius(radius=evaluated_radius))

...ideally without having to do ast parsing.

Expected behavior

Nested conditional does not run if outer conditional is not true.

Additional context to reproduce

No response

Screenshots

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@wild-endeavor wild-endeavor added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jan 23, 2025
@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Jan 23, 2025
@davidmirror-ops davidmirror-ops moved this from Backlog to Assigned in Flyte Issues/PRs maintenance Jan 23, 2025
@eapolinario eapolinario added the backlogged For internal use. Reserved for contributor team workflow. label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlogged For internal use. Reserved for contributor team workflow. bug Something isn't working
Projects
Status: Assigned
Development

No branches or pull requests

2 participants