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

Fix SubmissionRunner ignoring errors while removing temporary directory with judge results #5429

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

rien
Copy link
Member

@rien rien commented Mar 11, 2024

This pull request removes the non-existing argument verbose: true from the FileUtils.remove_entry_secure method, as it causes this method to silently ignore errors.

The method FileUtils#remove_entry_secure has the following signature:

def remove_entry_secure(path, force = false)

The verbose: true argument is actually translated to a hash, causing the parameter force to be truthy. Any errors thrown while removing the unwanted files, are ignored because of the last line of the method:

  raise unless force

This was hiding errors in Dolos because of this bug (see the first two commits in: dodona-edu/dolos#1413).

@rien rien requested a review from a team as a code owner March 11, 2024 14:45
@rien rien requested review from niknetniko and jorg-vr and removed request for a team March 11, 2024 14:45
@rien rien changed the title Fix SubmissionRunner ignoring errors whith removing temporary directory with judge results Fix SubmissionRunner ignoring errors while removing temporary directory with judge results Mar 11, 2024
@rien rien merged commit 4d2f623 into main Mar 11, 2024
13 checks passed
@rien rien deleted the fix/safe_remove_hiding_errors branch March 11, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants