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: FORMS-1138 temp route to move uploads files #1523

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

WalterMoar
Copy link
Collaborator

@WalterMoar WalterMoar commented Oct 22, 2024

Description

Note: This is a temporary route that will be reverted once the file locations have all been corrected.

The bug FORMS-1017 was causing some (most) file uploads for draft submissions to not be moved to the submissions directory in the object storage. The task FORMS-1076 took care of setting the file_storage.formSubmissionId, so that API calls could correctly authorize access to the files. However, the files in the object storage should be in the submissions directory, not the uploads directory. We need to move these files so that:

  • We don’t accidentally delete files that look like abandoned uploads, when they are in fact very important submissions files
  • We don’t have a special case in the data - special cases cause confusion when working with the data

There are 17,003 of these files that need to be moved.

Type of Change

fix (a bug fix)

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

A bug left uploaded files in the "uploads" directory in the object storage, when they should have been moved to the "submissions" directory. This temporary route will move the files for a given submission ID.
Added the "main" setting with a value of "app.js" to the package.json. This is to hopefully influence the CodeQL static checks to recognize the rate limiter applied to all API routes.
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.

1 participant