mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-16 00:03:02 +00:00
feat: show which part of the copy a fork being created is in
The background copy reports its phase (data tables, settings, resources, scripts, flows, apps, drafts, triggers) through a watch channel. The heartbeat task records it on the fork's creation row as soon as it changes, and fork_creation_status returns it. The fork wizard shows it on its button, and the CLI logs each step. 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
fd032a16c5
commit
1d52d20dee
@@ -30,6 +30,7 @@ import {
|
||||
*/
|
||||
async function waitForForkCreation(parentWorkspace: string, forkId: string) {
|
||||
let failedPolls = 0;
|
||||
let lastStep: string | undefined;
|
||||
while (true) {
|
||||
let result:
|
||||
| Awaited<ReturnType<typeof wmill.getForkCreationStatus>>
|
||||
@@ -47,6 +48,10 @@ async function waitForForkCreation(parentWorkspace: string, forkId: string) {
|
||||
if (exists) return;
|
||||
if (++failedPolls >= 10) throw e;
|
||||
}
|
||||
if (result?.status === "running" && result.step && result.step !== lastStep) {
|
||||
lastStep = result.step;
|
||||
log.info(colors.gray(`${lastStep}...`));
|
||||
}
|
||||
if (result?.status === "completed") return;
|
||||
if (result?.status === "failed") {
|
||||
throw new Error(result.error ?? "Unknown error");
|
||||
|
||||
Reference in New Issue
Block a user