brownfield-team / anacapa-github-linker

A tool for managing students in computer science courses. Deployed at:
https://ucsb-cs-github-linker.herokuapp.com
MIT License
4 stars 6 forks source link

[Bug] The job to purge course github records is broken #433

Open pconrad opened 3 years ago

pconrad commented 3 years ago

Expected Behavior

When you run that job, all state that can be refreshed by running other github jobs is deleted.

Current Behavior

There are errors due to foreign key constraints:

PG::ForeignKeyViolation: ERROR:  update or delete on table "github_repos" violates foreign key constraint "fk_rails_7d2101fce9" on table "completed_jobs"
DETAIL:  Key (id)=(5787) is still referenced from table "completed_jobs".
: DELETE FROM "github_repos" WHERE "github_repos"."id" = **$1

Steps to Reproduce

  1. Run the "Purge Course Github Records" on a course that has a significant amount of data
  2. See the error in the job log

Possible Solution

Either: