Thread
#flytekit
    Dylan Wilder

    Dylan Wilder

    7 months ago
    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
    Ketan (kumare3)

    Ketan (kumare3)

    7 months ago
    Is it during registration?
    Dylan Wilder

    Dylan Wilder

    7 months ago
    execution time ideally
    right now we manually set during docker build as an env var
    Ketan (kumare3)

    Ketan (kumare3)

    7 months ago
    Aah as an env car
    Haha autocorrect- but yes envvar- I think this is fair and platform will expose this
    Car
    Dylan Wilder

    Dylan Wilder

    7 months ago
    car
    😉
    actually yes, to your point it should be at registraion
    to bascially
    @task(
      cache=True,
      cache_version=<workflow version>
    )
    Ketan (kumare3)

    Ketan (kumare3)

    7 months ago
    Hmm registration- can you write up an issue of how you would like it to be consummable
    Dylan Wilder

    Dylan Wilder

    7 months ago
    no opinion on that at all 🙂 just want it to be consummable
    used to be
    @task(
      cache=True,
      cache_version=os.env["FLYTE_WORKFLOW_VERSION"]
    )
    but this would be fine as well
    @task(
      cache=True,
      cache_version=flytekit.current_context().workflow_version
    )
    you want me to create an issue?
    Ketan (kumare3)

    Ketan (kumare3)

    7 months ago
    I think it won't be current context, but serialization context
    Please file
    Dan Rammer (hamersaw)

    Dan Rammer (hamersaw)

    7 months ago
    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.