Skip to content

Conversation

@jasonchung1871
Copy link
Contributor

@jasonchung1871 jasonchung1871 commented Nov 20, 2025

Description

Refactored moveSubmissionFile to use a transaction, ensuring the file's DB update and move are atomic. The original file is deleted only after a successful commit, and errors during deletion are logged but do not fail the operation. Updated related service and tests to reflect new error handling and atomicity.

https://citz-do.atlassian.net/browse/CCP-2917

Type of Change

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have run the npm script lint on the frontend and backend
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have approval from the product owner for the contribution in this pull request

Further comments

Refactored moveSubmissionFile to use a transaction, ensuring the file's DB update and move are atomic. The original file is deleted only after a successful commit, and errors during deletion are logged but do not fail the operation. Updated related service and tests to reflect new error handling and atomicity.
@sonarqubecloud
Copy link

@jasonchung1871
Copy link
Contributor Author

This PR #1791 was recently pushed through which allows for files that are not in the correct location to be checked against the fallback location. This doesn't resolve the issue yet as we don't know what's causing them to be placed in the wrong location. This is still a necessary PR towards determining the cause of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant