Repository navigation
fix(console): wait for the inventory after a job and keep job polls running in a hidden tab - #218
Merged
Merged
Conversation
…unning in a hidden tab The Jobs lane's workflow job poll stopped while the tab was hidden, so a job that finished in the background showed its outcome only after the operator came back. It now keeps polling in the background, refetches on return while the job runs, and stops once the job settles. The Provision stage and the catalog page read the catalog once after a deploy or teardown job and claimed the result while the inventory could still lag. They now say the job finished and wait for the inventory to confirm it, polling every 3 s in a hidden tab too. The catalog page says the result is unconfirmed after 60 s; the Provision wait has no time limit, like the Finalise stage's. useCatalog takes separate teardown and deploy wait lists for this. The catalog page also no longer stays on "Deploying…" after an entry's first action: its in-flight check compared the other action's ids with null, but a first action leaves them undefined. Closes dmfdeploy/dmfdeploy#878 Signed-off-by: znerol2 <6800371+znerol2@users.noreply.github.com>
lkirc
requested changes
Nov 9, 2026
lkirc
left a comment
There was a problem hiding this comment.
Request changes: the Catalog confirmation flow skips successful async operations.
- frontend/src/pages/Catalog/index.tsx:588 — This
OperationStatusLineonly invokes callbacks forlaunchedanderror. Autoscale deploys/teardowns return watched operations; if a poll seesrun_completewithout the transientlaunchedstate, the*OpIdnever clears andhandleJobCompletenever starts the inventory wait/invalidation. Handle watched terminal operation states (as Provision does) and cover the Catalogrun_completepath.
…ed state on the catalog page The catalog page's operation status line acted on `launched` and `error` only. A watched deploy or teardown runs on past `launched`, and a poll can miss that state, so an operation that a poll first saw as `run_complete` never cleared its id and never started the inventory wait. The status line now also acts on the watched terminal states, taken from the shared terminal set. A clean finish counts as a successful job and starts the inventory wait; any other end releases the action. Watched states are labelled from the shared table. The page keeps its own status line because the shared one says "Launch did not start" for any operation with an error, which isn't true of a watched action that ran. Refs dmfdeploy/dmfdeploy#878 Signed-off-by: znerol2 <6800371+znerol2@users.noreply.github.com>
Contributor
Author
|
Fixed in 583d890. Thanks, the finding was right.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The teardown fix for dmfdeploy/dmfdeploy#862 left the same two causes of a late or premature outcome on other console pages. This PR closes them.
useWorkflowJobStatus(Jobs lane) stopped polling while the tab was hidden. It now polls in the background, refetches on return while the job runs, and stops once the job settles.INVENTORY_WAIT_MS).useCatalognow takes separateawaitingTeardownandawaitingDeploylists. Finalise passes its existing teardown list unchanged.null, but the first action leaves themundefined. It now uses!= null.Checks
npm run test: 95 files, 1176 tests pass.npm run lint: 0 problems.tsc --noEmit: 0 errors.refetchIntervalInBackgroundfromuseWorkflowJobStatusfails the hidden-tab Jobs lane test.useCatalogfails five tests across the catalog and Provision suites.Checklist
git commit -s).VERSIONbump: N/A, not a release.Closes dmfdeploy/dmfdeploy#878