https://prefect.io logo
Title
j

Josh Paulin

10/14/2022, 5:54 PM
Noticing a change in behaviour for results since upgrading to 2.6. A task that would return an empty list now returns
None
. Wondering if this is intentional. Minimal example in the thread. Also found out I canโ€™t downgrade from 2.6 to 2.5 because of what looks like some database migrations? Running
prefect orion database reset -y
on a database with 2.5 after upgrading to 2.6 and it fails.
๐Ÿ‘€ 1
โœ… 1
:thank-you: 1
@task()
def my_task():
    return []


@flow()
def my_flow():
    result = my_task()
    print(result)
In 2.5
results == []
In 2.6
results is None
z

Zanie

10/14/2022, 5:57 PM
You can downgrade your database on 2.6 then upgrade it on 2.5 and it should work. This change is definitely not intentional. Iโ€™ll look into it, thanks for pointing it out!
๐Ÿ™ 1
j

Josh Paulin

10/14/2022, 5:59 PM
That did the trick
thanks!
z

Zanie

10/14/2022, 6:01 PM
In the meantime you can do
@task(persist_result=True)
as well for a fix.
I reproduced successfully and will get a fix out asap.
๐Ÿ™ 2
Ah this is a weird edge-case in Pydantic
Hey! This is fixed in 2.6.1 which is now available.
Thanks again for the report.
j

Josh Paulin

10/14/2022, 7:13 PM
Yep. Just ran the failing test suite against the new version and itโ€™s working!
๐Ÿ‘ 1
My pleasure
l

Liz McCutcheon

10/20/2022, 3:09 PM
Thank you for this! Was just about to post with the same issue
z

Zanie

10/20/2022, 3:12 PM
There are some additional minor fixes for results in the latest release as well ๐Ÿ™‚
๐Ÿ‘ 1