Skip to content

[Bugfix:Autograding] Keep generated_output logs#12747

Merged
bmcutler merged 6 commits into
Submitty:mainfrom
robu9:fix-anonymize-generated-output
Apr 28, 2026
Merged

[Bugfix:Autograding] Keep generated_output logs#12747
bmcutler merged 6 commits into
Submitty:mainfrom
robu9:fix-anonymize-generated-output

Conversation

@robu9

@robu9 robu9 commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Fixes #12690

When running sbin/anonymize_autograding_logs.py, the script only handled logs with 6 path components (like term/course/submissions/gradeable/user/version). Jobs for generated_output such as term/course/generated_output/gradeable only 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_output job 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?

  1. Create a test file (generated_input.txt) with a valid generated_output log line:
    2026-03-30 12:00:00 | ABC123 | | zip | f24/sample/generated_output/lab1 | wait: 1.000 sec | ok
  2. Run the anonymizer script on the test file:
    python3 sbin/anonymize_autograding_logs.py file generated_input.txt generated_output.txt XX
  3. Inspect generated_output.txt and 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.

@codecov

codecov Bot commented Apr 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.56%. Comparing base (224fea2) to head (ec44418).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.02% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.60% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

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.

@roye2
roye2 self-requested a review April 21, 2026 18:41
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Apr 21, 2026

@roye2 roye2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 :)

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Apr 21, 2026
@bmcutler
bmcutler merged commit a79f7f8 into Submitty:main Apr 28, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Apr 28, 2026
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.

Autograding log anonymizer drops generated_output entries

3 participants