mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-13 16:02:59 +00:00
fix: notify when a resource is retyped to an internal type
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
564bb49b5c
commit
12b9f4fecc
@@ -59,7 +59,7 @@ EXECUTE FUNCTION notify_mcp_tools_change();
|
||||
CREATE TRIGGER resource_mcp_tools_update_trigger
|
||||
AFTER UPDATE OF path, resource_type, description ON resource
|
||||
FOR EACH ROW
|
||||
WHEN (NEW.resource_type NOT IN ('cache', 'state')
|
||||
WHEN ((OLD.resource_type NOT IN ('cache', 'state') OR NEW.resource_type NOT IN ('cache', 'state'))
|
||||
AND (OLD.path IS DISTINCT FROM NEW.path
|
||||
OR OLD.resource_type IS DISTINCT FROM NEW.resource_type
|
||||
OR OLD.description IS DISTINCT FROM NEW.description))
|
||||
|
||||
@@ -1075,7 +1075,8 @@ async fn check_path_conflict<'c>(
|
||||
/// Resource types the platform writes on its own behalf rather than users editing them:
|
||||
/// `state` backs `setState` and `cache` backs cached job results, so both are rewritten on
|
||||
/// every job run. Workspace export skips them for the same reason the `record_resource_version`
|
||||
/// trigger does; that trigger repeats this list in SQL, so the two have to move together.
|
||||
/// trigger does; that trigger and the `notify_mcp_tools_change` resource triggers repeat this
|
||||
/// list in SQL, so they have to move together.
|
||||
pub const INTERNAL_RESOURCE_TYPES: [&str; 2] = ["state", "cache"];
|
||||
|
||||
/// Versions retained per resource path. The monitor sweep enforces it eventually; the history
|
||||
|
||||
Reference in New Issue
Block a user