<#28 Refactor shim codebase for clarity and mainta...
# flyte-github
a
#28 Refactor shim codebase for clarity and maintainability Pull request opened by pingsutw Summary • Core shim layer: Extract helpers from
task_shim
(
_translate_cache_policy
,
_build_task_environment
,
_register_task_environment
), add docstrings to
__init__
,
_task
,
_workflow
,
_dynamic
• Peripheral shims: Add docstrings, type hints, and TODO comments to
_map
,
_launchplan
,
_context
, `_deck`; simplify schedule handling in
_launchplan
• Plugins system: Replace static
transformer_map
dict with registry pattern (
register_plugin()
), add consistent docstrings across all plugin modules • Transformation utilities: Break
_image.py
into
_build_base_image
+
_apply_image_layers
to eliminate parent_env mirroring duplication; extract helpers in
_resource
,
_secret
, `_pod_template`; add 43 new unit tests in
test_transform_utils.py
No behavioral changes — pure refactoring with added test coverage. Test plan •
make fmt
passes •
make lint
passes •
make mypy
passes •
uv run pytest
— 100 tests pass (43 new) flyteorg/flyte-migrate