flyteorg/flyte

[Core feature] Override task `secret_requests` using `with_overrides`

Open

#5.085 aberto em 21 de mar. de 2024

Ver no GitHub
 (7 comments) (0 reactions) (1 assignee)Python (378 forks)batch import
backloggeddocumentationenhancementflytekitgood first issue

Métricas do repositório

Stars
 (3.705 stars)
Métricas de merge de PR
 (Mesclagem média 3d 8h) (114 fundiu PRs em 30d)

Description

Motivation: Why do you think this is important?

Not being able to generally override properties of a task using with_overrides is not intuitive and in this case is forcing me to have multiple copies of identical code.

Goal: What should the final outcome look like, ideally?

I would like to do something like this:

@workflow
def run():
    data = get_data()
    overrides = { 
        "secret_requests": [
            Secret(key="username", group="db"),
            Secret(key="password", group="db"),
        ],
    }
    common.generic_task(**params).with_overrides(**overrides)

It would be most intuitive to have anything passed into with_overrides override the equivalently named property of the task, however it appears here that properties are being handled explicitly. There is also the ability to override task_config but there is no documentation for how this will behave.

Describe alternatives you've considered

Create separate tasks with identical logic with different secrets attached. This works but is not DRY.

Propose: Link/Inline OR Additional context

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes

Guia do colaborador