Repository navigation
v0.0.2b3
Pre-release
Pre-release
Pre-release.
Fix
- Keep
_taskannotations 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.