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: use boto3 #185

Merged
merged 1 commit into from
Apr 29, 2024
Merged

fix: use boto3 #185

merged 1 commit into from
Apr 29, 2024

Conversation

lchen-2101
Copy link
Collaborator

closes #184

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/sbl_filing_api/services
  submission_processor.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Contributor

@jcadam14 jcadam14 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, just added that one comment for consideration.

period_code,
file_identifier,
r,
)
except Exception as e:
raise RegTechHttpException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR, name="Upload Failure", detail="Failed to upload file"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this needs to be done here, but just realized it's a little weird throwing an HttpException here when for one of the uploads, it's done outside of an http request handler. It eventually gets caught as a general Exception and logged, but something to consider for naming purposes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, this one is a bit weird, part of it does come from the request, i.e. uploading the submission file; then the report file gets uploaded outside of the request context; we can dig into how to present this better later, but for now think it's fine, since the fastapi exception handler would deal with the actual http exception, and the validation process has a try catch to deal with it.

@lchen-2101 lchen-2101 merged commit 5fb227d into main Apr 29, 2024
3 checks passed
@lchen-2101 lchen-2101 deleted the fix/184_use_boto3 branch April 29, 2024 17:37
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.

[BUG] Switch fsspec / s3fs to boto3
2 participants