Skip to content

Rerun Submission - Allow admins to rerun submissions in any status - #2613

Merged
ObadaS merged 1 commit into
developfrom
rerun-submission-any-status
Oct 13, 2026
Merged

ObadaS merged 1 commit into
developfrom
rerun-submission-any-status

Conversation

@ihsaan-ullah

Copy link
Copy Markdown
Collaborator

Description

  • Remove the status check from the re_run_submission endpoint so that competition organizers and superusers can rerun a submission in any status, not only Finished, Failed or Cancelled
  • Return 403 when rerunning a soft-deleted submission
  • Add SubmissionReRunTests

Issues this PR resolves

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@ObadaS
ObadaS self-requested a review October 6, 2026 13:38
…eruns

- Remove the status check from the re_run_submission endpoint so that
  competition organizers and superusers can rerun a submission in any
  status, not only Finished, Failed or Cancelled
- Return 403 when rerunning a soft-deleted submission
- Add SubmissionReRunTests
@ObadaS
ObadaS force-pushed the rerun-submission-any-status branch from 0e40ec0 to edf6cfe Compare October 13, 2026 08:43
@ObadaS

ObadaS commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

I tried to re-run all submission (including a soft deleted one) and it worked without any errors, however it also re-ran the soft deleted submission

Soft deleted file :
image

Re-run result :
image

@ihsaan-ullah

Copy link
Copy Markdown
Collaborator Author

This problem was already there and is not created by the updates in this PR so I will note this down in an issue and fix it in a separate PR.

Note: This PR only fixes the rerun for a single submission rerun. The problem Obada reported comes from running multiple submissions or the complete phase submissions

started_task_pks = sorted(task.pk for task in run_submission_mock.call_args.kwargs['tasks'])
assert started_task_pks == sorted(task.pk for task in tasks)

def test_cannot_re_run_soft_deleted_submission(self):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow, I was able to re-run a soft deleted submission on the frontend. Shouldn't this test fail since this is possible currently ?

@ObadaS
ObadaS merged commit 8c7c845 into develop Oct 13, 2026
2 checks passed
@ObadaS
ObadaS deleted the rerun-submission-any-status branch October 13, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants