Skip to content

Commit b29d997

Browse files
Merge branch 'main' into nmh/add-undelete-rfc
2 parents 5b57a45 + f12c891 commit b29d997

File tree

1,974 files changed

+156875
-127560
lines changed

Some content is hidden

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

1,974 files changed

+156875
-127560
lines changed

.asf.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ github:
3232
squash: true
3333
merge: false
3434
rebase: false
35+
pull_requests:
36+
allow_auto_merge: true
37+
allow_update_branch: true
38+
del_branch_on_merge: true
3539
protected_branches:
3640
main:
3741
required_pull_request_reviews:

.devcontainer/post_create.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,9 @@ sudo apt install -y ninja-build
7272

7373
# Setup for D binding
7474
sudo apt install -y dmd dub
75+
76+
# Setup just for development tasks
77+
cargo install just
78+
79+
# Setup uv for python project management
80+
curl -LsSf https://astral.sh/uv/install.sh | sh

.env.example

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ OPENDAL_WEBHDFS_DISABLE_LIST_BATCH=false
8888
OPENDAL_VERCEL_ARTIFACTS_ACCESS_TOKEN=<token>
8989
# onedrive
9090
OPENDAL_ONEDRIVE_ACCESS_TOKEN=<access_token>
91-
# atomicserver
92-
OPENDAL_ATOMICSERVER_ROOT=/path/to/dir
93-
OPENDAL_ATOMICSERVER_ENDPOINT=http://localhost:9883
94-
OPENDAL_ATOMICSERVER_PRIVATE_KEY=<private_key>
95-
OPENDAL_ATOMICSERVER_PUBLIC_KEY=<public_key>
96-
OPENDAL_ATOMICSERVER_PARENT_RESOURCE_ID=http://localhost:9883
9791
# foundationdb
9892
OPENDAL_FOUNDATIONDB_ROOT=/path/to/dir
9993
OPENDAL_FOUNDATIONDB_CONFIG_PATH=/tmp/opendal/foundationdb.conf
@@ -192,13 +186,6 @@ OPENDAL_KOOFR_ROOT=/path/to/dir
192186
OPENDAL_KOOFR_ENDPOINT=<endpoint>
193187
OPENDAL_KOOFR_EMAIL=<email>
194188
OPENDAL_KOOFR_PASSWORD=<password>
195-
# icloud
196-
OPENDAL_ICLOUD_ROOT=/
197-
OPENDAL_ICLOUD_APPLE_ID=<apple_id>
198-
OPENDAL_ICLOUD_PASSWORD=<password>
199-
OPENDAL_ICLOUD_TRUST_TOKEN=<trust_token>
200-
OPENDAL_ICLOUD_DS_WEB_AUTH_TOKEN=<ds_web_auth_token>
201-
OPENDAL_ICLOUD_IS_CHINA_MAINLAND=true
202189
# vercel blob
203190
OPENDAL_VERCEL_BLOB_ROOT=/path/to/dir
204191
OPENDAL_VERCEL_BLOB_TOKEN=<token>
@@ -207,3 +194,8 @@ OPENDAL_ALIYUN_DRIVE_ROOT=/path/to/dir
207194
OPENDAL_ALIYUN_DRIVE_REFRESH_TOKEN=<refresh_token>
208195
OPENDAL_ALIYUN_DRIVE_CLIENT_ID=<client_id>
209196
OPENDAL_ALIYUN_DRIVE_CLIENT_SECRET=<client_secret>
197+
# cloudflare
198+
OPENDAL_CLOUDFLARE_KV_ROOT=/path/to/dir
199+
OPENDAL_CLOUDFLARE_KV_API_TOKEN=<api_token>
200+
OPENDAL_CLOUDFLARE_KV_ACCOUNT_ID=<account_id>
201+
OPENDAL_CLOUDFLARE_KV_NAMESPACE_ID=<namespace_id>

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* @Xuanwo
1+
* @Xuanwo @tisonkun
22

33
/core @Xuanwo
44
/bindings/c/ @xyjixyjixyji

.github/actions/fuzz_test/action.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ inputs:
2424
description: "The service to test"
2525
target:
2626
description: "The fuzz target to test"
27+
toolchain:
28+
description: "The rust toolchain to use"
2729

2830
runs:
2931
using: "composite"
@@ -41,7 +43,7 @@ runs:
4143
- name: Run Fuzz Test
4244
shell: bash
4345
working-directory: core/fuzz
44-
run: cargo +nightly-2024-11-22 fuzz run ${{ inputs.target }} --features services-${{ inputs.service }} -- -max_total_time=120
46+
run: cargo +${{ inputs.toolchain }} fuzz run ${{ inputs.target }} --features services-${{ inputs.service }} -- -max_total_time=120
4547
env:
4648
OPENDAL_TEST: ${{ inputs.service }}
4749
EOF

.github/actions/setup-ocaml/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ runs:
3232
ocaml-compiler: 4.14
3333
opam-depext: ${{inputs.need-depext == true}}
3434
opam-pin: ${{inputs.need-pin == true}}
35+
dune-cache: true
3536

3637
- name: Set Opam env
3738
shell: bash

.github/actions/setup/action.yaml

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
name: Setup Rust Builder
19-
description: 'Prepare Rust Build Environment'
19+
description: "Prepare Rust Build Environment"
2020
inputs:
2121
need-rocksdb:
2222
description: "This setup needs rocksdb or not"
@@ -59,10 +59,83 @@ runs:
5959

6060
- name: Setup Protoc
6161
if: inputs.need-protoc == 'true'
62-
uses: arduino/setup-protoc@v3
62+
shell: bash
63+
run: |
64+
set -euo pipefail
65+
66+
PROTOC_VERSION="23.4"
67+
PROTOC_ROOT="${RUNNER_TEMP}/protoc/${PROTOC_VERSION}"
68+
69+
case "${RUNNER_OS}-${RUNNER_ARCH}" in
70+
Linux-X64)
71+
PROTOC_PLATFORM="linux-x86_64"
72+
;;
73+
Linux-ARM64)
74+
PROTOC_PLATFORM="linux-aarch_64"
75+
;;
76+
macOS-X64)
77+
PROTOC_PLATFORM="osx-x86_64"
78+
;;
79+
macOS-ARM64)
80+
PROTOC_PLATFORM="osx-aarch_64"
81+
;;
82+
Windows-X64)
83+
PROTOC_PLATFORM="win64"
84+
;;
85+
*)
86+
echo "Unsupported runner: ${RUNNER_OS}-${RUNNER_ARCH}" >&2
87+
exit 1
88+
;;
89+
esac
90+
91+
echo "PROTOC_VERSION=${PROTOC_VERSION}" >> "${GITHUB_ENV}"
92+
echo "PROTOC_ROOT=${PROTOC_ROOT}" >> "${GITHUB_ENV}"
93+
echo "PROTOC_PLATFORM=${PROTOC_PLATFORM}" >> "${GITHUB_ENV}"
94+
95+
- name: Cache Protoc
96+
if: inputs.need-protoc == 'true'
97+
id: cache-protoc
98+
uses: actions/cache@v4
6399
with:
64-
version: "23.4"
65-
repo-token: ${{ inputs.github-token }}
100+
path: ${{ runner.temp }}/protoc/${{ env.PROTOC_VERSION }}
101+
key: protoc-${{ env.PROTOC_VERSION }}-${{ runner.os }}-${{ runner.arch }}
102+
103+
- name: Install Protoc (Unix)
104+
if: inputs.need-protoc == 'true' && runner.os != 'Windows' && steps.cache-protoc.outputs.cache-hit != 'true'
105+
shell: bash
106+
run: |
107+
set -euo pipefail
108+
109+
PROTOC_ZIP="protoc-${PROTOC_VERSION}-${PROTOC_PLATFORM}.zip"
110+
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"
111+
112+
mkdir -p "${PROTOC_ROOT}"
113+
curl -fsSL -o "${RUNNER_TEMP}/${PROTOC_ZIP}" "${PROTOC_URL}"
114+
unzip -q "${RUNNER_TEMP}/${PROTOC_ZIP}" -d "${PROTOC_ROOT}"
115+
116+
- name: Install Protoc (Windows)
117+
if: inputs.need-protoc == 'true' && runner.os == 'Windows' && steps.cache-protoc.outputs.cache-hit != 'true'
118+
shell: pwsh
119+
run: |
120+
$ErrorActionPreference = 'Stop'
121+
122+
$protocZip = "protoc-$env:PROTOC_VERSION-$env:PROTOC_PLATFORM.zip"
123+
$protocUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v$env:PROTOC_VERSION/$protocZip"
124+
$zipPath = Join-Path $env:RUNNER_TEMP $protocZip
125+
$dest = $env:PROTOC_ROOT
126+
127+
New-Item -ItemType Directory -Force -Path $dest | Out-Null
128+
Invoke-WebRequest -Uri $protocUrl -OutFile $zipPath
129+
Expand-Archive -Path $zipPath -DestinationPath $dest -Force
130+
131+
- name: Add Protoc to PATH
132+
if: inputs.need-protoc == 'true'
133+
shell: bash
134+
run: |
135+
set -euo pipefail
136+
echo "${PROTOC_ROOT}/bin" >> "${GITHUB_PATH}"
137+
export PATH="${PROTOC_ROOT}/bin:${PATH}"
138+
protoc --version
66139
67140
- name: Install cargo-nextest
68141
if: inputs.need-nextest == 'true'
@@ -133,4 +206,3 @@ runs:
133206
134207
rm foundationdb-clients_7.1.17-1_amd64.deb
135208
rm foundationdb-server_7.1.17-1_amd64.deb
136-

.github/actions/test_behavior_bin_ofs/action.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Test Binding C++
19+
description: 'Test Core with given setup and service'
20+
inputs:
21+
setup:
22+
description: "The setup action for test"
23+
service:
24+
description: "The service to test"
25+
feature:
26+
description: "The feature to test"
27+
28+
runs:
29+
using: "composite"
30+
steps:
31+
- name: Setup
32+
shell: bash
33+
run: |
34+
mkdir -p ./dynamic_test_binding_cpp &&
35+
cat <<EOF >./dynamic_test_binding_cpp/action.yml
36+
runs:
37+
using: composite
38+
steps:
39+
- name: Setup Test
40+
uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }}
41+
- name: Run Test Binding C++
42+
shell: bash
43+
working-directory: bindings/cpp
44+
run: |
45+
mkdir -p build && cd build
46+
if [[ "\${{ runner.os }}" == "Windows" ]]; then
47+
cmake \
48+
-DCMAKE_BUILD_TYPE=Release \
49+
-DOPENDAL_ENABLE_TESTING=ON \
50+
-DOPENDAL_DEV=ON \
51+
-DOPENDAL_ENABLE_ASYNC=ON \
52+
-DFEATURES="opendal/${{ inputs.feature }}" \
53+
-DCMAKE_CXX_STANDARD=20 \
54+
..
55+
cmake --build . --config Release
56+
./Release/opendal_cpp_test.exe --gtest_filter="*BehaviorTest*:*Async*"
57+
elif [[ "\${{ runner.os }}" == "macOS" ]]; then
58+
cmake \
59+
-DCMAKE_BUILD_TYPE=Release \
60+
-DOPENDAL_ENABLE_TESTING=ON \
61+
-DOPENDAL_DEV=ON \
62+
-DOPENDAL_ENABLE_ASYNC=ON \
63+
-DFEATURES="opendal/${{ inputs.feature }}" \
64+
-DCMAKE_CXX_COMPILER=clang++ \
65+
-DCMAKE_CXX_STANDARD=20 \
66+
..
67+
make -j\$(sysctl -n hw.ncpu) opendal_cpp_test
68+
./opendal_cpp_test --gtest_filter="*BehaviorTest*:*Async*"
69+
else
70+
cmake \
71+
-DCMAKE_BUILD_TYPE=Release \
72+
-DOPENDAL_ENABLE_TESTING=ON \
73+
-DOPENDAL_DEV=ON \
74+
-DOPENDAL_ENABLE_ASYNC=ON \
75+
-DFEATURES="opendal/${{ inputs.feature }}" \
76+
-DCMAKE_CXX_COMPILER=clang++ \
77+
-DCMAKE_CXX_STANDARD=20 \
78+
..
79+
make -j\$(nproc) opendal_cpp_test
80+
./opendal_cpp_test --gtest_filter="*BehaviorTest*:*Async*"
81+
fi
82+
env:
83+
OPENDAL_TEST: ${{ inputs.service }}
84+
EOF
85+
- name: Run
86+
uses: ./dynamic_test_binding_cpp

.github/actions/test_behavior_binding_go/action.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,16 @@ runs:
4040
uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }}
4141
- name: Run Test Binding Go
4242
shell: bash
43-
working-directory: bindings/go/tests/behavior_tests
4443
run: |
45-
export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/homebrew/opt/libffi/lib
46-
go test -v -run TestBehavior
44+
if [ "${{ runner.os }}" == "Windows" ]; then
45+
# https://github.com/ilammy/msvc-dev-cmd/issues/25
46+
rm /usr/bin/link.exe
47+
fi
48+
cp bindings/go/Makefile .
49+
make tests
50+
if [ "${{ inputs.setup }}" == "0_minio_s3" ]; then
51+
make bench
52+
fi
4753
env:
4854
OPENDAL_TEST: ${{ inputs.service }}
4955
CGO_ENABLE: 0

0 commit comments

Comments
 (0)