https://prefect.io logo
Title
d

Darren Liu

05/24/2023, 8:20 PM
Hi, I am using the new variables feature. It worked early on but now just freezes up indefinitely
@flow(name="test", flow_run_name="dev > test")
def test():
    return variables.get("test")
z

Zanie

05/24/2023, 8:29 PM
What version are you running? Do you use
variables.get
outside the flow?
cc @Jake Kaplan Maybe resolved by https://github.com/PrefectHQ/prefect/pull/9665
d

Darren Liu

05/24/2023, 8:36 PM
2.10.9
i'm using it exactly like the code i pasted
this usage freezes for me as well
from prefect import flow, variables

bar = variables.get("test")


@flow
def main():
    return bar

main()
z

Zanie

05/24/2023, 8:44 PM
The later is the one that we just fixed and will be released tomorrow.
:upvote: 1
Your first one is not executable, what additional code are you running?
from prefect import flow, variables


@flow(name="test", flow_run_name="dev > test")
def test():
    return variables.get("test")


test()
runs fine for me on 2.10.9
d

Darren Liu

05/24/2023, 8:50 PM
what do you need to replicate
not the same flow run name i realized, but still is the case
z

Zanie

05/24/2023, 8:55 PM
What’s
prefect version
output?
d

Darren Liu

05/24/2023, 8:56 PM
Screen Shot 2023-05-24 at 1.55.48 PM.jpg
z

Zanie

05/24/2023, 8:56 PM
Nope I need
prefect version
(i.e
poetry run prefect version
)
d

Darren Liu

05/24/2023, 8:57 PM
❯ poetry run prefect version
Version:             2.10.9
API version:         0.8.4
Python version:      3.10.4
Git commit:          1655c1fa
Built:               Thu, May 11, 2023 2:29 PM
OS/Arch:             darwin/x86_64
Profile:             default
Server type:         cloud
z

Zanie

05/24/2023, 8:58 PM
Thanks!
So matching as much as I can…
❯ prefect version         
Version:             2.10.9
API version:         0.8.4
Python version:      3.10.10
Git commit:          1655c1fa
Built:               Thu, May 11, 2023 2:29 PM
OS/Arch:             darwin/arm64
Profile:             prod
Server type:         cloud
I cannot reproduce with
python example.py
j

Jake Kaplan

05/24/2023, 8:59 PM
fwiw I'm also not able to reproduce. Maybe worth installing from
main
and see if it's resolved from the linked pr above? (the fix would be included in the next release
2.10.11
)
pip install git+<https://github.com/prefectHQ/prefect>
d

Darren Liu

05/24/2023, 9:01 PM
maybe this helps it was installed as a dependency to prefect-gcp i believe
prefect-gcp = {extras = ["bigquery", "cloud_storage", "secret_manager"], version = "^0.2.3"}
in any case, thanks for helping, i'll check on next release, great work 🙂