flyteorg/flyte
View on GitHub[Core feature] Override task `secret_requests` using `with_overrides`
Open
#5085 opened on Mar 21, 2024
backloggeddocumentationenhancementflytekitgood first issue
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