Skip to content

Commit 6f7c73f

Browse files
authored
Merge pull request #135 from Mytherin/merge
Merge v.14 into main
2 parents 0989823 + bac4294 commit 6f7c73f

File tree

154 files changed

+7819
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+7819
-240
lines changed
Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Minio Tests
1+
name: Integration Tests
22
on: [push, pull_request,repository_dispatch]
33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
@@ -8,17 +8,19 @@ defaults:
88
shell: bash
99

1010
jobs:
11-
minio-tests:
12-
name: Minio Tests
13-
runs-on: ubuntu-24.04
11+
linux-tests-httpfs:
12+
name: MinIO Tests
13+
runs-on: ubuntu-latest
1414
env:
1515
S3_TEST_SERVER_AVAILABLE: 1
1616
AWS_DEFAULT_REGION: eu-west-1
1717
AWS_ACCESS_KEY_ID: minio_duckdb_user
1818
AWS_SECRET_ACCESS_KEY: minio_duckdb_user_password
1919
DUCKDB_S3_ENDPOINT: duckdb-minio.com:9000
2020
DUCKDB_S3_USE_SSL: false
21-
CORE_EXTENSIONS: 'parquet;json'
21+
HTTP_PROXY_PUBLIC: localhost:3128
22+
TEST_PERSISTENT_SECRETS_AVAILABLE: true
23+
CORE_EXTENSIONS: "parquet;json;tpch"
2224
GEN: ninja
2325
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
2426
VCPKG_TARGET_TRIPLET: x64-linux
@@ -43,37 +45,44 @@ jobs:
4345
uses: hendrikmuhs/ccache-action@main
4446
with:
4547
key: ${{ github.job }}
46-
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb' }}
48+
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-httpfs' }}
4749

4850
- name: Setup vcpkg
4951
uses: lukka/[email protected]
5052
with:
5153
vcpkgGitCommitId: 5e5d0e1cd7785623065e77eff011afdeec1a3574
5254

53-
- name: Build
55+
- name: Fix permissions of test secrets
5456
shell: bash
55-
run: |
56-
echo -e "\nduckdb_extension_load(tpch)\n" >> extension_config.cmake
57-
make
57+
run: chmod -R 700 data/secrets
5858

59-
- name: Start S3/HTTP test server
59+
# TODO: fix the authenticated proxy here
60+
- name: Install and run http proxy squid
6061
shell: bash
6162
run: |
62-
cd duckdb
63-
mkdir data/attach_test
64-
touch data/attach_test/attach.db
65-
sudo ./scripts/install_s3_test_server.sh
66-
source ./scripts/run_s3_test_server.sh
67-
sleep 30
63+
sudo apt-get install squid
64+
./scripts/run_squid.sh --port 3128 --log_dir squid_logs &
6865
69-
- name: Run & Populate test server
66+
- name: Run & Populate Python test server
7067
shell: bash
7168
run: |
7269
mkdir -p $PYTHON_HTTP_SERVER_DIR
7370
cd $PYTHON_HTTP_SERVER_DIR
7471
python3 -m http.server 8008 &
7572
76-
- name: Test
73+
- name: Build
74+
shell: bash
75+
run: make
76+
77+
- name: Install test server
78+
shell: bash
79+
run: |
80+
sudo ./scripts/install_s3_test_server.sh
81+
./scripts/generate_presigned_url.sh
82+
83+
- name: Start test server & run tests
7784
shell: bash
7885
run: |
79-
make test
86+
source ./scripts/run_s3_test_server.sh
87+
source ./scripts/set_s3_test_server_variables.sh
88+
make test

.github/workflows/MainDistributionPipeline.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
1818
with:
1919
extension_name: httpfs
20-
duckdb_version: v1.4-andium
20+
duckdb_version: v1.4.0
2121
ci_tools_version: main
2222

2323

@@ -28,6 +28,7 @@ jobs:
2828
secrets: inherit
2929
with:
3030
extension_name: httpfs
31-
duckdb_version: v1.4-andium
31+
duckdb_version: v1.4.0
3232
ci_tools_version: main
33-
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
33+
deploy_latest: ${{ startsWith(github.ref, 'refs/heads/v') }}
34+
deploy_versioned: ${{ startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/main' }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,4 @@ extension_external
355355

356356
test/sql/pragma/output.json
357357
tools/pythonpkg/duckdb_build/
358+
test/test_data

CMakeLists.txt

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,15 @@
11
cmake_minimum_required(VERSION 2.8.12...3.29)
22

3-
set(HTTPFS_BASE_FOLDER "extension/httpfs")
4-
53
project(HTTPFsExtension)
64

75
add_extension_definitions()
86

9-
include_directories(extension/httpfs/include
10-
${DUCKDB_MODULE_BASE_DIR}/third_party/httplib)
11-
127
if (NOT EMSCRIPTEN)
13-
set(EXTRA_SOURCES extension/httpfs/crypto.cpp extension/httpfs/httpfs_httplib_client.cpp extension/httpfs/httpfs_curl_client.cpp)
148
add_definitions(-DOVERRIDE_ENCRYPTION_UTILS=1)
159
else()
16-
set(EXTRA_SOURCES extension/httpfs/httpfs_client_wasm.cpp)
17-
set (DUCKDB_EXTENSION_HTTPFS_LINKED_LIBS "../../third_party/mbedtls/libduckdb_mbedtls.a")
10+
set(DUCKDB_EXTENSION_HTTPFS_LINKED_LIBS "../../third_party/mbedtls/libduckdb_mbedtls.a")
1811
endif()
1912

20-
build_static_extension(
21-
httpfs
22-
extension/httpfs/hffs.cpp
23-
extension/httpfs/s3fs.cpp
24-
extension/httpfs/httpfs.cpp
25-
extension/httpfs/http_state.cpp
26-
extension/httpfs/crypto.cpp
27-
extension/httpfs/hash_functions.cpp
28-
extension/httpfs/create_secret_functions.cpp
29-
extension/httpfs/httpfs_extension.cpp
30-
${EXTRA_SOURCES} )
31-
32-
set(PARAMETERS "-warnings")
33-
build_loadable_extension(
34-
httpfs
35-
${PARAMETERS}
36-
extension/httpfs/hffs.cpp
37-
extension/httpfs/s3fs.cpp
38-
extension/httpfs/httpfs.cpp
39-
extension/httpfs/http_state.cpp
40-
extension/httpfs/crypto.cpp
41-
extension/httpfs/hash_functions.cpp
42-
extension/httpfs/create_secret_functions.cpp
43-
extension/httpfs/httpfs_extension.cpp
44-
${EXTRA_SOURCES} )
45-
4613
if(MINGW)
4714
set(OPENSSL_USE_STATIC_LIBS TRUE)
4815
endif()
@@ -51,6 +18,17 @@ find_package(OpenSSL REQUIRED)
5118
find_package(CURL REQUIRED)
5219
include_directories(${OPENSSL_INCLUDE_DIR})
5320
include_directories(${CURL_INCLUDE_DIRS})
21+
22+
include_directories(src/include
23+
${DUCKDB_MODULE_BASE_DIR}/third_party/httplib)
24+
add_subdirectory(src)
25+
set(EXTENSION_SOURCES ${ALL_OBJECT_FILES})
26+
27+
build_static_extension(httpfs ${EXTENSION_SOURCES})
28+
29+
set(PARAMETERS "-warnings")
30+
build_loadable_extension(httpfs ${PARAMETERS} ${EXTENSION_SOURCES})
31+
5432
if(EMSCRIPTEN)
5533
target_link_libraries(httpfs_loadable_extension duckdb_mbedtls)
5634
else()

Makefile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,5 @@ PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
44
EXT_NAME=httpfs
55
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
66

7-
CORE_EXTENSIONS=''
8-
97
# Include the Makefile from extension-ci-tools
108
include extension-ci-tools/makefiles/duckdb_extension.Makefile
11-
12-
13-
## Add some more extra tests
14-
test_release_internal:
15-
./build/release/$(TEST_PATH) "$(PROJ_DIR)test/*"
16-
./build/release/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json
17-
18-
test_debug_internal:
19-
./build/debug/$(TEST_PATH) "$(PROJ_DIR)test/*"
20-
./build/debug/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json
21-
22-
test_reldebug_internal:
23-
./build/reldebug/$(TEST_PATH) "$(PROJ_DIR)test/*"
24-
./build/reldebug/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json

data/secrets/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Test secrets
2+
DuckDB only allows persistent secrets with the x00 permission (e.g. 600 or 700). Therefore to use these
3+
secrets, the permissions need to be set before running any tests that uses them.
4+
5+
The recommended way to add tests that touch these persistent secret files is to put them behind a
6+
```shell
7+
require-env TEST_PERSISTENT_SECRETS_AVAILABLE
8+
```
9+
statement, which ensures the tests only run in CI jobs where the permissions are set correctly.
10+
435 Bytes
Binary file not shown.
435 Bytes
Binary file not shown.
1.05 KB
Binary file not shown.
561 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)