Skip to content

Commit dc0d813

Browse files
authored
Fix s3 https connection on windows (#2182)
#### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> https://man312219.monday.com/boards/7852509418/pulses/8485223765 #### What does this implement or fix? 1. Change s3 persistence test endpoint to `https` 2. Patch aws sdk on pypi build as temporary fix for aws/aws-sdk-cpp#3008 3. Upgrade aws sdk to the version specified in `vcpkg.json` For conda, patch will be submitted upstream ## Change Type (Required) - [x] **Patch** (Bug fix or non-breaking improvement) - [ ] **Minor** (New feature, but backward compatible) - [ ] **Major** (Breaking changes) - [ ] **Cherry pick** #### Any other comments? #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing -->
1 parent 1e00cfc commit dc0d813

File tree

7 files changed

+1391
-1279
lines changed

7 files changed

+1391
-1279
lines changed

.github/actions/set_persistent_storage_env_vars/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'Set Persistent storages env variables'
22
description: 'Set the necessary variables for Persistent storage tests'
33
inputs:
44
bucket: {default: 'arcticdb-ci-test-bucket-02', type: string, description: The name of the S3 bucket that we will test against}
5-
endpoint: {default: 'http://s3.eu-west-1.amazonaws.com', type: string, description: The address of the S3 endpoint}
5+
endpoint: {default: 'https://s3.eu-west-1.amazonaws.com', type: string, description: The address of the S3 endpoint}
66
region: {default: 'eu-west-1', type: string, description: The S3 region of the bucket}
77
aws_access_key: {required: true, type: string, description: The value for the AWS Access key}
88
aws_secret_key: {required: true, type: string, description: The value for the AWS Secret key}

.github/actions/set_s3_sts_persistent_storage_env_vars/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'Set Persistent storages env variables'
22
description: 'Set the necessary variables for Persistent storage tests'
33
inputs:
44
bucket: {default: 'arcticdb-ci-test-bucket-02', type: string, description: The name of the S3 bucket that we will test against}
5-
endpoint: {default: 'http://s3.eu-west-1.amazonaws.com', type: string, description: The address of the S3 endpoint}
5+
endpoint: {default: 'https://s3.eu-west-1.amazonaws.com', type: string, description: The address of the S3 endpoint}
66
region: {default: 'eu-west-1', type: string, description: The S3 region of the bucket}
77
aws_access_key: {required: true, type: string, description: The value for the AWS Access key}
88
aws_secret_key: {required: true, type: string, description: The value for the AWS Secret key}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
2+
index 9c82caa6811..2d91cc0da32 100644
3+
--- a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
4+
+++ b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
5+
@@ -533,7 +533,7 @@ void* WinHttpSyncHttpClient::OpenRequest(const std::shared_ptr<HttpRequest>& req
6+
{
7+
LPCWSTR accept[2] = { nullptr, nullptr };
8+
9+
- DWORD requestFlags = request->GetUri().GetScheme() == Scheme::HTTPS && m_verifySSL ? WINHTTP_FLAG_SECURE : 0;
10+
+ DWORD requestFlags = request->GetUri().GetScheme() == Scheme::HTTPS ? WINHTTP_FLAG_SECURE : 0;
11+
if (m_usingProxy) {
12+
// Avoid force adding "Cache-Control: no-cache" header.
13+
requestFlags |= WINHTTP_FLAG_REFRESH;

cpp/third_party/vcpkg_overlays/aws-sdk-cpp/portfile.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ vcpkg_from_github(
44
OUT_SOURCE_PATH SOURCE_PATH
55
REPO aws/aws-sdk-cpp
66
REF "${VERSION}"
7-
SHA512 8c138dfde232b364016cdfbaf13568efa330040894d1dbd648e48204828634812d95741eebe0a2795f2b08ba9edf85621aa962a8f4f696aae6930e6e1fd8dede
7+
SHA512 f81b0afd9c3bb6e8181c6edc04de9b83af8a17e5bdf993e68fc00abc07980fadbe9e6b98635632cb96ed62c9b2753771f9cf6d91088d6ab42f409eec5d136faa
88
PATCHES
99
fix-aws-root.patch
1010
lock-curl-http-and-tls-settings.patch
1111
fix_find_curl.patch
1212
find-dependency.patch
1313
fix-refresh.patch
14+
fix-win-https-conn.patch
1415
)
1516

1617
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT)

cpp/third_party/vcpkg_overlays/aws-sdk-cpp/vcpkg.in.json

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "aws-sdk-cpp",
3+
"version": "1.11.474",
4+
"description": "AWS SDK for C++",
5+
"homepage": "https://github.com/aws/aws-sdk-cpp",
6+
"license": "Apache-2.0",
7+
"dependencies": [
8+
"aws-crt-cpp",
9+
{
10+
"name": "curl",
11+
"default-features": false,
12+
"features": [
13+
"ssl"
14+
],
15+
"platform": "!uwp & !windows"
16+
},
17+
{
18+
"name": "openssl",
19+
"platform": "!uwp & !windows"
20+
},
21+
{
22+
"name": "vcpkg-cmake",
23+
"host": true
24+
},
25+
{
26+
"name": "vcpkg-cmake-config",
27+
"host": true
28+
},
29+
"zlib"
30+
],
31+
"default-features": [
32+
"dynamodb",
33+
"kinesis",
34+
"s3"
35+
]
36+
}
37+

0 commit comments

Comments
 (0)