Type
Bug
Scope
Multi-theme or Platform
Skillset
engineering
Description
What: overture.schema.pyspark._registry.REGISTRY comes back empty on AWS Glue. Every feature type then silently reports as unregistered and the task erroneously succeeds 🫠
Why: _registry.py discovers generated modules by walking the expressions/generated/ PEP 420 namespace package with pathlib.Path(root_path).rglob("*.py"), which works... only when a real filesystem directory exists! When the package is added to sys.path as a raw .whl (as Glue does in data-platform when we call it with --extra-py-files), the namespace package's __path__ portions point inside the zip archive, and pathlib can't traverse into one, so the walk silently returns nothing.
Constraints: importlib.resources.files() looks like the obvious fix (its Traversable API is meant to be zipimport-aware), but its MultiplexedPath implementation (at least through Python 3.10) raises NotADirectoryError the moment any namespace portion isn't a real directory -- confirmed by testing it directly against a zip-imported wheel. It can't be used here as-is.
Acceptance criteria:
REGISTRY populates correctly whether overture-schema-pyspark is installed normally (real directory) or loaded via zipimport (raw wheel on sys.path).
- The documented behavior for a missing
expressions/generated/ subtree (empty registry, no crash) is unchanged.
- No regression in the existing
overture-schema-pyspark test suite.
Type
Bug
Scope
Multi-theme or Platform
Skillset
engineering
Description
What:
overture.schema.pyspark._registry.REGISTRYcomes back empty on AWS Glue. Every feature type then silently reports as unregistered and the task erroneously succeeds 🫠Why:
_registry.pydiscovers generated modules by walking theexpressions/generated/PEP 420 namespace package withpathlib.Path(root_path).rglob("*.py"), which works... only when a real filesystem directory exists! When the package is added tosys.pathas a raw.whl(as Glue does in data-platform when we call it with--extra-py-files), the namespace package's__path__portions point inside the zip archive, andpathlibcan't traverse into one, so the walk silently returns nothing.Constraints:
importlib.resources.files()looks like the obvious fix (itsTraversableAPI is meant to be zipimport-aware), but itsMultiplexedPathimplementation (at least through Python 3.10) raisesNotADirectoryErrorthe moment any namespace portion isn't a real directory -- confirmed by testing it directly against a zip-imported wheel. It can't be used here as-is.Acceptance criteria:
REGISTRYpopulates correctly whetheroverture-schema-pysparkis installed normally (real directory) or loaded via zipimport (raw wheel onsys.path).expressions/generated/subtree (empty registry, no crash) is unchanged.overture-schema-pysparktest suite.