Samhita Alla
Samhita Alla
No items found.

Flyte 1.9: ArrayNode, Execution Tags, New Navigation and More

We're thrilled to introduce Flyte 1.9! This release introduces two experimental features, along with a fresh UI navigation and bug fixes. Let's explore the highlights!

ArrayNode map tasks

This feature is currently being introduced in an experimental capacity. We value feedback from the community to enhance and refine the feature further.

ArrayNode map tasks serve as a seamless substitution for regular map tasks, differing solely in the submodule utilized to import the `map_task` function. Specifically, you will need to import `map_task` from the experimental module as illustrated below:

Copied to clipboard!
from flytekit import task, workflow
from flytekit.experimental import map_task

@task
def t(a: int) -> int:
    ...
    
@workflow
def wf(xs: list[int]) -> list[int]:
    return map_task(t)(a=xs)

Flyte introduces `map_task` to enable parallelization of homogeneous operations, offering efficient evaluation and a user-friendly API. Because it’s implemented as a backend plugin, its evaluation is independent of core Flyte logic, which generates subtask executions that lack full Flyte functionality. ArrayNode tackles this issue by offering robust support for subtask executions. It also extends mapping capabilities across all plugins and Flyte node types. This enhancement will be a part of our move from the experimental phase to general availability.

In contrast to map tasks, an ArrayNode provides the following enhancements:

  1. Wider mapping support. ArrayNode extends mapping capabilities beyond Kubernetes tasks, encompassing tasks such as Python tasks, container tasks and pod tasks.
  2. Cache management. It supports both cache serialization and cache overwriting for subtask executions.
  3. Intra-task checkpointing. ArrayNode enables intra-task checkpointing, contributing to improved execution reliability.
  4. Workflow recovery. Subtasks remain recoverable during the workflow recovery process. (This is a work in progress.) 
  5. Subtask failure handling. The mechanism handles subtask failures effectively, ensuring that running subtasks are appropriately aborted.
  6. Multiple input values. Subtasks can be defined with multiple input values, enhancing their versatility.

We expect the performance of ArrayNode map tasks to compare closely to standard map tasks. 

A note for Flyte enthusiasts: ArrayNode encompasses a definition for the mappable subnode, working with collections of input/output lists and seamlessly integrating into the existing Flyte DAG, akin to any other node type. Consequently, a `map_task` executes entirely within FlytePropeller, employing the existing node traversal mechanism rather than comprising a separate plugin.

Execution tags

This feature is currently being introduced in an experimental capacity. We value feedback from the community to enhance and refine the feature further.

Execution tags allow users to discover their executions and other Flyte entities more easily, by creating smarter groupings. While we’re working to highlight the feature in a future release of FlyteConsole, it is currently supported via FlyteRemote.

You can create execution tags using the following commands:

Copied to clipboard!
pyflyte run --remote --tag "hello" example_start.py wf
pyflyte run --remote --tag "hello" --tag "world" example_start.py wf

To retrieve the tags using FlyteRemote, follow these steps:

Copied to clipboard!
remote = FlyteRemote(
    config=Config.auto("..."),
    default_project="flytesnacks",
    default_domain="development",
)

flyte_workflow = remote.fetch_execution(name="<execution-id>")
print(flyte_workflow.spec.tags)

New navigation and breadcrumb

Mobile navigation

In our ongoing efforts to provide a seamless user experience, we have made significant improvements to our mobile navigation. We understand the importance of easy navigation on small screens, so we've carefully redesigned certain aspects of our user interface.

We have taken a closer look at elements like tables and execution details, ensuring they are now fully adapted to the constraints of smaller screens. Additionally, we've fine-tuned the padding and margin settings throughout the interface to ensure a visually pleasing and user-friendly experience.

Mobile navigation open
Mobile navigation closed

New desktop navigation

We have added a fresh vertical navigation style to our application. You can now choose to enable or disable it using a feature flag.

Vertical navigation on the Flyte dashboard

New page header, breadcrumb navigation

We have revamped the header in the app to offer quick access links throughout. Now, right from the execution page, you can conveniently reach the associated task or workflow entity that initiated the execution. Plus, we've introduced several other improvements to enhance your overall user experience.

An execution page
Popover on the execution page

Feature flags

You can now toggle feature flags directly from the URL query parameters. For instance:

  • To enable the new horizontal layout, use: https://example.com/console?horizontal-layout=true
  • To enable breadcrumbs, use: https://example.com/console?breadcrumbs=true

New navigation style

  • Feature Flag: horizontal-layout=true
  • Env Variable: HORIZONTAL_LAYOUT

New page header, breadcrumb navigation

  • Feature Flag: breadcrumbs=true
  • Env Variable: BREADCRUMBS

Custom breadcrumbs

Tailor your experience in the FlyteConsole by adding your own breadcrumbs. For instance, you have the ability to create breadcrumbs that exclusively display workflows featuring input variables in the dropdown menu.

Copied to clipboard!
<App
  registry={{
    breadcrumbs: [
      makeBreadcrumb(
        id: 'workflows:inputs',
        label: 'Interactive Workflows',
        // Show workflows with input variables in the dropdown
        asyncData: (_location, breadcrumb) => {
          return listWorkflows({
            project: breadcrumb.projectId,
            domain: breadcrumb.domainId,
          })
          .then(data => {
            const filtered = data.entities.filter(
              workflow =>
                Object.keys(
                  workflow?.closure?.compiledWorkflow?.primary?.template?.interface
                    ?.inputs?.variables || {}
                ).length > 0
            );
            data.entities = filtered;
          })
          .then(data => formatEntities(data));
        }
      ),
    ]
  }}
/>;

You can find more info on creating your own breadcrumbs here:

Docs improvements

  • Notifications guide: Now available — a step-by-step guide to help you set up notifications on your demo cluster. You can now effortlessly employ the email sender feature within the demo cluster, eliminating the need for Google Pub/Sub or SNS integration
  • Improved plugin setup guide: We have upgraded our plugin setup guide to include instructions for deployments created using both the flyte-binary and flyte-core Helm charts

Other enhancements

Check out the full release notes here.

1.9 contributors

We extend our heartfelt gratitude to all the contributors who have made invaluable contributions to Flyte 1.9. Thank you for your dedication and support!

{{contributors-1-9="/blog-component-assets"}}

We highly value the feedback of our users and community members, which helps us to improve our product continuously. To connect with other users and get support from our team, we encourage you to join our Slack channel. For updates on product development, community events, and announcements, follow us on Twitter to join the conversation and share your thoughts.

In case you encounter any issues or bugs, we request you let us know by creating a GitHub issue. If you find Flyte useful, don't forget to ⭐ on GitHub.