-
Notifications
You must be signed in to change notification settings - Fork 10
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
S3 Service using API instead of .meta file #406
Conversation
score-server/src/main/java/bio/overture/score/server/repository/s3/S3DownloadService.java
Show resolved
Hide resolved
score-server/src/main/java/bio/overture/score/server/repository/s3/S3DownloadService.java
Outdated
Show resolved
Hide resolved
score-server/src/main/java/bio/overture/score/server/repository/s3/S3DownloadService.java
Outdated
Show resolved
Hide resolved
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.
This still uses the length
argument from the function definition, instead of reading this from the S3 API.
+ ")"); | ||
} | ||
} | ||
if (objectSpec != null) { |
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.
This if
is duplicate of the same if from line 126. We don't need both of them.
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.
Have removed both the if
s
score-server/src/main/java/bio/overture/score/server/repository/s3/S3DownloadService.java
Outdated
Show resolved
Hide resolved
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.
All good now! Thanks!
This commit refactors the S3DownloadService to utilize the S3 API directly instead of relying on a separate .meta file for object information.
These changes improve the resilience of the S3 download service by-
Additions to Unit Test Updates in order to validate the new exception handling mechanism. This test case ensures that the service does not fail when the .meta file is missing and that a NullPointerException is appropriately handled.
Overall, this commit modernizes the S3 service by leveraging the S3 API directly.