From 10197abcfd71939c2ad35553c82ea4ec3710f01c Mon Sep 17 00:00:00 2001 From: James Garner Date: Mon, 31 Aug 2026 21:03:32 +1200 Subject: [PATCH] chore(filesystem-info): 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. 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 --- .../filesystem_info/interface/v0/schema.py | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/interfaces/filesystem_info/interface/v0/schema.py b/interfaces/filesystem_info/interface/v0/schema.py index bbfe058b4..d6906024a 100644 --- a/interfaces/filesystem_info/interface/v0/schema.py +++ b/interfaces/filesystem_info/interface/v0/schema.py @@ -1,19 +1,16 @@ """This file defines the schemas for the provider and requirer sides of the filesystem_info interface. -It exposes two interfaces.schema_base.DataBagSchema subclasses called: -- ProviderSchema -- RequirerSchema +It defines one model, `ProviderAppData`. Examples: - ProviderSchema: + Provider: app: { "endpoint": "nfs://(192.168.1.1:65535)/export" } unit: - RequirerSchema: + Requirer: unit: app: """ -from interface_tester.schema_base import DataBagSchema from pydantic import BaseModel, Field @@ -30,11 +27,6 @@ class ProviderAppData(BaseModel): ) -class ProviderSchema(DataBagSchema): - """Provider schema for filesystem_info.""" - - app: ProviderAppData - - -class RequirerSchema(DataBagSchema): - """Requirer schema for filesystem_info.""" +ProviderUnitData = None +RequirerAppData = None +RequirerUnitData = None