From 0ecaefab8345bf42661e1da9991a85dcb91f8c80 Mon Sep 17 00:00:00 2001 From: Philipp Herzog Date: Thu, 29 Aug 2024 11:10:35 +0200 Subject: [PATCH] [FC-40064] skip serializing instances ci was broken for the nixos module context because it tried to serialize all instances of the test component, one of which did not have a loaded environment which is why it was missing the deployment_base attribute --- .../20240829_112623_ph_FC_40064_skip_serializing_instances.md | 1 + src/batou_ext/nix.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGES.d/20240829_112623_ph_FC_40064_skip_serializing_instances.md diff --git a/CHANGES.d/20240829_112623_ph_FC_40064_skip_serializing_instances.md b/CHANGES.d/20240829_112623_ph_FC_40064_skip_serializing_instances.md new file mode 100644 index 0000000..1f2de9c --- /dev/null +++ b/CHANGES.d/20240829_112623_ph_FC_40064_skip_serializing_instances.md @@ -0,0 +1 @@ +- fix a mysterious regression that cause a test to fail diff --git a/src/batou_ext/nix.py b/src/batou_ext/nix.py index 742c334..d357ef3 100644 --- a/src/batou_ext/nix.py +++ b/src/batou_ext/nix.py @@ -630,7 +630,7 @@ def component_to_nix(component: Component): pass elif inspect.ismethod(value) or inspect.isgenerator(value): pass - elif name in ("sub_components", "changed"): + elif name in ("sub_components", "changed", "instances"): pass elif isinstance(value, NixOSModuleContext): pass