-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added upload file funcitonality #22
Conversation
The purpose of this ticket was to research and get familiarized with uploading to S3. This PR includes the function to upload to s3, but it is not directly linked to S3. I am using "moto" library to mock s3 for testing. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
f.write(content) | ||
except Exception as e: | ||
log.error("Failed to upload file", e, exc_info=True, stack_info=True) | ||
raise HTTPException(status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail="Failed to upload file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the SubmissionDAO is getting created prior to this possible exception, what would happen to that object? Should we remove it from the database, or set a state on it? Originally the SUBMISSION_UPLOADED was going to be set after saving to S3, but since the object will be created before it now, would it just stay in that state and from that we can infer something bad happened (because it didn't move to VALIDATION_IN_PROGRESS)? This is for #52 really, but wanted to get thoughts so that story is implemented correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll be setting a state on it; so it's an additional one of upload failed, which I don't think we have yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
closes #4