cms-dev / cms-dev/cms

The cmsAddContest command can delete submissions

Open
#490 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
412
Avg merge
6d 10h
Merged PRs (30d)
3

Description

To reproduce:

  1. Run cmsAddContest path (it will add the participations and the contest).
  2. Tie tasks to the contest using AWS.
  3. Send some submissions using a valid participation.
  4. Add some more users (e.g. by editing contest.yaml and running cmsAddUsers --all).
  5. Run: cmsAddContest --update-contest path (it should just add some more participations to the contest).
  6. All the previous submissions are deleted from the database.

I suspect that this happens because in step 5 the participations are deleted and then created a second time (meanwhile, the ones that were added in step 4 are going to be created for the first time).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the cmsAddContest command and trace the --update-contest path, focusing on how existing participations are handled before new users are added. Reproduce the listed sequence, then verify that updating contest users preserves existing submissions and add a regression test if the project’s test structure exposes this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.