From 79082b7e26ba52575374d46b32b452581c47b377 Mon Sep 17 00:00:00 2001 From: James Garner Date: Mon, 31 Aug 2026 21:03:32 +1200 Subject: [PATCH] chore(istio-metadata): move the interface schema to the new format Interface schemas no longer wrap their models in the `ProviderSchema` and `RequirerSchema` classes from `pytest-interface-tester`. Instead a schema names all four databags directly, as `ProviderAppData`, `ProviderUnitData`, `RequirerAppData` and `RequirerUnitData`, setting a databag that is always empty to `None`. Naming all four makes an empty databag a deliberate choice a reviewer can see, and makes a misspelled name an error rather than a silently empty databag. The models are unchanged; only the wrapper classes around them are gone. Dropping the `pytest-interface-tester` import leaves Pydantic as the only dependency needed to read a schema. `IstioMetadataAppData` is part of the library's public API, so it is aliased rather than renamed. A follow-up PR documents the format and adds a CI check for it, once every interface has been migrated. Co-Authored-By: Claude Opus 5 --- .../src/charmlibs/interfaces/istio_metadata/_schema.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interfaces/istio_metadata/src/charmlibs/interfaces/istio_metadata/_schema.py b/interfaces/istio_metadata/src/charmlibs/interfaces/istio_metadata/_schema.py index 8a5838f9e..795cb9405 100644 --- a/interfaces/istio_metadata/src/charmlibs/interfaces/istio_metadata/_schema.py +++ b/interfaces/istio_metadata/src/charmlibs/interfaces/istio_metadata/_schema.py @@ -34,3 +34,9 @@ class IstioMetadataAppData(BaseModel): description='The root namespace for the Istio installation.', examples=['istio-system'], ) + + +ProviderAppData = IstioMetadataAppData +ProviderUnitData = None +RequirerAppData = None +RequirerUnitData = None