-
Notifications
You must be signed in to change notification settings - Fork 141
Use AWS C++ SDK for communicating with S3 #149
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
Draft
sjperkins
wants to merge
69
commits into
google:master
Choose a base branch
from
sjperkins:depend-on-aws-cpp-sdk-for-auth
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
f03e2ff
Include the aws-cpp-sdk in the build
sjperkins a003a76
Remove unnecessarily introduced os-specific includes in aws-c-event-s…
sjperkins c0efd6e
@platforms//os:windows
sjperkins da85486
Remove system.BUILD.bazel
sjperkins 98550fc
build_file formatting
sjperkins 71fd676
Change - to _ in cc_library name field
sjperkins 9672159
#define WIN32_LEAN_AND_MEAN in aws/core/SDKConfig.h
sjperkins 6ffb5c9
Change - to _ in referenced locations
sjperkins de6b273
More @platforms//os:windows
sjperkins 4c1fcfc
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins b80b85d
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins cfcf0d2
Convert patch_cmds to patch file in @com_github_aws_cpp_sdk
sjperkins 5c877d9
Use write_file in com_github_aws_checksums
sjperkins 84cda4a
Generate SDKConfig.h with a write_file
sjperkins a03e45e
Add s3_encryption
sjperkins 278cb8f
Add s3 context
sjperkins 354f700
header cleanup
sjperkins e2eac84
sanity check basic credential retrieval
sjperkins 1e1bd30
Remove AuthSigner cruft from s3_context_test.cc
sjperkins 2a08922
Add NewS3RequestBuilder
sjperkins 0c00783
Update BUILD
sjperkins aac65f2
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 25a7209
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 33a995d
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 2908289
Adapt more AWS classes, improve SDK setup
sjperkins 6d2a933
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 9d9ea8a
Move S3Client code in a separate kvstore/s3_sdk directory
sjperkins 0e3a781
Move AWS SDK Adapter code into anonymous namespace
sjperkins fbcb788
fixups
sjperkins 484d6b0
Add localstack test
sjperkins b843af4
Updates
sjperkins 1408ed7
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 65644fe
Simplify
sjperkins 83893e9
Add Async S3Client test cases
sjperkins edfb694
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins f94f55d
Reomve unnecessary Cord construction
sjperkins c122d4a
Fix closing namespace typo
sjperkins 5106902
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 47def67
Initial CordStreamBuf implementation
sjperkins ce7bdf9
Fix indenting
sjperkins 6eb3c89
comment
sjperkins f885bcc
Header hygiene
sjperkins 9edf7d7
Remove commented out test case
sjperkins d2d7f87
Improve seek from current position case
sjperkins 171393c
Sharpen test cases
sjperkins 259792d
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 430f947
seekoff improvements
sjperkins f849e35
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 24144d3
Prefer defining the CordStreamBuf get area in terms of a Cord chunk
sjperkins b47fe87
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins cafd5fa
typo
sjperkins f8ba211
Fix test cases
sjperkins 4ac69a0
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 16321f4
Touch up CordStreamBuf and integrate into HttpRequest/Response workflow
sjperkins d728a79
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins f156b4d
xsgetn fixes
sjperkins bb2c423
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 85b44d9
MoveCord -> DetachCord, TakeCord -> AssignCord
sjperkins 62397fe
Warn on copies of large Http Request/Response bodies
sjperkins 381a62c
Comment grammar
sjperkins ad453e5
Update logging statements
sjperkins d851a89
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins fe5dd54
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins da0b1b6
workspace whitespace
sjperkins aee0ce7
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 1216c4a
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 16c76c4
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 6b69c72
Merge branch 'master' into depend-on-aws-cpp-sdk-for-auth
sjperkins 3883f04
Update to more recent version of the AWS C, CRT and C++ SDK's
sjperkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
third_party/com_github_aws_c_common/aws_c_common.BUILD.bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Description: | ||
| # AWS C Common | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| licenses(["notice"]) # Apache 2.0 | ||
|
|
||
| exports_files(["LICENSE"]) | ||
|
|
||
| cc_library( | ||
| name = "aws-c-common", | ||
| srcs = glob([ | ||
| "include/aws/common/*.h", | ||
| "include/aws/common/private/*.h", | ||
| "source/*.c", | ||
| ]) + select({ | ||
| "@bazel_tools//src/conditions:windows": glob([ | ||
| "source/windows/*.c", | ||
| ]), | ||
| "//conditions:default": glob([ | ||
| "source/posix/*.c", | ||
| ]), | ||
| }), | ||
| hdrs = [ | ||
| "include/aws/common/config.h", | ||
| ], | ||
| defines = [], | ||
| includes = [ | ||
| "include", | ||
| ], | ||
| textual_hdrs = glob([ | ||
| "include/**/*.inl", | ||
| ]), | ||
| deps = [], | ||
| ) | ||
|
|
||
| genrule( | ||
| name = "config_h", | ||
| srcs = [ | ||
| "include/aws/common/config.h.in", | ||
| ], | ||
| outs = [ | ||
| "include/aws/common/config.h", | ||
| ], | ||
| cmd = "sed 's/cmakedefine/undef/g' $< > $@", | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| cc_library( | ||
|
sjperkins marked this conversation as resolved.
Outdated
|
||
| name = "aws_c_common", | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Copyright 2024 The TensorStore Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| load("//third_party:repo.bzl", "third_party_http_archive") | ||
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
|
||
| def repo(): | ||
| maybe( | ||
| third_party_http_archive, | ||
| name = "com_github_aws_c_common", | ||
| sha256 = "01c2a58553a37b3aa5914d9e0bf7bf14507ff4937bc5872a678892ca20fcae1f", | ||
| strip_prefix = "aws-c-common-0.4.29", | ||
| urls = [ | ||
| "https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-c-common/archive/v0.4.29.tar.gz", | ||
| "https://github.com/awslabs/aws-c-common/archive/v0.4.29.tar.gz", | ||
| ], build_file = Label("//third_party:com_github_aws_c_common/aws_c_common.BUILD.bazel"), | ||
|
sjperkins marked this conversation as resolved.
Outdated
|
||
| system_build_file = Label("//third_party:com_github_aws_c_common/system.BUILD.bazel"), | ||
| cmake_name = "aws_c_common", | ||
| cmake_target_mapping = { | ||
| "@com_github_aws_c_common//:aws_c_common": "aws_c_common::aws_c_common", | ||
| }, | ||
| bazel_to_cmake = {}, | ||
| ) | ||
25 changes: 25 additions & 0 deletions
25
third_party/com_github_aws_c_event_stream/aws_c_event_stream.BUILD.bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Description: | ||
| # AWS C Event Stream | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| licenses(["notice"]) # Apache 2.0 | ||
|
|
||
| exports_files(["LICENSE"]) | ||
|
|
||
| cc_library( | ||
| name = "aws-c-event-stream", | ||
| srcs = glob([ | ||
| "include/**/*.h", | ||
| "source/**/*.c", | ||
| ]), | ||
| hdrs = [], | ||
| defines = [], | ||
| includes = [ | ||
| "include", | ||
| ], | ||
| deps = [ | ||
| "@com_github_aws_c_common//:aws-c-common", | ||
| "@com_github_aws_checksums//:aws-checksums", | ||
| ], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| cc_library( | ||
| name = "aws_c_event_stream", | ||
| visibility = ["//visibility:public"], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Copyright 2024 The TensorStore Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| load("//third_party:repo.bzl", "third_party_http_archive") | ||
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
|
||
| def repo(): | ||
| maybe( | ||
| third_party_http_archive, | ||
| name = "com_github_aws_c_event_stream", | ||
| sha256 = "31d880d1c868d3f3df1e1f4b45e56ac73724a4dc3449d04d47fc0746f6f077b6", | ||
| strip_prefix = "aws-c-event-stream-0.1.4", | ||
| urls = [ | ||
| "https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-c-event-stream/archive/v0.1.4.tar.gz", | ||
| "https://github.com/awslabs/aws-c-event-stream/archive/v0.1.4.tar.gz", | ||
| ], build_file = Label("//third_party:com_github_aws_c_event_stream/aws_c_event_stream.BUILD.bazel"), | ||
| system_build_file = Label("//third_party:com_github_aws_c_event_stream/system.BUILD.bazel"), | ||
| cmake_name = "aws_c_event_stream", | ||
| cmake_target_mapping = { | ||
| "@com_github_aws_c_event_stream//:aws_c_event_stream": "aws_c_event_stream::aws_c_event_stream", | ||
| }, | ||
| bazel_to_cmake = {}, | ||
| ) |
42 changes: 42 additions & 0 deletions
42
third_party/com_github_aws_checksums/aws_checksums.BUILD.bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Description: | ||
| # AWS CheckSums | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| licenses(["notice"]) # Apache 2.0 | ||
|
|
||
| exports_files(["LICENSE"]) | ||
|
|
||
| cc_library( | ||
| name = "aws-checksums", | ||
|
sjperkins marked this conversation as resolved.
Outdated
|
||
| srcs = glob([ | ||
| "include/aws/checksums/*.h", | ||
| "include/aws/checksums/private/*.h", | ||
| "source/*.c", | ||
| ]) + [ | ||
| "crc_hw.c", | ||
| ], | ||
| hdrs = [], | ||
|
sjperkins marked this conversation as resolved.
Outdated
|
||
| defines = [], | ||
| includes = [ | ||
| "include", | ||
| ], | ||
| deps = [], | ||
| ) | ||
|
|
||
| genrule( | ||
| name = "crc_hw_c", | ||
| outs = ["crc_hw.c"], | ||
| cmd = "\n".join([ | ||
| "cat <<'EOF' >$@", | ||
| "#include <aws/checksums/private/cpuid.h>", | ||
| "#include <aws/checksums/private/crc_priv.h>", | ||
| "int aws_checksums_do_cpu_id(int32_t *cpuid) {", | ||
| " return 0;", | ||
| "}", | ||
| "uint32_t aws_checksums_crc32c_hw(const uint8_t *input, int length, uint32_t previousCrc32) {", | ||
| " return aws_checksums_crc32c_sw(input, length, previousCrc32);", | ||
| "}", | ||
| "EOF", | ||
| ]), | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| cc_library( | ||
| name = "aws_checksums", | ||
| visibility = ["//visibility:public"], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Copyright 2024 The TensorStore Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| load("//third_party:repo.bzl", "third_party_http_archive") | ||
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
|
||
| def repo(): | ||
| maybe( | ||
| third_party_http_archive, | ||
| name = "com_github_aws_checksums", | ||
| sha256 = "6e6bed6f75cf54006b6bafb01b3b96df19605572131a2260fddaf0e87949ced0", | ||
| strip_prefix = "aws-checksums-0.1.5", | ||
| urls = [ | ||
| "https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-checksums/archive/v0.1.5.tar.gz", | ||
| "https://github.com/awslabs/aws-checksums/archive/v0.1.5.tar.gz", | ||
| ], | ||
| build_file = Label("//third_party:com_github_aws_checksums/aws_checksums.BUILD.bazel"), | ||
| system_build_file = Label("//third_party:com_github_aws_checksums/system.BUILD.bazel"), | ||
| cmake_name = "aws_checksums", | ||
| cmake_target_mapping = { | ||
| "@com_github_aws_checksums//:aws_checksums": "aws_checksums::aws_checksums", | ||
| }, | ||
| bazel_to_cmake = {}, | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.