Hi there, got two questions: - Is there a max limi...
# flyte-support
g
Hi there, got two questions: • Is there a max limit on the task timeout? I've got some long running tasks that might need close to 24h timeouts due to resource availability reasons • Is there a way to get all the param values a workflow was run with as dict or something that can be passed on to a task (instead of just passing all input params to task directly) Thanks 🙏
a
Hey Cornelis
Is there a max limit on the task timeout?
No hard limit in this regard in Flyte. You can set this limit at the Flyte node level with nodeExecutionDeadline or at the task level with the
timeout
argument.
24h timeouts due to resource availability reasons
I'm curious, would using spot/preemptible instances help in some way here?
g
It's something I can consider eventually, yes. However I have a business hours requirement where I am only allowed to process tasks that have specific resource requirements between certain hours. Outside of those hours I need those machines turned off, but tasks will still be coming in. Setting a ridiculously long timeout will allow for the task to survive outside those hours until the machines are allowed to come back up again.
For now it works, but going to see what kind of impact this has on the rest of the performance
a
Is there a way to get all the param values a workflow was run with as dict
Not as a dict, but I think the closest is using FlyteRemote to inspect the execution and get the inputs https://docs.flyte.org/en/latest/user_guide/development_lifecycle/inspecting_executions.html#flyteremote
g
Ah, perfect. This would also work from inside the cluster/in a running task then?
a
yes, it's called FlyteRemote but it's more about programatic access to the control plane
g
Hey @average-finland-92144, I'm giving the FlyteRemote solution a go. I see that i need to pass in a
Config
into FlyteRemote (I'm on flytekit 1.13.7,
FlyteRemote.auto
is not available) to be able to reach the flyte cluster. I've got it to work using Secrets and read the relevant things (endpoint, client_id, client_secret) from the k8s secret and pass these into the
Config
object via
with_params(PlatformConfig(endpoint, client_id, client_secret))
. But is there a better way of doing this?
a
g
Oh it is. But would it make it through the authorization?
authentication rather
But yeah, authx
a
you can construct the Config object with a combination of a config file( like the regular config.yaml where you set the auth parameters) and the base info of the endpoint
g
Right. I'm trying to avoid that as I'm don't want to include the config.yaml as part of an image. But I guess I could also store the config.yaml as a secret and then just load the secret as a file
a
uh I see, maybe what you're doing with the secret is better then