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

[Flytekit] Control Plane objects for native typed API #823

Closed
7 of 8 tasks
wild-endeavor opened this issue Mar 11, 2021 · 2 comments
Closed
7 of 8 tasks

[Flytekit] Control Plane objects for native typed API #823

wild-endeavor opened this issue Mar 11, 2021 · 2 comments
Labels
flytekit FlyteKit Python related issue

Comments

@wild-endeavor
Copy link
Contributor

wild-endeavor commented Mar 11, 2021

Revamp control plane objects

TL;DR

Introduce new control plane objects to go along with the new api. This is the last major component of the new api. (We won't gate removing the "beta" version on this issue though.)

Background

As part of the work on supporting the new flytekit API, the API that relies on native Python PEP 484 type hints available as of flytekit v0.16 and later, we've introduced a new type engine and new Python classes to represent tasks, workflows, launch plans, nodes, etc. In the older api, these ideas also existed - they were usually titled with the word Runnable in the class name and were sub-classes of the control plane objects (e.g. SdkRunnableTask inherits from SdkTask). The new api does not follow that inheritance idea - while building out the new code we thought that the writing of a task (or workflow) was a different enough construct than working with an existing task (or workflow) that the objects don't need to inherit from one another. A better pattern maybe is to tie both to the base model (for the new tasks, this tie is through the translator).

The feature-set offered by the extant Sdk classes is still required however. This ticket encompasses that entire effort.

Implementation

The current thinking is to replicate all the objects to new classes. This is not ideal, but the issue is we have no way of knowing what existing user code across all Flyte deployments contains. The ability of Python to be extended and modified also means the current classes may be used in ways we can't predict or take into account. To avoid breaking an unknown number of users, it's safer to just make new classes.

Items

Main things to do

  • Create new objects named Flyte... to drive home the fact that these are not necessarily python/container/etc tasks. They just represent an entity on the Flyte backend.
  • Use the new type engine. The current Sdk... tasks use the old type engine.
  • Also, new classes should not use the old metaclasses.
    will add to this list as we discover them in implementation.

Features

What are the user interactions these objects should allow a user to do?

  • Be able to fetch a workflow execution and inspect inputs/outputs at every node, and at the workflow layer.
  • Be able to monitor the status of a workflow execution.
  • Fetch a task/workflow and be able to understand its interface. And for tasks the task type.
  • Compare 2 workflow executions (outputs)
  • List recent workflow executions for a given project/domain/workflow name.
  • Launch an execution of a task
  • Launch an execution of a workflow
  • Register a workflow from a file

Questions

  • Should we support the usage of fetched tasks in new @workflows? This might not be a trivial thing since the new type engine relies on having both the Flyte type and the native Python type. With fetched tasks, we'll only have one side and will have to divine the other. There might not always be a one to one mapping. (We can start out by not allowing this, and add it in the future as well.)
@wild-endeavor
Copy link
Contributor Author

will make a new ticket for the remaining item

eapolinario pushed a commit to eapolinario/flyte that referenced this issue Dec 20, 2022
* add flyte airflow provider doc to integrations

Signed-off-by: Samhita Alla <[email protected]>

* stylistic changes

Signed-off-by: Samhita Alla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

2 participants