Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
29052b3
include open ssl
Tmonster May 14, 2025
180bcb6
attempt to overwrite get
Tmonster May 15, 2025
303c9a7
compiles with curl now
Tmonster May 15, 2025
b8272b1
put head delete post get replaced
Tmonster May 16, 2025
e6c2780
bump duckdb
Tmonster May 16, 2025
2afdc88
remove extension stuff
Tmonster May 16, 2025
be81a80
install curl during build
Tmonster May 16, 2025
fdac277
run on ubuntu-latest
Tmonster May 16, 2025
ef581de
init vcpackage toolchain path
Tmonster May 16, 2025
e7bc7e0
actually add params to end of url for get requests
Tmonster May 16, 2025
b74abc2
get the response error message as well from the http response code he…
Tmonster May 16, 2025
88f96fc
remove all running httplib.hpp code
Tmonster May 16, 2025
04cb2a8
add back in state initialization
Tmonster May 16, 2025
02e8ac1
remove output result
Tmonster May 16, 2025
c92998c
add json read test
Tmonster May 16, 2025
fa93e10
add core extensions var
Tmonster May 16, 2025
499de90
always add headers, and set many more curl options on initialize
Tmonster May 16, 2025
9d8f71e
update extension ci tools
Tmonster May 16, 2025
e0cce43
fix test add comments
Tmonster May 19, 2025
9b90587
declare header object on heap not on stack
Tmonster May 20, 2025
5b3d988
also uniq string
Tmonster May 20, 2025
ccbf00a
some more debugging statements
Tmonster May 20, 2025
de6d606
move a lot of the request response info to the heap so it does not ge…
Tmonster May 20, 2025
0c167fd
this should work on the build now
Tmonster May 20, 2025
5d8d79f
more clean up
Tmonster May 20, 2025
d901fc4
Merge branch 'main' into use_curl_as_client
Tmonster May 20, 2025
0c42015
call curl_global_init, unsure when to call cleanup
Tmonster May 20, 2025
bd44ff2
remove verbose
Tmonster May 20, 2025
3da7bff
reuse many components
Tmonster May 21, 2025
198288e
add test to check response headers
Tmonster May 21, 2025
0f9f749
remove internal exception if certificate authority cannot be set
Tmonster May 21, 2025
73103b1
fix test
Tmonster May 21, 2025
afb0c2a
actually fix test
Tmonster May 21, 2025
4b32d40
remove rogue pragma
Tmonster May 21, 2025
37e253c
Merge branch 'main' into use_curl_as_client
Tmonster May 23, 2025
07a7afa
re-run CI for after release
Tmonster May 26, 2025
db6001f
Merge branch 'main' into use_curl_as_client
Tmonster Jun 17, 2025
3a93b42
update main distribution pipeline
Tmonster Jun 17, 2025
6f07684
Merge remote-tracking branch 'origin/main' into use_curl_as_client
carlopi Jul 3, 2025
95567d3
Have curl and httplib implementation convive side-by-side
carlopi Jul 3, 2025
9a94a7b
Merge branch 'wasm_httputil_on_main' into use_curl_as_client
carlopi Jul 3, 2025
401ff6b
Adapt test
carlopi Jul 3, 2025
2348456
fix tests
Tmonster Jul 15, 2025
dcfb5cc
add more tests, switch up the client implementation
Tmonster Jul 15, 2025
7395db4
Merge remote-tracking branch 'upstream/main' into use_curl_as_optiona…
Tmonster Jul 15, 2025
c15f72d
apply patch
taniabogatsch Jul 24, 2025
d5eaa2a
rebase against main
taniabogatsch Jul 25, 2025
bb03d06
Merge pull request #91 from taniabogatsch/main
carlopi Jul 25, 2025
f951aea
try to fix windows. may require duckdb main fix
Tmonster Aug 12, 2025
6b7d046
Merge remote-tracking branch 'upstream/main' into use_curl_as_optiona…
Tmonster Aug 12, 2025
9faf71a
fix build
Tmonster Aug 12, 2025
b3823a9
Merge remote-tracking branch 'upstream/v1.4-andium' into use_curl_as_…
Tmonster Aug 13, 2025
6295fbf
remove windows requirement
Tmonster Aug 13, 2025
d3faccf
forcing CI again
Tmonster Aug 13, 2025
f3a8e2e
add override to test with httlib with windows fixes
Tmonster Aug 15, 2025
d930fc1
remove unnecesry things
Tmonster Aug 15, 2025
34143d1
update submodule pointer to see if it passes tests
Tmonster Aug 15, 2025
43fcbcd
update submodule again
Tmonster Aug 15, 2025
5ce3275
some changes to the workflow
Tmonster Aug 15, 2025
87f9797
update duckdb ref
Tmonster Aug 15, 2025
6a44033
update ref
Tmonster Aug 15, 2025
8608552
fix the workflow
Tmonster Aug 15, 2025
07dbd11
do not set duckdb to ref of calling worfklow
Tmonster Aug 15, 2025
f77d92c
needs to be my duckdb repo
Tmonster Aug 15, 2025
ab630dc
fix up main distribution pipeline
Tmonster Aug 15, 2025
661c861
use duckdb v1.4
Tmonster Aug 15, 2025
4e5a985
bump duckdb to include build fix
Tmonster Aug 18, 2025
13972ba
if there is no content handler, do not call it
Tmonster Aug 20, 2025
0bb4efa
change expected error message to pass tests
Tmonster Aug 20, 2025
c31f9e9
Merge pull request #96 from Tmonster/use_curl_as_optional_client_v1.4
samansmink Aug 21, 2025
dcac916
Merge remote-tracking branch 'upstream/main' into fix-v1.4-andium
Tmonster Sep 3, 2025
c176007
add CALL enable_profiling
Tmonster Sep 3, 2025
e1dadc6
Merge remote-tracking branch 'upstream/main' into fix-v1.4-andium
Tmonster Sep 3, 2025
c5ad14f
update duckdb submodule pointer as well so we can use 'call enable_lo…
Tmonster Sep 3, 2025
577a55d
Merge pull request #110 from Tmonster/fix-v1.4-andium
samansmink Sep 4, 2025
7e8f90b
bump duckdb submodule
Tmonster Sep 4, 2025
db5ce0f
bump submodule and apply patches
Tmonster Sep 4, 2025
b67d9f9
fix patch errors
Tmonster Sep 4, 2025
7244ef6
Add back in csv test
Tmonster Sep 4, 2025
15cadd9
remove extra paren
Tmonster Sep 4, 2025
d39fd75
Merge pull request #112 from Tmonster/bump_submodule_and_apply_patch
carlopi Sep 4, 2025
86f5fc8
feat: automatic full file download fallback
samansmink Jul 29, 2025
c964766
fix: http 206 not considered success
samansmink Jul 29, 2025
9788dab
fix test
samansmink Sep 5, 2025
9d24bd1
dont send head on writes
samansmink Sep 5, 2025
cb96000
fix another test
samansmink Sep 5, 2025
e12faac
Add enable_curl_server_cert_verification option
carlopi Sep 5, 2025
0065c42
Merge pull request #115 from carlopi/curl_verify
samansmink Sep 7, 2025
c00e1f2
Merge pull request #113 from samansmink/remove-unnecessary-head-request
samansmink Sep 7, 2025
58f15dc
avoid fallback for s3 urls
samansmink Sep 8, 2025
7df8b5c
Merge pull request #92 from samansmink/full-file-download-fallback
samansmink Sep 8, 2025
4135c19
Merge pull request #116 from duckdb/main
samansmink Sep 8, 2025
7bcaf1f
fix: etag checking bug
samansmink Sep 8, 2025
bba3300
Merge pull request #118 from samansmink/fix-etag-issue
samansmink Sep 8, 2025
7ee09f4
Merge pull request #120 from duckdb/main
carlopi Sep 8, 2025
4045a73
Bump duckdb and apply patches
carlopi Sep 11, 2025
b0400ec
Bump also MainDistributionPipeline.yml
carlopi Sep 11, 2025
f6f783b
Merge pull request #121 from carlopi/bump_n_patch
carlopi Sep 11, 2025
ed9ba98
Add also configuration to run duckdb tests with httpfs linked in
carlopi Sep 11, 2025
4019119
Merge pull request #122 from carlopi/extra_tests
Mytherin Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
with:
extension_name: httpfs
duckdb_version: v1.3.2
duckdb_version: v1.4-andium
ci_tools_version: main


Expand All @@ -28,6 +28,6 @@ jobs:
secrets: inherit
with:
extension_name: httpfs
duckdb_version: v1.3.2
duckdb_version: v1.4-andium
ci_tools_version: main
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
15 changes: 14 additions & 1 deletion .github/workflows/MinioTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ jobs:
AWS_SECRET_ACCESS_KEY: minio_duckdb_user_password
DUCKDB_S3_ENDPOINT: duckdb-minio.com:9000
DUCKDB_S3_USE_SSL: false
CORE_EXTENSIONS: 'parquet;json'
GEN: ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: x64-linux
PYTHON_HTTP_SERVER_URL: http://localhost:8008
PYTHON_HTTP_SERVER_DIR: /tmp/python_test_server

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,7 +52,9 @@ jobs:

- name: Build
shell: bash
run: make
run: |
echo -e "\nduckdb_extension_load(tpch)\n" >> extension_config.cmake
make

- name: Start S3/HTTP test server
shell: bash
Expand All @@ -60,6 +66,13 @@ jobs:
source ./scripts/run_s3_test_server.sh
sleep 30

- name: Run & Populate test server
shell: bash
run: |
mkdir -p $PYTHON_HTTP_SERVER_DIR
cd $PYTHON_HTTP_SERVER_DIR
python3 -m http.server 8008 &

- name: Test
shell: bash
run: |
Expand Down
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include_directories(extension/httpfs/include
${DUCKDB_MODULE_BASE_DIR}/third_party/httplib)

if (NOT EMSCRIPTEN)
set(EXTRA_SOURCES extension/httpfs/crypto.cpp extension/httpfs/httpfs_client.cpp)
set(EXTRA_SOURCES extension/httpfs/crypto.cpp extension/httpfs/httpfs_httplib_client.cpp extension/httpfs/httpfs_curl_client.cpp)
add_definitions(-DOVERRIDE_ENCRYPTION_UTILS=1)
else()
set(EXTRA_SOURCES extension/httpfs/httpfs_client_wasm.cpp)
Expand Down Expand Up @@ -48,21 +48,29 @@ if(MINGW)
endif()

find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${CURL_INCLUDE_DIRS})
if(EMSCRIPTEN)
target_link_libraries(httpfs_loadable_extension duckdb_mbedtls)
else()
target_link_libraries(httpfs_loadable_extension duckdb_mbedtls
${OPENSSL_LIBRARIES})
target_link_libraries(httpfs_extension duckdb_mbedtls ${OPENSSL_LIBRARIES})

# Link dependencies into extension
target_link_libraries(httpfs_loadable_extension ${CURL_LIBRARIES})
target_link_libraries(httpfs_extension ${CURL_LIBRARIES})


if(MINGW)
find_package(ZLIB)
target_link_libraries(httpfs_loadable_extension ZLIB::ZLIB -lcrypt32)
target_link_libraries(httpfs_extension ZLIB::ZLIB -lcrypt32)
endif()
endif()


install(
TARGETS httpfs_extension
EXPORT "${DUCKDB_EXPORT_SET}"
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,17 @@ CORE_EXTENSIONS=''

# Include the Makefile from extension-ci-tools
include extension-ci-tools/makefiles/duckdb_extension.Makefile


## Add some more extra tests
test_release_internal:
./build/release/$(TEST_PATH) "$(PROJ_DIR)test/*"
./build/release/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json

test_debug_internal:
./build/debug/$(TEST_PATH) "$(PROJ_DIR)test/*"
./build/debug/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json

test_reldebug_internal:
./build/reldebug/$(TEST_PATH) "$(PROJ_DIR)test/*"
./build/reldebug/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 3333 files
26 changes: 13 additions & 13 deletions extension/httpfs/create_secret_functions.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include "create_secret_functions.hpp"
#include "s3fs.hpp"
#include "duckdb/main/extension_util.hpp"
#include "duckdb/main/extension/extension_loader.hpp"
#include "duckdb/common/local_file_system.hpp"

namespace duckdb {

void CreateS3SecretFunctions::Register(DatabaseInstance &instance) {
RegisterCreateSecretFunction(instance, "s3");
RegisterCreateSecretFunction(instance, "aws");
RegisterCreateSecretFunction(instance, "r2");
RegisterCreateSecretFunction(instance, "gcs");
void CreateS3SecretFunctions::Register(ExtensionLoader &loader) {
RegisterCreateSecretFunction(loader, "s3");
RegisterCreateSecretFunction(loader, "aws");
RegisterCreateSecretFunction(loader, "r2");
RegisterCreateSecretFunction(loader, "gcs");
}

static Value MapToStruct(const Value &map) {
Expand Down Expand Up @@ -220,39 +220,39 @@ void CreateS3SecretFunctions::SetBaseNamedParams(CreateSecretFunction &function,
}
}

void CreateS3SecretFunctions::RegisterCreateSecretFunction(DatabaseInstance &instance, string type) {
void CreateS3SecretFunctions::RegisterCreateSecretFunction(ExtensionLoader &loader, string type) {
// Register the new type
SecretType secret_type;
secret_type.name = type;
secret_type.deserializer = KeyValueSecret::Deserialize<KeyValueSecret>;
secret_type.default_provider = "config";
secret_type.extension = "httpfs";

ExtensionUtil::RegisterSecretType(instance, secret_type);
loader.RegisterSecretType(secret_type);

CreateSecretFunction from_empty_config_fun2 = {type, "config", CreateS3SecretFromConfig};
SetBaseNamedParams(from_empty_config_fun2, type);
ExtensionUtil::RegisterFunction(instance, from_empty_config_fun2);
loader.RegisterFunction(from_empty_config_fun2);
}

void CreateBearerTokenFunctions::Register(DatabaseInstance &instance) {
void CreateBearerTokenFunctions::Register(ExtensionLoader &loader) {
// HuggingFace secret
SecretType secret_type_hf;
secret_type_hf.name = HUGGINGFACE_TYPE;
secret_type_hf.deserializer = KeyValueSecret::Deserialize<KeyValueSecret>;
secret_type_hf.default_provider = "config";
secret_type_hf.extension = "httpfs";
ExtensionUtil::RegisterSecretType(instance, secret_type_hf);
loader.RegisterSecretType(secret_type_hf);

// Huggingface config provider
CreateSecretFunction hf_config_fun = {HUGGINGFACE_TYPE, "config", CreateBearerSecretFromConfig};
hf_config_fun.named_parameters["token"] = LogicalType::VARCHAR;
ExtensionUtil::RegisterFunction(instance, hf_config_fun);
loader.RegisterFunction(hf_config_fun);

// Huggingface credential_chain provider
CreateSecretFunction hf_cred_fun = {HUGGINGFACE_TYPE, "credential_chain",
CreateHuggingFaceSecretFromCredentialChain};
ExtensionUtil::RegisterFunction(instance, hf_cred_fun);
loader.RegisterFunction(hf_cred_fun);
}

unique_ptr<BaseSecret> CreateBearerTokenFunctions::CreateSecretFunctionInternal(ClientContext &context,
Expand Down
Loading
Loading