diff --git a/src/foxops/engine/initialization.py b/src/foxops/engine/initialization.py index f9fb1aae..e9241af4 100644 --- a/src/foxops/engine/initialization.py +++ b/src/foxops/engine/initialization.py @@ -62,7 +62,7 @@ async def initialize_incarnation( template_repository=template_repository, template_repository_version=template_repository_version, template_repository_version_hash=template_repository_version_hash, - template_data=template_data_model.model_dump(exclude_defaults=True), + template_data=template_data, template_data_full=full_template_data, ) incarnation_state.save(incarnation_root_dir / ".fengine.yaml") diff --git a/src/foxops/services/change.py b/src/foxops/services/change.py index 0508353f..18c6a85e 100644 --- a/src/foxops/services/change.py +++ b/src/foxops/services/change.py @@ -188,7 +188,7 @@ async def create_incarnation( commit_sha=commit_sha, requested_version_hash=incarnation_state.template_repository_version_hash, requested_version=template_repository_version, - requested_data=json.dumps(template_data), + requested_data=json.dumps(incarnation_state.template_data), template_data_full=json.dumps(incarnation_state.template_data_full), ) diff --git a/tests/engine/test_initialization.py b/tests/engine/test_initialization.py index ad5d1387..2c998781 100644 --- a/tests/engine/test_initialization.py +++ b/tests/engine/test_initialization.py @@ -272,5 +272,5 @@ async def test_initialize_template_adds_additional_variables_to_state(tmp_path): # THEN assert incarnation_state is not None - assert "additional_variable_1" not in incarnation_state.template_data - assert "additional_variable_2" not in incarnation_state.template_data + assert "additional_variable_1" in incarnation_state.template_data + assert "additional_variable_2" in incarnation_state.template_data