another question from a while back: is there no lo...
# flytekit
d
another question from a while back: is there no longer a way to fetch the workflow version at runtime anymore? this is useful say for setting a default cache version
k
Is it during registration?
d
execution time ideally
right now we manually set during docker build as an env var
k
Aah as an env car
Haha autocorrect- but yes envvar- I think this is fair and platform will expose this
Car
d
car
😉
actually yes, to your point it should be at registraion
to bascially
Copy code
@task(
  cache=True,
  cache_version=<workflow version>
)
k
Hmm registration- can you write up an issue of how you would like it to be consummable
d
no opinion on that at all 🙂 just want it to be consummable
used to be
Copy code
@task(
  cache=True,
  cache_version=os.env["FLYTE_WORKFLOW_VERSION"]
)
but this would be fine as well
Copy code
@task(
  cache=True,
  cache_version=flytekit.current_context().workflow_version
)
you want me to create an issue?
k
I think it won't be current context, but serialization context
Please file
d
don't want to hijack this thread, but being able to use the workflow version to set task metadata makes serializing non-cached tasks easier. we can use the workflow version as the dataset version for the reservation system.
166 Views