The cmsAddContest command can delete submissions
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 412
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 3
Description
To reproduce:
- Run
cmsAddContest path(it will add the participations and the contest). - Tie tasks to the contest using AWS.
- Send some submissions using a valid participation.
- Add some more users (e.g. by editing contest.yaml and running
cmsAddUsers --all). - Run:
cmsAddContest --update-contest path(it should just add some more participations to the contest). - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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