<#1023 fix: resolve AppEnvironment caller frame ac...
# flyte-github
a
#1023 fix: resolve AppEnvironment caller frame across __post_init__ chains Pull request opened by pingsutw Summary •
ConnectorEnvironment.__post_init__
calls
super().__post_init__()
, adding an extra frame so
AppEnvironment
captured the dataclass
__init__
as
_caller_frame
instead of the user module. In editable installs this caused
flyte.deploy(connector)
to fail with
ValueError: ... module file .../src/flyte/app/_connector_environment.py is not relative to source directory ...
. • Walk up the stack past any `__post_init__`/`__init__` frames so
_caller_frame
always points at user code, regardless of subclass depth. • Add regression tests covering the connector and a custom subclass that adds another
__post_init__
layer. Test plan •
pytest tests/flyte/app/test_connector_environment.py
— 18 passed •
pytest tests/flyte/app/
— 199 passed • Verify
flyte.deploy(connector)
from
examples/apps/custom_connector_app/app.py
works with an editable SDK install flyteorg/flyte-sdk