fix: handle raw app folder deletion in sync push without yaml parse error (#7994)
* fix: handle raw app folder deletion in sync push without yaml parse error Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: update ee-repo-ref to 592848d59ca2304926fb2bd85d000668a7f46a77 This commit updates the EE repository reference after PR #420 was merged in windmill-ee-private. Previous ee-repo-ref: 931813b75b8260faa13ddc07f36a11607b7e3bf6 New ee-repo-ref: 592848d59ca2304926fb2bd85d000668a7f46a77 Automated by sync-ee-ref workflow. --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1 +1 @@
|
||||
0eccae6a9a9ecde09816cd4d88ca9ab305659e4c
|
||||
0eccae6a9a9ecde09816cd4d88ca9ab305659e4c
|
||||
@@ -88,6 +88,7 @@ import {
|
||||
isAppPath,
|
||||
isRawAppPath,
|
||||
extractFolderPath,
|
||||
extractResourceName,
|
||||
isFlowMetadataFile,
|
||||
isAppMetadataFile,
|
||||
isRawAppMetadataFile,
|
||||
@@ -2730,18 +2731,40 @@ export async function push(
|
||||
path: removeSuffix(target, getDeleteSuffix("raw_app", "json")),
|
||||
});
|
||||
} else {
|
||||
// For individual file deletions within a raw app,
|
||||
// re-push the entire raw app so the backend gets the updated file list
|
||||
// (the deleted file won't be included in the push)
|
||||
await pushObj(
|
||||
workspaceId,
|
||||
target,
|
||||
undefined,
|
||||
undefined,
|
||||
opts.plainSecrets ?? false,
|
||||
alreadySynced,
|
||||
opts.message,
|
||||
);
|
||||
const rawAppFolder = extractFolderPath(target, "raw_app");
|
||||
let folderExists = false;
|
||||
if (rawAppFolder) {
|
||||
try {
|
||||
await Deno.stat(rawAppFolder);
|
||||
folderExists = true;
|
||||
} catch {
|
||||
// folder doesn't exist
|
||||
}
|
||||
}
|
||||
if (folderExists) {
|
||||
// For individual file deletions within a raw app,
|
||||
// re-push the entire raw app so the backend gets the updated file list
|
||||
// (the deleted file won't be included in the push)
|
||||
await pushObj(
|
||||
workspaceId,
|
||||
target,
|
||||
undefined,
|
||||
undefined,
|
||||
opts.plainSecrets ?? false,
|
||||
alreadySynced,
|
||||
opts.message,
|
||||
);
|
||||
} else {
|
||||
// The entire raw app folder was deleted locally,
|
||||
// delete the raw app on the server
|
||||
const remotePath = extractResourceName(target, "raw_app");
|
||||
if (remotePath) {
|
||||
await wmill.deleteApp({
|
||||
workspace: workspaceId,
|
||||
path: remotePath,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "schedule":
|
||||
|
||||
Reference in New Issue
Block a user