pyvider
2025-05-12
Major rework of the conversion pipeline and protocol handlers, migrating DynamicValue conversion...
26 files · 30,277+ · 2,947-
Conversion Pipeline Refactor
2 files changed
__init__.pyUpdated `pyvider/conversion/__init__.py` to import from the new local module instead of the proto...adapters.pyFixed `_function_meta` attribute reference to `_function_metadata` in `functions/adapters.py`
- Moved DynamicValue conversion functions out of
pyvider.protocols.tfprotov6.conversion.dynamic_valueinto a new localpyvider.conversion.dynamic_valuemodule, making the conversion layer more accessible decouple internal2 files
pyvider.protocols.tfprotov6.conversion.dynamic_valuepyvider.conversion.dynamic_value
- Added context-specific helper functions:
config_to_dynamic_value,state_to_dynamic_value,plan_to_dynamic_value,apply_to_dynamic_value,function_result_to_dynamic_valueinstantiate internal4 files
__init__.pydynamic_value.py__init__.pydynamic_value.py
- Updated
pyvider/conversion/__init__.pyto import from the new local module instead of the protocol-specific path, adding all DynamicValue converters to the public API interface behavioral1 file
__init__.py
- Changed import paths throughout to use
pyvider.core.conversion.api,pyvider.core.conversion.wire_format, andpyvider.core.conversion.contextdirectly instead of through the umbrellapyvider.core.conversionmodule interface behavioral4 files
pyvider.core.conversion.apipyvider.core.conversion.wire_formatpyvider.core.conversion.contextpyvider.core.conversion
- Modernized type annotations:
Optional[X]replaced withX | None,List[X]withlist[X]specify internal15 files
env_variables.pyfile_info.pyhttp_api.pyfile_content.py__init__.pydynamic_value.pydiscovery.py__init__.pydynamic_value.pyapply_resource_change.pycall_function.pyplan_resource_change.pyread_data_source.pyread_resource.pystop_provider.py
- Fixed
_function_metaattribute reference to_function_metadatainfunctions/adapters.pyremediate internal1 file
adapters.py
Protocol Handler Simplification
8 files changed
__init__.pyChanges to __init__.pydynamic_value.pyChanges to dynamic_value.pyapply_resource_change.pyChanges to apply_resource_change.pycall_function.pyChanges to call_function.pyplan_resource_change.pyChanges to plan_resource_change.pyread_data_source.pyChanges to read_data_source.pyread_resource.pyChanges to read_resource.pystop_provider.pyChanges to stop_provider.py
- Dramatically simplified all Terraform protocol v6 handlers, reducing each by 50-70%:
interface
internal
8 files
__init__.pydynamic_value.pyapply_resource_change.pycall_function.pyplan_resource_change.pyread_data_source.pyread_resource.pystop_provider.py
- All handlers now use explicit
OperationContextparameters instead of the context manager pattern, and check for empty DynamicValue fields before attempting unmarshal decouple internal8 files
__init__.pydynamic_value.pyapply_resource_change.pycall_function.pyplan_resource_change.pyread_data_source.pyread_resource.pystop_provider.py
Component Discovery Improvements
1 file changed
discovery.pyRewrote `hub/discovery.py` with type hints (`ComponentRegistry`, `dict[str, Any]`, `set[str]`)
- Rewrote
hub/discovery.pywith type hints (ComponentRegistry,dict[str, Any],set[str]) specify internal1 file
discovery.py
- Made
pyvider.componentspackage discovery conditional with proper error handling for when the package doesn’t exist remediate internal1 file
pyvider.components
- Consolidated component sub-package scanning into a loop over
["components.data_sources", "components.resources", "components.functions"]baseline internal1 file
discovery.py
- Simplified component registration with
elifchain checking_is_registered_resource,_is_registered_data_source,_is_registered_function,_is_registered_capabilitydecouple internal1 file
discovery.py
- Added
__path__check for single-module packages instantiate internal10 files
env_variables.pyfile_info.pyhttp_api.pyfile_content.pyapply_resource_change.pycall_function.pyplan_resource_change.pyread_data_source.pyread_resource.pystop_provider.py
Protocol Conversion Module Init
1 file changed
__init__.pyAdded `pyvider/protocols/tfprotov6/conversion/__init__.py` with proper exports for all DynamicVal...
- Added
pyvider/protocols/tfprotov6/conversion/__init__.pywith proper exports for all DynamicValue conversion functions instantiate internal1 file
__init__.py
Wire Format Changes
2 files changed
wire.pySignificant changes to `pyvider-core/src/pyvider/core/conversion/wire.py` (495 lines changed) ind...service.pyChanges to `pyvider-rpcplugin/src/pyvider/rpcplugin/protocol/service.py` (96 lines changed) for p...
- Significant changes to
pyvider-core/src/pyvider/core/conversion/wire.py(495 lines changed) indicating core wire format converter updates decouple errata1 file
wire.py
- Changes to
pyvider-rpcplugin/src/pyvider/rpcplugin/protocol/service.py(96 lines changed) for protocol service adjustments interface internal1 file
service.py
Telemetry Adjustments
2 files changed
base.pyUpdated `pyvider-telemetry/src/pyvider/telemetry/logger/base.py` (401 lines changed) with logging...decorators.pyMinor fix in `telemetry/tracer/decorators.py`
- Updated
pyvider-telemetry/src/pyvider/telemetry/logger/base.py(401 lines changed) with logging system refinements decouple behavioral1 file
base.py
- Minor fix in
telemetry/tracer/decorators.pyremediate behavioral1 file
decorators.py
Debug Logs Added
1 file changed
2025-05-12Added test execution logs under `logs/2025-05-12/` for file_content, file_info, integrated, and n...