Skip to content

[s3inbox] store uploaded file size in db #1571

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

Merged
merged 7 commits into from
Apr 16, 2025

Conversation

jbygdell
Copy link
Collaborator

@jbygdell jbygdell commented Apr 7, 2025

Related issue(s) and PR(s)

This PR closes #1482 .

This will be kept as a draft until #1543 is merged

Description

This PA adds a function that stores the size of the uploaded file in the database (submission_file_size) upon completed upload. The size of the file is read from the S3 backend.

3 test cases could be generated, 1 positive and 2 negative. The 4th test case (fastCheck) didn't go as planned but will be kept in order to catch any regression.

How to test

@jbygdell jbygdell added the go Pull requests that update Go code label Apr 7, 2025
@jbygdell jbygdell self-assigned this Apr 7, 2025
@jbygdell jbygdell requested a review from a team April 7, 2025 15:17
@jbygdell jbygdell force-pushed the feature/s3inbox-stores-size-in-db branch 2 times, most recently from 11b0659 to ff3cf70 Compare April 8, 2025 06:00
Base automatically changed from feat/send-remove-message-on-overwrite to main April 8, 2025 06:13
@jbygdell jbygdell force-pushed the feature/s3inbox-stores-size-in-db branch from ff3cf70 to d3924ec Compare April 8, 2025 06:14
@jbygdell jbygdell marked this pull request as ready for review April 8, 2025 06:23
@jbygdell jbygdell force-pushed the feature/s3inbox-stores-size-in-db branch 3 times, most recently from ab56a5f to eeef60e Compare April 8, 2025 08:05
@jbygdell jbygdell force-pushed the feature/s3inbox-stores-size-in-db branch from eeef60e to e88d3b0 Compare April 9, 2025 11:34
Copy link
Contributor

@MalinAhlberg MalinAhlberg left a comment

Choose a reason for hiding this comment

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

Looks good!
Only added some questions.

@jbygdell jbygdell force-pushed the feature/s3inbox-stores-size-in-db branch from 84e37c3 to 372caf1 Compare April 11, 2025 09:31
@jbygdell jbygdell force-pushed the feature/s3inbox-stores-size-in-db branch from 372caf1 to 153fa67 Compare April 11, 2025 09:34
Copy link
Contributor

@MalinAhlberg MalinAhlberg left a comment

Choose a reason for hiding this comment

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

Great!

Copy link
Contributor

@nanjiangshu nanjiangshu left a comment

Choose a reason for hiding this comment

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

It worked well during my tests; however, I have two comments for potential improvement.

Copy link
Contributor

@pahatz pahatz left a comment

Choose a reason for hiding this comment

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

Everything seems good, nice tests.

@jbygdell jbygdell added this pull request to the merge queue Apr 16, 2025
Merged via the queue into main with commit ce06f55 Apr 16, 2025
44 of 45 checks passed
@jbygdell jbygdell deleted the feature/s3inbox-stores-size-in-db branch April 16, 2025 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s3inbox should register the submission file size in the db
4 participants