Repository navigation
ADFA-4896 fix(dashboard): maps stop/cancel actually stop the extract - #456
Merged
Merged
Conversation
The maps runner shelled through `sudo`, so pause/cancel only killed the sudo wrapper -- the tile-extract.py worker was reparented, ran to completion in the background, and the region ended up listed even after cancel; pause "resumed" on its own for the same reason. - Engine: kill the whole process group (killAll, negative-pid SIGKILL) so a runner's detached wrapper takes its worker down with it; drop late ctx.update() once a job is paused/canceled so a slow-dying line can't resurrect the phase. - maps runner: spawn the extract detached; honor pause vs cancel via classifyStop; purge the partial (tile-extract.py delete + update-json) on any non-success. Pause is stop+restart (resume re-extracts clean); cancel removes the region entirely. No maps per-layer checkpoint yet (ADFA-4898). - Bump dashboard 1.2.5-dev.1 + CHANGELOG; add an engine test that a stopped job ignores late updates.
Confirmed against the upstream script (iiab/iiab maps role): tile-extract.py extracts each pmtiles into /library/downloads/maps and only shutil.move()s all three into the served dir once they ALL finish (updating extracts.json last), and its own `delete` cleans ONLY the served dir. So a killed extract left half-written pmtiles in TMP_DIR that `delete` never removes. purgeRegion now prunes `*.full-region.<name>.pmtiles` from TMP_DIR (name-scoped, so a concurrent extract is untouched) in addition to `delete` (kept for the rare race where the extract finished just as the stop landed; it refreshes extracts.json itself). Forward fix over the previous commit, not a rewrite.
… Stop) Code-review follow-up: cancel() only marked ACTIVE jobs 'canceled', so canceling a paused job (Cancel after Stop) left it stuck at 'paused' forever -- its runner had already exited, so there was no rt to kill and the phase guard skipped it. cancel() now finalizes 'paused' -> 'canceled' too. For maps the partial was already purged at pause time, so nothing lingers. Adds an engine test; bumps 1.2.5-dev.2.
Strip the -dev suffix now that the branch is device-verified on the box (all four behavioral checks + 5/5 engine tests; group-kill confirmed to reach the pmtiles worker under proot -- no background survivor). CHANGELOG heading 1.2.5-dev -> 1.2.5.
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.
The maps runner shelled through
sudo, so pause/cancel only killed the sudo wrapper -- the tile-extract.py worker was reparented, ran to completion in the background, and the region ended up listed even after cancel; pause "resumed" on its own for the same reason.