diff --git a/backend/windmill-api/src/workspaces.rs b/backend/windmill-api/src/workspaces.rs index 476cee4997..674d05861f 100644 --- a/backend/windmill-api/src/workspaces.rs +++ b/backend/windmill-api/src/workspaces.rs @@ -1110,7 +1110,18 @@ where .as_object() .map(|obj| { let mut obj = obj.clone(); - for key in ["workspace_id", "path", "name", "versions"] { + for key in [ + "workspace_id", + "path", + "name", + "versions", + "id", + "created_at", + "updated_at", + "created_by", + "updated_by", + "edited_at", + ] { if obj.contains_key(key) { obj.remove(key); } diff --git a/cli/apps.ts b/cli/apps.ts index 358badf2a4..5c67e5f77a 100644 --- a/cli/apps.ts +++ b/cli/apps.ts @@ -17,6 +17,7 @@ export class AppFile implements Resource, PushDiffs { @property(Any) policy: Policy; + constructor(value: string, summary: string, policy: Policy) { this.value = value; this.summary = summary; @@ -64,7 +65,6 @@ export class AppFile implements Resource, PushDiffs { v !== null && typeof v !== "undefined" ); if (!hasChanges) { - console.log(colors.yellow("! Skipping empty changeset")); return; } diff --git a/cli/flow.ts b/cli/flow.ts index 9d1ff37656..6ad93ee748 100644 --- a/cli/flow.ts +++ b/cli/flow.ts @@ -87,7 +87,6 @@ export class FlowFile implements Resource, PushDiffs { v !== null && typeof v !== "undefined" ); if (!hasChanges) { - console.log(colors.yellow("! Skipping empty changeset")); return; } diff --git a/cli/folder.ts b/cli/folder.ts index 4be94ac824..f94fc89080 100644 --- a/cli/folder.ts +++ b/cli/folder.ts @@ -95,7 +95,6 @@ export class FolderFile implements Resource, PushDiffs { v !== null && typeof v !== "undefined" ); if (!hasChanges) { - console.log(colors.yellow("! Skipping empty changeset")); return; } diff --git a/cli/resource-type.ts b/cli/resource-type.ts index 474dde1d7d..5fe333464b 100644 --- a/cli/resource-type.ts +++ b/cli/resource-type.ts @@ -91,7 +91,6 @@ export class ResourceTypeFile implements ResourceI, PushDiffs { v !== null && typeof v !== "undefined" ); if (!hasChanges) { - console.log(colors.yellow("! Skipping empty changeset")); return; } diff --git a/cli/resource.ts b/cli/resource.ts index b6379c049b..0e7caff1e6 100644 --- a/cli/resource.ts +++ b/cli/resource.ts @@ -80,7 +80,6 @@ export class ResourceFile implements Resource2, PushDiffs { v !== null && typeof v !== "undefined" ); if (!hasChanges) { - console.log(colors.yellow("! Skipping empty changeset")); return; } diff --git a/cli/sync.ts b/cli/sync.ts index d6577868f6..836b7d34cf 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -192,8 +192,10 @@ async function compareDynFSElement( if (m2[k] === undefined) { changes.push({ name: "added", path: k, content: v }); } else if (m2[k] != v) { - // await Deno.writeTextFile("/tmp/k", m2[k]) - // await Deno.writeTextFile("/tmp/v", v) + await Deno.writeTextFile("/tmp/k", m2[k]) + await Deno.writeTextFile("/tmp/v", v) + console.log(k) + // Deno.exit(1) changes.push({ name: "edited", path: k, after: v, before: m2[k] }); } } @@ -511,6 +513,10 @@ async function push(opts: GlobalOptions & { raw: boolean, yes: boolean }) { remotePath = parts[0]; } } + if (diffs.length === 0) { + console.log("No diffs to apply to " + remotePath) + return; + } return file.pushDiffs(workspace, remotePath, diffs); } } diff --git a/cli/variable.ts b/cli/variable.ts index de75394b21..270fb27191 100644 --- a/cli/variable.ts +++ b/cli/variable.ts @@ -94,7 +94,6 @@ export class VariableFile implements Resource, PushDiffs { v !== null && typeof v !== "undefined" ); if (!hasChanges) { - console.log(colors.yellow("! Skipping empty changeset")); return; } await VariableService.updateVariable({