feat: S3Client Cleanup and Error Handling Improvements#1149
Conversation
There was a problem hiding this comment.
Just some general questions. I have generally added some cleanup, a couple of new methods. I have tested with AWS S3, it is all working properly. GCP to follow. Collecting early feedback. Going back and forth on how to utilize the checked exceptions to do some error handling. Opted to remove the xml handler as it was causing issues: we cannot rely on the "Content-Length" header to determine if there is a body. Also the handler is not flexible enough for our needs, there are some requests that have no body if successful, but will have an xml body if the request fails (3xx+ response), and the handler will throw if no body or no xml body.
PLEASE NOTE: I have not yet gotten to testing the plugin itself. I have tested the client only. I will test the plugin itself as well, but will have to update with results. Also, more tests are to be added, have not gotten to that as well as of now.
block-node/base/src/main/java/org/hiero/block/node/base/s3/S3ClientException.java
Show resolved
Hide resolved
block-node/base/src/main/java/org/hiero/block/node/base/s3/S3ResponseException.java
Show resolved
Hide resolved
block-node/base/src/main/java/org/hiero/block/node/base/s3/S3Client.java
Outdated
Show resolved
Hide resolved
block-node/base/src/main/java/org/hiero/block/node/base/s3/S3Client.java
Show resolved
Hide resolved
block-node/base/src/main/java/org/hiero/block/node/base/s3/S3Client.java
Outdated
Show resolved
Hide resolved
S3Client Cleanup and Error Handling Improvements
georgi-l95
left a comment
There was a problem hiding this comment.
Did one round, will do another when tests are added. Solid progress 🙌
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com> # Conflicts: # block-node/app/build.gradle.kts # settings.gradle.kts
2bf9425 to
f21f162
Compare
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
block-node/base/src/main/java/org/hiero/block/node/base/s3/S3ResponseException.java
Show resolved
Hide resolved
block-node/s3-archive/src/main/java/org/hiero/block/node/archive/s3/S3ArchivePlugin.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
block-node/s3-archive/src/main/java/org/hiero/block/node/archive/s3/S3ArchivePlugin.java
Show resolved
Hide resolved
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
…ecked exception Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
|
UPDATE:
See the parent of the issue this PR closes (#1105) for other related issues that describe what needs to be done as a follow up. |
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## main #1149 +/- ##
============================================
- Coverage 84.26% 82.11% -2.16%
- Complexity 915 917 +2
============================================
Files 105 107 +2
Lines 3743 3986 +243
Branches 413 427 +14
============================================
+ Hits 3154 3273 +119
- Misses 422 539 +117
- Partials 167 174 +7
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Reviewer Notes
Content-Lenghtheader to determine if there is a body or not unfortunately. It is not consistent.Related Issue(s)
Closes #1118
Closes #1074