ADD warning if a single repo fix fails
@@ -123,6 +123,7 @@ def fix_github_missing_submissions(org_name: str):
enqueue_autograde_pipeline(sid)
# Check for missing submissions
+ try:
for commit in map(lambda x: x["node"]["oid"], ref["target"]["history"]["edges"]):
submission = Submission.query.filter(Submission.commit == commit).first()
if submission is None:
@@ -138,6 +139,8 @@ def fix_github_missing_submissions(org_name: str):
db.session.commit()
init_submission(submission)
enqueue_autograde_pipeline(submission.id)
+ except TypeError as e:
+ logger.warning(f'Failed to parse commit objects for repo - {e} - {str(repo)}')
r = AssignmentRepo.query.filter(AssignmentRepo.repo_url == repo_url).first()
if r is not None:
