[Bugfix:Autograding] Keep generated_output logs#12747
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12747 +/- ##
=========================================
Coverage 21.56% 21.56%
Complexity 9796 9796
=========================================
Files 268 268
Lines 36703 36703
Branches 490 490
=========================================
Hits 7915 7915
Misses 28302 28302
Partials 486 486
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
roye2
self-requested a review
April 21, 2026 18:41
roye2
approved these changes
Apr 21, 2026
roye2
left a comment
Contributor
There was a problem hiding this comment.
I reproduced the bug on main and then saw that the changes in this PR fix the bug (the generated_output logs persist). I also did a code review and it looks good. I'm not sure why the .format is double-tabbed, but it is consistent with how the rest of the file was written, so I guess it's okay :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this Change Important & Necessary?
Fixes #12690
When running
sbin/anonymize_autograding_logs.py, the script only handled logs with 6 path components (liketerm/course/submissions/gradeable/user/version). Jobs forgenerated_outputsuch asterm/course/generated_output/gradeableonly have 4, causing them to be silently discarded. This fix handles them gracefully.What is the New Behavior?
The script now properly accounts for
generated_outputjob log entries. Because these log entries do not include context about the student username, they are simply persisted through unchanged rather than being erroneously wiped from the log output files.What steps should a reviewer take to reproduce or test the bug or new feature?
generated_input.txt) with a validgenerated_outputlog line:2026-03-30 12:00:00 | ABC123 | | zip | f24/sample/generated_output/lab1 | wait: 1.000 sec | okpython3 sbin/anonymize_autograding_logs.py file generated_input.txt generated_output.txt XXgenerated_output.txtand confirm that the log entry is properly passed through to the generated file instead of being empty.Automated Testing & Documentation
No new tests required as testing tools are strictly local helper scripts. No documentation requires updating.
Other information
There are no breaking changes or security concerns.