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

S3 receive filepath #449

Merged
merged 22 commits into from
Sep 4, 2024
Merged

S3 receive filepath #449

merged 22 commits into from
Sep 4, 2024

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Aug 15, 2024

Issue #, if available:

  • Add an API for writing into file directly from CRT
  • The write will still happen from the same thread, sequentially.

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 73.07692% with 14 lines in your changes missing coverage. Please review.

Project coverage is 89.29%. Comparing base (76096ad) to head (a84dcdf).

Files Patch % Lines
source/s3_meta_request.c 73.07% 14 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
- Coverage   89.45%   89.29%   -0.17%     
==========================================
  Files          20       20              
  Lines        6080     6127      +47     
==========================================
+ Hits         5439     5471      +32     
- Misses        641      656      +15     
Files Coverage Δ
source/s3.c 98.46% <ø> (ø)
source/s3_meta_request.c 91.74% <73.07%> (-1.14%) ⬇️

@TingDaoK TingDaoK marked this pull request as ready for review August 19, 2024 16:00
source/s3_meta_request.c Outdated Show resolved Hide resolved
include/aws/s3/s3_client.h Outdated Show resolved Hide resolved
include/aws/s3/s3_client.h Show resolved Hide resolved
include/aws/s3/s3.h Outdated Show resolved Hide resolved
include/aws/s3/s3_client.h Outdated Show resolved Hide resolved
include/aws/s3/s3.h Outdated Show resolved Hide resolved
include/aws/s3/s3_client.h Outdated Show resolved Hide resolved
include/aws/s3/s3_client.h Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3.c Outdated Show resolved Hide resolved
source/s3.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Show resolved Hide resolved
include/aws/s3/s3_client.h Show resolved Hide resolved
fclose(meta_request->recv_file);
meta_request->recv_file = NULL;
if (finish_result.error_code && meta_request->recv_file_delete_on_failure) {
/* Ignore the failure. Attempt to delete */
Copy link
Contributor

Choose a reason for hiding this comment

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

trivial: I was confused by "ignore the failure". I was like "but we ARE paying attention to the failure! It's delete_on_failure, and the operation is failing, so delete!". Maybe you meant that we're ignoring any errors from aws_file_delete()???

Suggested change
/* Ignore the failure. Attempt to delete */

source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
@@ -1781,7 +1843,21 @@ static void s_s3_meta_request_event_delivery_task(struct aws_task *task, void *a
if (meta_request->meta_request_level_running_response_sum) {
aws_checksum_update(meta_request->meta_request_level_running_response_sum, &response_body);
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this isn't part of your PR. But I see 😬 we're not checking aws_checksum_update() for error

Copy link
Contributor

@graebm graebm left a comment

Choose a reason for hiding this comment

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

Fix & ship

@TingDaoK TingDaoK merged commit 502cd62 into main Sep 4, 2024
31 checks passed
@TingDaoK TingDaoK deleted the s3-receive-filepath branch September 4, 2024 16:10
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.

4 participants