<#475 [Feature] Generic support for overrides duri...
# flyte-github
c
#475 [Feature] Generic support for overrides during an execution Issue created by kumare3 Motivation: Why do you think this is important? As a user of Flyte, configuration like "resources (cpu/mem/gpu)", "catalog (enable/disable/version)", "retries",, "spark config", "hive cluster" are created only at registration time. The only way to update is to re-register. This is not desirable, as there are times, when the user may want to update these parameters for specific launchplans, or executions. Goal: What should the final outcome look like, ideally? A user should be able to optionally override any configuration information for an execution at the launchtime or launchplan creation time. Describe alternatives you've considered Re-register with the updated configuration Flyte component • Overall • Flyte Setup and Installation scripts • Flyte Documentation • Flyte communication (slack/email etc) • FlytePropeller • FlyteIDL (Flyte specification language) • Flytekit (Python SDK) • FlyteAdmin (Control Plane service) • FlytePlugins • DataCatalog • FlyteStdlib (common libraries) • FlyteConsole (UI) • Other ### High level original proposal #### Goal The purpose of this Allow users to override task metadatas at launch time and decide caching configuration and resource allocation without needing to push a new commit in their PR. ## Motivation Users have requested cache toggling and cache version override at launch time. Other than that, users have also been wanting to be able to change the task resource quickly. So this is generally a highly requested feature as it allows users to change runtime configurations quickly without needing any code change, meaning that they don't need to go through the entire CI pipelines. #### Brief description of proposal We can achieve this by associating each execution with objects
StaticMetadata
,
MetadataOverride
, and
MetadataFinal
using some simple, serializable format like JSON. UX/UI At registration time we can extract all the metadata of every task and create an
StaticMetadata
object. At launch time we let users specify
MetadataOverride
through the following ways: If using UI, in the "Launch Workflow" panel, we have an "Input" tab and a "Execution Parameter Override" tab. The latter tab, by default, shows the
StaticMetadata
but the fields are editable, which allows users to specify overrides of the metadata If using flyte-cli, we add an option, e.g.,
--execution-parameter-override={"task1": {cache=false}}
when launching an execution Every
MetadataOverride
object is also stored in Flyteadmin, and is versioned with the execution id. The
StaticMetadata
and
MetadataOverride
objects were merged by Flyteadmin to produce
MetadataFinal
and that is passed to the propeller Propeller or plugin parses that
MetadataFinal
object and creates pod, talks to data catalog, etc., accordingly In the console, we add an extra field/link in the header of the execution page, showing the
MetadataOverride
and/or
MetadataFinal
#### Reproducibility As far as reproducibility is concerned, we note from the above description that both the
StaticMetadata
and the
MetadataOverride
are versioned.
StaticMetadata
becomes available to Flyteadmin at workflow registration time because it comes with the workflow definition. An extra storage of this object is not required. This object is also inherently versioned and can be extracted from the registered workflow when needed.
MetadataOverride
will be versioned differently than
StaticMetadata
. To enable the targeted high flexibility, we want to allow the users to associate each execution with one
MetadataOverride
object. The natural way to version
MetadataOverride
objects, therefore, is to version it with the execution's id. Due to this goal, we store the
MetadataOverride
object in Flyteadmin. #### Flyteadmin APIs https://gist.github.com/bnsblue/8499584ec7e1aacf4b43e81d9c50e0fb #### FlyteIdl Protos Additional context This is a highly requested feature from multiple teams with Lyft Is this a blocker for you to adopt Flyte NA flyteorg/flyte