Skip to content

Commit 92bef2c

Browse files
committed
fix: show 'merging' phase step during osspckgs merge loop
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent d9244ba commit 92bef2c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

services/apps/packages_worker/src/deps-dev/workflows/ingestDependencies.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,11 @@ export async function ingestDependencies(opts: {
397397
let priorStagingRows = 0
398398
const priorTableRowCounts: Record<string, number> = {}
399399

400+
// Advance the phase label to 'merging' before the loop. The merge itself sets status='merging'
401+
// but never a step, so without this the monitor keeps showing the last phase (creating_lookup for
402+
// fill/incremental, drop_indexes for full) alongside the 'merging' status. Set once, not per chunk.
403+
await setJobStep({ jobId: exportResult.jobId, step: 'merging' })
404+
400405
for (let chunkIndex = startChunk; chunkIndex < totalChunks; chunkIndex++) {
401406
const start = chunkIndex * filesPerChunk
402407
const chunk = fileNames.slice(start, start + filesPerChunk)

services/apps/packages_worker/src/scripts/monitorOsspckgs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ function statusStr(status: string, step?: string | null, stuck?: boolean) {
114114
const c = stuck ? A.yellow : (STATUS_COLOR[status as keyof typeof STATUS_COLOR] ?? '')
115115
const i = stuck ? '⚠' : (STATUS_ICON[status as keyof typeof STATUS_ICON] ?? '?')
116116
const label =
117-
step && !['done', 'failed', 'cleaned'].includes(status) ? `${status}·${step}` : status
117+
step && step !== status && !['done', 'failed', 'cleaned'].includes(status)
118+
? `${status}·${step}`
119+
: status
118120
return `${c}${i} ${label}${A.reset}`
119121
}
120122

0 commit comments

Comments
 (0)