Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception after destroying submission #2026

Open
damianhxy opened this issue Dec 9, 2023 · 0 comments
Open

Exception after destroying submission #2026

damianhxy opened this issue Dec 9, 2023 · 0 comments

Comments

@damianhxy
Copy link
Member

damianhxy commented Dec 9, 2023

Your environment
Carnegie Mellon's Autolab

Steps To Reproduce
Reported but unable to reproduce. Manifests after destroying a submission. Does not persist to future page loads.

Seems to have to do with @submissions still containing the destroyed submission when index is loaded.

Hypothesis: submission is reported as destroyed but is removed from the database between definition of @submissions and rendering of template.

Stacktrace

An ActionView::Template::Error occurred in submissions#index:

Couldn't find Submission with 'id'=8972176
app/models/submission.rb:458:in `raw_score_cached'

-------------------------------
Request:
-------------------------------

* URL        : https://autolab.andrew.cmu.edu/courses/15122-f23/assessments/c0vm/submissions
* HTTP Method: GET
* IP address : 71.182.132.148
* Parameters : {"controller"=>"submissions", "action"=>"index", "course_name"=>"15122-f23", "assessment_name"=>"c0vm"}
* Timestamp  : 2023-12-08 13:00:09 -0500
* Server : [autolab-01.andrew.cmu.edu](http://autolab-01.andrew.cmu.edu/)
* Rails root : /opt/autolab
* Process: 74821

-------------------------------
Session:
-------------------------------

* session id: [FILTERED]
* data: {[Filtered]
"gradeUser27518"=>"348705",
"gradeUser27203"=>"347712",
"gradeUser27200"=>"347301",
"gradeUser27206"=>"348192",
"gradeUser27197"=>"348498",
"gradeUser27209"=>"347934",
"gradeUser27524"=>"348684",
"gradeUser27527"=>"347373",
"gradeUser25398"=>"281635",
"gradeUser25386"=>"281635",
"gradeUser25401"=>"281635",
"gradeUser28302"=>"368823",
"gradeUser28383"=>"372912",
"gradeUser28386"=>"377476",
"gradeUser28392"=>"373109",
"gradeUser28389"=>"373199",
"gradeUser28395"=>"373029",
"gradeUser28398"=>"373144",
"gradeUser28407"=>"373144",
"gradeUser28404"=>"373132",
"gradeUser28410"=>"372782",
"gradeUser28413"=>"373092",
"flash"=>
{"discard"=>[], "flashes"=>{"success"=>"Submission successfully destroyed"}}}

-------------------------------
Backtrace:
-------------------------------

app/models/submission.rb:458:in `raw_score_cached'
app/models/submission.rb:447:in `raw_score'
app/models/submission.rb:521:in `final_score_opts!'
app/models/submission.rb:514:in `final_score_opts'
app/models/submission.rb:328:in `final_score'
app/views/submissions/index.html.erb:101
app/helpers/application_helper.rb:112:in `computed_score'
app/views/submissions/index.html.erb:101
app/views/submissions/index.html.erb:82

-------------------------------
Data:
-------------------------------

* data: {:user=>
#<User id: 1689, email: "[iliano@andrew.cmu.edu](mailto:iliano@andrew.cmu.edu)", first_name: "Iliano", last_name: "Cervesato", administrator: false, created_at: "2016-01-05 20:40:32", updated_at: "2023-03-19 18:01:59", school: "", major: "", year: "">,
:course=>
#<Course:0x00007fdab8c13c30
id: 2079,
name: "15122-f23",
semester: "f23",
late_slack: 0,
grace_days: 3,
display_name: "15-122: Principles of Imperative Computation",
start_date: Mon, 05 Jun 2023,
end_date: Sun, 31 Dec 2023,
disabled: false,
exam_in_progress: false,
version_threshold: -1,
late_penalty_id: 104937,
version_penalty_id: 104940,
cgdub_dependencies_updated_at: Fri, 03 Nov 2023 11:01:35 EDT -04:00,
gb_message: "",
website: "https://www.cs.cmu.edu/~15122/">,
:assessment=>
#<Assessment:0x00007fdab8bf9fb0
id: 28413,
due_at: Thu, 07 Dec 2023 21:00:00 EST -05:00,
end_at: Fri, 08 Dec 2023 21:00:00 EST -05:00,
start_at: Mon, 20 Nov 2023 21:00:00 EST -05:00,
name: "c0vm",
description: "Use this Autolab instance only for the FULL c0vm homework.",
created_at: Fri, 30 Jun 2023 11:32:06 EDT -04:00,
updated_at: Fri, 15 Sep 2023 09:30:22 EDT -04:00,
course_id: 2079,
display_name: "The C0VM (Final)",
handin_filename: "handin.tgz",
handin_directory: "handin",
max_grace_days: 1,
handout: "c0vm-handout.tgz",
writeup: "c0vm-writeup.pdf",
allow_unofficial: false,
max_submissions: -1,
disable_handins: false,
exam: false,
max_size: 2,
version_threshold: 20,
late_penalty_id: nil,
version_penalty_id: nil,
grading_deadline: Fri, 08 Dec 2023 21:00:00 EST -05:00,
has_svn: false,
quiz: false,
quizData: "",
remote_handin_path: "",
category_name: "Programming",
group_size: 1,
embedded_quiz_form_data: nil,
embedded_quiz: false,
github_submission_enabled: false,
allow_student_assign_group: true,
is_positive_grading: false>,
:submission=>nil}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant