Repository navigation
fix(judge): keep a job's judgements in the workspace that holds it - #273
Merged
Merged
Conversation
A job opened from another workspace (`?workspace=`) and a Compare column of another workspace read and wrote their judgements in the open workspace's store: the page did not show the judgement kept with the job, and a Judge click wrote one where deleting the open workspace would lose it. The judge's store directory now comes from the workspace that holds the job on screen: the request's `?workspace=` (the same lookup the pages use for the job), else the open workspace. Compare's sides use each column's own workspace. The Judge, Judge all, task and feasibility forms, and the reconcile and feasibility links, keep `?workspace=` so the post finds the same job. Judgements stay inside workspaces.
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.
Closes #252
What
The job and trial pages can show a job of another workspace (
?workspace=), and Compare takes columns from several workspaces. All judgement reads and writes used the open workspace's store. The page did not show the judgement kept with the job, and a Judge click wrote one into the open workspace, where it is lost when that workspace is deleted.web.judge.ws_dir(name=None)takes the directory from the workspace that holds the job on screen. It usesshared._record_workspace, the same lookup that the pages use to find the job: the request's?workspace=, else the open workspace.reconcileuses the same function and no longer has a copy of it.side_of,judge_sideand_sides_todocarry the column's store, and the v1 pair records are read from column A's workspace.?workspace=, so the POST finds the same job.Touches
routes (
web/judge.py,web/reconcile.py,web/shared.py) · testsVerified
app/ui_tests/test_judge_other_workspace.py: with workspace A open, B's trial page shows B's judgement; judging that trial writes into B, not A; the Judge forms carry?workspace=B; each Compare column reads its own workspace; a job of the open workspace keeps its store. On the base, the first four fail (B's judgement of B's trial is not shown,a judgement of B's trial was written into A), and the last passes.test_every_route's stub of_sides_todocarries the column's store.python:3.12container with Node:python3 app/tests/parallel.py: 3118 tests in 162 modules, OK.pip install -r app/requirements.txt, thenpython3 app/tests/parallel.py app/ui_tests: 714 tests in 61 modules, OK.Risk