Repository navigation
start stuck task - #29
Merged
Merged
Conversation
Merged
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.
Handover: start stuck task (G-32)
What you asked for
Tasks were getting stuck in "todo" while their owner looked idle. T-200 and T-202 on G-31 are two examples. Nobody could see why, and there was no way to push them to start.
What changed
There are 12 small commits on branch
canopy/start-stuck-task, 18 files in total. There is no database change.1. Every stuck todo task now says why it isn't starting. (T-208)
hub/internal/orch/schedule.go(startBlocker,recordBlockers). The reason is also returned asblocked_reasonby the board and byGET /tasks/{id}.2. Tasks stuck behind a dead session now restart on their own. (T-209)
hub/internal/orch/schedule.go(stuckSession,restartStuck).3. A "Start now" button. (T-210 and T-211)
hub/internal/orch/startnow.goandhub/internal/api/agents.go(handleStartTask). The route isPOST /api/v1/tasks/{id}/start, documented inshared/openapi.yaml.How to check it
Automated tests. The full Go test suite and the system tests passed. They ran against a temporary database, because the local Postgres rejected the
canopylogin. The new tests are:hub/internal/orch/blocker_test.go: each reason and the order they are checked in, plusTestStuckSessionandTestStuckSessionSkippedWhileBusy.e2e/system/stuck_test.go→TestTodoTaskBehindDeadGateRestarts. This failed before the fix and passes now.hub/internal/api/start_task_test.go: starting after a dead session, the offline computer case, non-todo tasks, and privacy (another org gets "not found").By hand. Nobody has tried this in the running app yet. To try it:
make hubandmake web, and open the board.What isn't done or is risky
make genfails at itspnpmstep on this machine, andpnpm-lock.yamllooks broken. The API types were generated another way. The lockfile needs a separate fix.schedule.go. There are no migration clashes, because this goal adds none.TestHugeInputsStayBoundedcan fail when the tests run with-raceon a busy machine. It is unrelated to this change.What you need to decide
Auto-restart. Should dead sessions keep restarting on their own, as built? The other choice is to only show the reason and wait for someone to press Start now. I recommend keeping auto-restart, since this was the bug.
Who can press Start now. Right now it is admins and the goal's creator. Should the goal's manager agent or other workspace members also be allowed?
Follow-ups. Should I plan a small follow-up for these?
The first one is the most visible.