Hi, I am using the new variables feature. It worke...
# prefect-cloud
d
Hi, I am using the new variables feature. It worked early on but now just freezes up indefinitely
Copy code
@flow(name="test", flow_run_name="dev > test")
def test():
    return variables.get("test")
z
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
2.10.9
i'm using it exactly like the code i pasted
this usage freezes for me as well
Copy code
from prefect import flow, variables

bar = variables.get("test")


@flow
def main():
    return bar

main()
z
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?
Copy code
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
what do you need to replicate
not the same flow run name i realized, but still is the case
z
What’s
prefect version
output?
d
z
Nope I need
prefect version
(i.e
poetry run prefect version
)
d
Copy code
❯ 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
Thanks!
So matching as much as I can…
Copy code
❯ 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
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
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 🙂