From 379c65ba5ca4b3f897c97be30aa6c8abe27908cc Mon Sep 17 00:00:00 2001 From: caballeto Date: Wed, 6 May 2026 00:57:51 +0200 Subject: [PATCH] fix(yaml): exclude managedBy from ResourceGroupSnapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the existing pattern used for MonitorSnapshot — `managedBy` is a mutation signal (provenance), not declarative state, and should not participate in snapshot diffs. Pre-emptive: required when the API exposes `managedBy` on UpdateResourceGroupRequest (devhelmhq/mono#362). Without this, the CLI's regen-from-spec build fails with TS2322 because toDesiredSnapshot/toCurrentSnapshot don't (and shouldn't) populate the new field. Co-authored-by: Cursor --- src/lib/yaml/handlers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/yaml/handlers.ts b/src/lib/yaml/handlers.ts index cc40848..70e6a14 100644 --- a/src/lib/yaml/handlers.ts +++ b/src/lib/yaml/handlers.ts @@ -619,7 +619,9 @@ const webhookHandler = defineHandler +// managedBy is a mutation signal (provenance), not declarative state — +// snapshots should ignore it the same way the Monitor handler does. +type ResourceGroupSnapshotBase = Required> type ResourceGroupSnapshot = Omit & { defaultRetryStrategy: ResourceGroupSnapshotBase['defaultRetryStrategy'] | null }