Skip to content

[Bugfix:Autograding] Fix team autograding#11919

Merged
bmcutler merged 2 commits into
mainfrom
fix-team-autograding
Jul 27, 2025
Merged

[Bugfix:Autograding] Fix team autograding#11919
bmcutler merged 2 commits into
mainfrom
fix-team-autograding

Conversation

@williamschen23

@williamschen23 williamschen23 commented Jul 27, 2025

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Regression came from #11578
Current production is broken right now with team gradeables. This is because the update portion of the team gradeable does not have a connection.commit(), which the non-team gradeable has. Putting the commit statement outside of both if and else if is going to fix the issue.

Whenever you submit a team gradeable, you will see the Something went wrong will this submission banner. When you take a closer look in the electronic_gradeable_data table, the value of completed will always be false. We can manually check the grades that we received in results/grades.txt to see that we actually received a grade for the assignment. As mentioned before, this is because the table is not being updated when the job finishes, and thus the user recieves the error.

What is the New Behavior?

Putting the commit statement outside of both if and else if is going to fix the issue. This ensures that insertions and updates will both be commited.
The autoload_with=engine vs db is a semantic difference as it doesnt impact the overall issue. SQLAlchemy takes both conection and engine, but as engine was more widely used and recommended in sqlalchemy, we should use this instead.

What steps should a reviewer take to reproduce or test the bug or new feature?

Automated Testing & Documentation

We should do a cypress autograding test of team gradeables so that it doesnt get broken in the future.

Other information

check_refresh for team gradeables is broken. It will need to be fixed before we make the autograding test, as cypress relies on the automatic refreshs in order to detect new elements

@bmcutler bmcutler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yay! Thanks @williamschen23
This appears to have resolved the issue on production machine.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jul 27, 2025
@bmcutler
bmcutler merged commit 4e69e05 into main Jul 27, 2025
29 checks passed
@bmcutler
bmcutler deleted the fix-team-autograding branch July 27, 2025 02:50
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jul 27, 2025
@codecov

codecov Bot commented Jul 27, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.79%. Comparing base (36a09bf) to head (8d73bc5).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##               main   #11919       +/-   ##
=============================================
+ Coverage     21.74%   35.79%   +14.04%     
=============================================
  Files           268       20      -248     
  Lines         35758     2478    -33280     
  Branches        458        0      -458     
=============================================
- Hits           7777      887     -6890     
+ Misses        27527     1591    -25936     
+ Partials        454        0      -454     
Flag Coverage Δ
autograder 21.31% <0.00%> (ø)
js ?
migrator ?
php ?
python_submitty_utils ?
submitty_daemon_jobs 88.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

bmcutler pushed a commit that referenced this pull request Mar 22, 2026
### Why is this Change Important & Necessary?
Fixes #11920
An issue where team submissions would cause an error, resolved by PR
#11919 . Currently there is no cypress test to catch the error in the
future.

### What is the New Behavior?
This test checks to make sure no such error happens again for team
autograding submissions

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Review the code and make sure the test is passing.

### Automated Testing & Documentation

### Other information
This is not a breaking change.

---------

Co-authored-by: Rkoester47 <[email protected]>
IDzyre pushed a commit to IDzyre/Submitty that referenced this pull request Mar 22, 2026
### Why is this Change Important & Necessary?
Fixes Submitty#11920
An issue where team submissions would cause an error, resolved by PR
Submitty#11919 . Currently there is no cypress test to catch the error in the
future.

### What is the New Behavior?
This test checks to make sure no such error happens again for team
autograding submissions

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Review the code and make sure the test is passing.

### Automated Testing & Documentation

### Other information
This is not a breaking change.

---------

Co-authored-by: Rkoester47 <[email protected]>
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 25, 2026
### Why is this Change Important & Necessary?
Fixes Submitty#11920
An issue where team submissions would cause an error, resolved by PR
Submitty#11919 . Currently there is no cypress test to catch the error in the
future.

### What is the New Behavior?
This test checks to make sure no such error happens again for team
autograding submissions

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Review the code and make sure the test is passing.

### Automated Testing & Documentation

### Other information
This is not a breaking change.

---------

Co-authored-by: Rkoester47 <[email protected]>
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 29, 2026
### Why is this Change Important & Necessary?
Fixes Submitty#11920
An issue where team submissions would cause an error, resolved by PR
Submitty#11919 . Currently there is no cypress test to catch the error in the
future.

### What is the New Behavior?
This test checks to make sure no such error happens again for team
autograding submissions

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Review the code and make sure the test is passing.

### Automated Testing & Documentation

### Other information
This is not a breaking change.

---------

Co-authored-by: Rkoester47 <[email protected]>
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Apr 14, 2026
### Why is this Change Important & Necessary?
Fixes Submitty#11920
An issue where team submissions would cause an error, resolved by PR
Submitty#11919 . Currently there is no cypress test to catch the error in the
future.

### What is the New Behavior?
This test checks to make sure no such error happens again for team
autograding submissions

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Review the code and make sure the test is passing.

### Automated Testing & Documentation

### Other information
This is not a breaking change.

---------

Co-authored-by: Rkoester47 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants