From 6dd2502d70dffcadee4427164db02607cd109c61 Mon Sep 17 00:00:00 2001 From: wendrul <53628737+wendrul@users.noreply.github.com> Date: Tue, 11 Mar 2025 20:04:23 +0100 Subject: [PATCH] fix: cache for querying scripts correclty handles ScriptMetadata (#5466) --- backend/windmill-common/src/cache.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/windmill-common/src/cache.rs b/backend/windmill-common/src/cache.rs index 7447213605..d38ca38019 100644 --- a/backend/windmill-common/src/cache.rs +++ b/backend/windmill-common/src/cache.rs @@ -802,6 +802,12 @@ const _: () = { } } + impl ScriptMetadata { + fn export_metadata(&self, dst: &impl Storage) -> error::Result<()> { + Ok(dst.put("info.json", serde_json::to_vec(self)?)?) + } + } + impl Export for ScriptFull { type Untrusted = RawScript; @@ -817,7 +823,7 @@ const _: () = { fn export(&self, dst: &impl Storage) -> error::Result<()> { self.data.export(dst)?; - self.meta.export(dst)?; + self.meta.export_metadata(dst)?; Ok(()) } }