Skip to content

#minor Adding Dynamic Workflows support for SdkTestingExecutor #318

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rscarvalho
Copy link

TL;DR

Adds support for testing SdkDynamicWorkflowTask (dynamic workflows) using SdkTestingExecutor, enabling assertions on their generated DAGs similarly to regular workflows.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

This PR extends SdkTestingExecutor to support dynamic workflows (SdkDynamicWorkflowTask) by wrapping them into a lightweight delegating workflow internally. This allows developers to test the structure and outputs of dynamic workflows using the same mechanisms used to test regular workflows, improving consistency and coverage in unit testing Flyte tasks.

There were no existing issues or tracking requests for this feature — it was implemented to fill a current gap in testing capabilities for dynamic workflows in flytekit-testing.

Tracking Issue

NA

Follow-up issue

NA

Copy link

welcome bot commented Apr 30, 2025

Thank you for opening this pull request! 🙌
These tips will help get your PR across the finish line: - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: DCO Guide).

Addding a javadoc to SdkTestingExecutor

Signed-off-by: Rodolfo Carvalho <rodolfo.ueg@gmail.com>
@rscarvalho rscarvalho force-pushed the rscarvalho/add-dynamic-workflow-testing-support branch from 4e5f640 to 054e2ce Compare April 30, 2025 15:34
}

@Test
public void testDelegatingWorkflow_OddA() {
Copy link
Member

@honnix honnix May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we can keep either OddA or OddB as they are doing the same thing and there isn't much need to have exhaustive tests for of(aConcreteValue % 2 == 0 && bConcreteValue % 2 == 0)) in this case.

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.

2 participants