pyvider
2025-10-16
Enhanced resource planning with unknown/computed value handling, including a new method to...
7 files · 334+ · 44-
Unknown Value Handling
7 files changed
adapters.pyUpdated adapters.py (+62/-12 lines)function_adapter.pyAdded function_adapter.py (+28 lines)call_function.pyUpdated call_function.py (+90/-9 lines)plan_resource_change.pyUpdated plan_resource_change.py (+35/-16 lines)validate_resource_config.pyAdded validate_resource_config.py (+9 lines)base.pyUpdated base.py (+66/-7 lines)context.pyAdded context.py (+44 lines)
- Added
_cty_to_dict_preserving_unknown()class method toBaseResourcethat converts CTY values to dicts while preserving unknown CtyValue objects instead of converting them to None instantiate internal7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py
- Updated
plan()method to use the new unknown-preserving conversion and merge config fields into the base plan decouple internal7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py
- Modified
cty_to_attrs_instance()to include fields with None values (previously skipped) and return None gracefully when attrs instances cannot be created due to missing required fields from unknown/computed values decouple behavioral7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py
- Added debug logging throughout plan resource change handler for troubleshooting
instantiate
behavioral
7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py
Unknown Value Tolerance
7 files changed
adapters.pyChanges to adapters.pyfunction_adapter.pyChanges to function_adapter.pycall_function.pyChanges to call_function.pyplan_resource_change.pyChanges to plan_resource_change.pyvalidate_resource_config.pyChanges to validate_resource_config.pybase.pyChanges to base.pycontext.pyChanges to context.py
- Updated
validate_resource_confighandler to skip custom validation whenconfig_instanceis None (expected when values are unknown during planning) decouple internal7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py
- Added
test_mode_enabledfield toResourceContextinstantiate internal7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py
- Added debug logging for planned state dict processing
instantiate
behavioral
7 files
adapters.pyfunction_adapter.pycall_function.pyplan_resource_change.pyvalidate_resource_config.pybase.pycontext.py