Skip to content

v0.0.2b3

Pre-release
Pre-release

Choose a tag to compare

@pingsutw pingsutw released this 07 Aug 21:26
· 19 commits to main since this release
82e3fc5

Pre-release.

Fix

  • Keep _task annotations lazy so the shim imports on older flytekit (#61).

_task.py annotated three signatures with Union[bool, flytekit.Cache]. Module-level
annotations are evaluated eagerly, and flytekit.Cache only exists in newer flytekit, so
importing flyte_migrate inside a v1 image built against an older flytekit failed before any
user code ran:

AttributeError: module 'flytekit' has no attribute 'Cache'

This affected the v1 to v2 upgrade flow, which pip-installs the shim into the user's own
unmodified v1 image. Cache is referenced only in annotations and never at runtime, so
from __future__ import annotations is sufficient and avoids forcing a flytekit upgrade
inside images we do not control.