From ad031b8f76f1a554f14fb3914667a6a419d81c8b Mon Sep 17 00:00:00 2001 From: Suyan Date: Tue, 24 Oct 2023 01:04:00 +0800 Subject: [PATCH] chore: try format yaml files (#3364) --- .asf.yaml | 6 +- .../behavior_test_binding_java/action.yaml | 38 +++++----- .../actions/behavior_test_core/action.yaml | 38 +++++----- .github/actions/setup-ocaml/action.yaml | 4 +- .github/actions/setup/action.yaml | 4 +- .github/labeler.yml | 14 ++-- .../services/etcd/etcd-cluster-tls/action.yml | 22 +++--- .github/services/etcd/etcd-cluster/action.yml | 12 +-- .github/services/etcd/etcd/action.yml | 12 +-- .github/services/fs/local_fs/action.yml | 12 +-- .github/services/http/caddy/action.yml | 12 +-- .github/services/http/nginx/action.yml | 12 +-- .../mongodb_with_basic_auth/action.yml | 28 +++---- .../mongodb/mongodb_with_no_auth/action.yml | 28 +++---- .github/services/mysql/mysql/action.yml | 30 ++++---- .../services/postgresql/postgresql/action.yml | 30 ++++---- .github/services/redis/redis/action.yml | 28 +++---- .../redis/redis_with_cluster/action.yml | 28 +++---- .../workflows/behavior_test_binding_java.yml | 6 +- .github/workflows/behavior_test_core.yml | 6 +- .github/workflows/bindings_ocaml.yml | 4 +- .github/workflows/bindings_php.yml | 26 +++---- .github/workflows/docs.yml | 2 +- .github/workflows/fuzz_test.yml | 6 +- .github/workflows/service_test_libsql.yml | 74 +++++++++---------- .github/workflows/service_test_redis.yml | 1 - .github/workflows/service_test_tikv.yml | 70 +++++++++--------- .yamlfmt | 22 ++++++ bindings/ruby/cucumber.yml | 2 +- fixtures/etcd/docker-compose-cluster-tls.yml | 42 +++++------ fixtures/etcd/docker-compose-cluster.yml | 2 +- fixtures/etcd/docker-compose-stanlone.yml | 22 +++--- fixtures/http/docker-compose-caddy.yml | 2 +- fixtures/http/docker-compose-nginx.yml | 2 +- .../mongodb/docker-compose-basic-auth.yml | 2 +- fixtures/mysql/docker-compose.yml | 6 +- fixtures/postgresql/docker-compose.yml | 2 +- .../docker-compose-redis-cluster-tls.yml | 3 +- 38 files changed, 340 insertions(+), 320 deletions(-) create mode 100644 .yamlfmt diff --git a/.asf.yaml b/.asf.yaml index fbadfef5c63b..caab89d8ffd0 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -39,10 +39,10 @@ github: whatever: Just a placeholder to make it take effects notifications: - commits: commits@opendal.apache.org - issues: commits@opendal.apache.org + commits: commits@opendal.apache.org + issues: commits@opendal.apache.org pullrequests: commits@opendal.apache.org - discussions: commits@opendal.apache.org + discussions: commits@opendal.apache.org publish: whoami: gh-pages diff --git a/.github/actions/behavior_test_binding_java/action.yaml b/.github/actions/behavior_test_binding_java/action.yaml index 635b109df6b7..cb3724a81d2f 100644 --- a/.github/actions/behavior_test_binding_java/action.yaml +++ b/.github/actions/behavior_test_binding_java/action.yaml @@ -28,22 +28,22 @@ inputs: runs: using: "composite" steps: - - name: Setup - shell: bash - run: | - mkdir -p ./dynamic_test_binding_java && - cat <./dynamic_test_binding_java/action.yml - runs: - using: composite - steps: - - name: Setup Test - uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }} - - name: Run Test Binding Java - shell: bash - working-directory: bindings/java - run: ./mvnw test -Dtest="behavior.*Test" -Dcargo-build.features=${{ inputs.feature }} - env: - OPENDAL_TEST: ${{ inputs.service }} - EOF - - name: Run - uses: ./dynamic_test_binding_java + - name: Setup + shell: bash + run: | + mkdir -p ./dynamic_test_binding_java && + cat <./dynamic_test_binding_java/action.yml + runs: + using: composite + steps: + - name: Setup Test + uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }} + - name: Run Test Binding Java + shell: bash + working-directory: bindings/java + run: ./mvnw test -Dtest="behavior.*Test" -Dcargo-build.features=${{ inputs.feature }} + env: + OPENDAL_TEST: ${{ inputs.service }} + EOF + - name: Run + uses: ./dynamic_test_binding_java diff --git a/.github/actions/behavior_test_core/action.yaml b/.github/actions/behavior_test_core/action.yaml index 69674e0a7bb5..d38d13d24576 100644 --- a/.github/actions/behavior_test_core/action.yaml +++ b/.github/actions/behavior_test_core/action.yaml @@ -28,22 +28,22 @@ inputs: runs: using: "composite" steps: - - name: Setup - shell: bash - run: | - mkdir -p ./dynamic_test_core && - cat <./dynamic_test_core/action.yml - runs: - using: composite - steps: - - name: Setup Test Core - uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }} - - name: Run Test Core - shell: bash - working-directory: core - run: cargo nextest run behavior --features ${{ inputs.feature }} - env: - OPENDAL_TEST: ${{ inputs.service }} - EOF - - name: Run - uses: ./dynamic_test_core + - name: Setup + shell: bash + run: | + mkdir -p ./dynamic_test_core && + cat <./dynamic_test_core/action.yml + runs: + using: composite + steps: + - name: Setup Test Core + uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }} + - name: Run Test Core + shell: bash + working-directory: core + run: cargo nextest run behavior --features ${{ inputs.feature }} + env: + OPENDAL_TEST: ${{ inputs.service }} + EOF + - name: Run + uses: ./dynamic_test_core diff --git a/.github/actions/setup-ocaml/action.yaml b/.github/actions/setup-ocaml/action.yaml index 46fd2ec70ff3..cd096d6d752b 100644 --- a/.github/actions/setup-ocaml/action.yaml +++ b/.github/actions/setup-ocaml/action.yaml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: Setup OCaml +name: Setup OCaml description: 'Prepare OCaml Build Environment' inputs: need-depext: @@ -38,4 +38,4 @@ runs: run: opam env | tr '\n' ' ' >> $GITHUB_ENV - name: Add Opam switch to PATH shell: bash - run: opam var bin >> $GITHUB_PATH \ No newline at end of file + run: opam var bin >> $GITHUB_PATH diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 1641ad8ee6fa..d217c3fc73e7 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -56,8 +56,8 @@ runs: if: inputs.need-protoc == 'true' uses: arduino/setup-protoc@v2 with: - version: "23.4" - repo-token: ${{ inputs.github-token }} + version: "23.4" + repo-token: ${{ inputs.github-token }} - name: Cache nextest on linux id: cache-nextest diff --git a/.github/labeler.yml b/.github/labeler.yml index 7a00ee624e33..83cca020cc7d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -16,16 +16,16 @@ # under the License. releases-note/feat: - - '^feat' + - '^feat' releases-note/refactor: - - '^refactor' + - '^refactor' releases-note/fix: - - '^fix' + - '^fix' releases-note/docs: - - '^doc' + - '^doc' releases-note/ci: - - '^ci' + - '^ci' releases-note/build: - - '^build' + - '^build' releases-note/chore: - - '^chore' + - '^chore' diff --git a/.github/services/etcd/etcd-cluster-tls/action.yml b/.github/services/etcd/etcd-cluster-tls/action.yml index 25ae0aa62971..03cdfc1c11ef 100644 --- a/.github/services/etcd/etcd-cluster-tls/action.yml +++ b/.github/services/etcd/etcd-cluster-tls/action.yml @@ -19,8 +19,8 @@ name: etcd-cluster-tls description: 'Behavior test for etcd-cluster-tls' runs: - using: "composite" - steps: + using: "composite" + steps: - name: Copy Etcd Certificate Files shell: bash working-directory: fixtures @@ -34,12 +34,12 @@ runs: - name: Setup shell: bash run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_ETCD_ENDPOINTS=https://127.0.0.1:23790,https://127.0.0.1:23791,https://127.0.0.1:23792 - OPENDAL_ETCD_ROOT=/tmp/opendal - OPENDAL_ETCD_USERNAME=root - OPENDAL_ETCD_PASSWORD=opendal - OPENDAL_ETCD_CA_PATH=/tmp/etcd/ca.pem - OPENDAL_ETCD_CERT_PATH=/tmp/etcd/client.pem - OPENDAL_ETCD_KEY_PATH=/tmp/etcd/client-key.pem - EOF \ No newline at end of file + cat << EOF >> $GITHUB_ENV + OPENDAL_ETCD_ENDPOINTS=https://127.0.0.1:23790,https://127.0.0.1:23791,https://127.0.0.1:23792 + OPENDAL_ETCD_ROOT=/tmp/opendal + OPENDAL_ETCD_USERNAME=root + OPENDAL_ETCD_PASSWORD=opendal + OPENDAL_ETCD_CA_PATH=/tmp/etcd/ca.pem + OPENDAL_ETCD_CERT_PATH=/tmp/etcd/client.pem + OPENDAL_ETCD_KEY_PATH=/tmp/etcd/client-key.pem + EOF diff --git a/.github/services/etcd/etcd-cluster/action.yml b/.github/services/etcd/etcd-cluster/action.yml index d0988edfc7ff..bf7e5886e159 100644 --- a/.github/services/etcd/etcd-cluster/action.yml +++ b/.github/services/etcd/etcd-cluster/action.yml @@ -19,8 +19,8 @@ name: etcd-cluster description: 'Behavior test for etcd-cluster' runs: - using: "composite" - steps: + using: "composite" + steps: - name: Setup etcd cluster shell: bash working-directory: fixtures/etcd @@ -28,7 +28,7 @@ runs: - name: Setup shell: bash run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_ETCD_ENDPOINTS=http://127.0.0.1:23790,http://127.0.0.1:23791,http://127.0.0.1:23792 - OPENDAL_ETCD_ROOT=/tmp/opendal - EOF \ No newline at end of file + cat << EOF >> $GITHUB_ENV + OPENDAL_ETCD_ENDPOINTS=http://127.0.0.1:23790,http://127.0.0.1:23791,http://127.0.0.1:23792 + OPENDAL_ETCD_ROOT=/tmp/opendal + EOF diff --git a/.github/services/etcd/etcd/action.yml b/.github/services/etcd/etcd/action.yml index 143422205402..56497215d26d 100644 --- a/.github/services/etcd/etcd/action.yml +++ b/.github/services/etcd/etcd/action.yml @@ -19,8 +19,8 @@ name: etcd description: 'Behavior test for etcd stanlone' runs: - using: "composite" - steps: + using: "composite" + steps: - name: Setup etcd cluster shell: bash working-directory: fixtures/etcd @@ -28,7 +28,7 @@ runs: - name: Setup shell: bash run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_ETCD_ENDPOINTS=http://127.0.0.1:2379 - OPENDAL_ETCD_ROOT=/tmp/opendal - EOF \ No newline at end of file + cat << EOF >> $GITHUB_ENV + OPENDAL_ETCD_ENDPOINTS=http://127.0.0.1:2379 + OPENDAL_ETCD_ROOT=/tmp/opendal + EOF diff --git a/.github/services/fs/local_fs/action.yml b/.github/services/fs/local_fs/action.yml index 7b36dc3a9a40..c35c7aef7063 100644 --- a/.github/services/fs/local_fs/action.yml +++ b/.github/services/fs/local_fs/action.yml @@ -19,9 +19,9 @@ name: local_fs description: 'Behavior test for local fs' runs: - using: "composite" - steps: - - name: Setup - shell: bash - run: | - echo "OPENDAL_FS_ROOT=${{ runner.temp }}/" >> $GITHUB_ENV + using: "composite" + steps: + - name: Setup + shell: bash + run: | + echo "OPENDAL_FS_ROOT=${{ runner.temp }}/" >> $GITHUB_ENV diff --git a/.github/services/http/caddy/action.yml b/.github/services/http/caddy/action.yml index f3c03a8d4e6e..15f5c6295916 100644 --- a/.github/services/http/caddy/action.yml +++ b/.github/services/http/caddy/action.yml @@ -19,8 +19,8 @@ name: caddy description: 'Behavior test for http service in caddy' runs: - using: "composite" - steps: + using: "composite" + steps: - name: Setup etcd cluster shell: bash working-directory: fixtures/http @@ -28,7 +28,7 @@ runs: - name: Setup shell: bash run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_HTTP_ENDPOINT=http://127.0.0.1:8080 - OPENDAL_DISABLE_RANDOM_ROOT=true - EOF \ No newline at end of file + cat << EOF >> $GITHUB_ENV + OPENDAL_HTTP_ENDPOINT=http://127.0.0.1:8080 + OPENDAL_DISABLE_RANDOM_ROOT=true + EOF diff --git a/.github/services/http/nginx/action.yml b/.github/services/http/nginx/action.yml index 9a735bafc71e..752eca853060 100644 --- a/.github/services/http/nginx/action.yml +++ b/.github/services/http/nginx/action.yml @@ -19,8 +19,8 @@ name: nginx description: 'Behavior test for http service in nginx' runs: - using: "composite" - steps: + using: "composite" + steps: - name: Setup etcd cluster shell: bash working-directory: fixtures/http @@ -28,7 +28,7 @@ runs: - name: Setup shell: bash run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_HTTP_ENDPOINT=http://127.0.0.1:8080 - OPENDAL_DISABLE_RANDOM_ROOT=true - EOF \ No newline at end of file + cat << EOF >> $GITHUB_ENV + OPENDAL_HTTP_ENDPOINT=http://127.0.0.1:8080 + OPENDAL_DISABLE_RANDOM_ROOT=true + EOF diff --git a/.github/services/mongodb/mongodb_with_basic_auth/action.yml b/.github/services/mongodb/mongodb_with_basic_auth/action.yml index 1cbdfc134439..c1517dd3acc9 100644 --- a/.github/services/mongodb/mongodb_with_basic_auth/action.yml +++ b/.github/services/mongodb/mongodb_with_basic_auth/action.yml @@ -19,17 +19,17 @@ name: mongodb_with_basic_auth description: 'Behavior test for mongodb with basic auth' runs: - using: "composite" - steps: - - name: Setup MongoDB Server - shell: bash - working-directory: fixtures/mongodb - run: docker-compose -f docker-compose-basic-auth.yml up -d - - name: Setup - shell: bash - run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_MONGODB_CONNECTION_STRING=mongodb://root:example@127.0.0.1:27017/admin - OPENDAL_MONGODB_DATABASE=demo - OPENDAL_MONGODB_COLLECTION=demo - EOF + using: "composite" + steps: + - name: Setup MongoDB Server + shell: bash + working-directory: fixtures/mongodb + run: docker-compose -f docker-compose-basic-auth.yml up -d + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_MONGODB_CONNECTION_STRING=mongodb://root:example@127.0.0.1:27017/admin + OPENDAL_MONGODB_DATABASE=demo + OPENDAL_MONGODB_COLLECTION=demo + EOF diff --git a/.github/services/mongodb/mongodb_with_no_auth/action.yml b/.github/services/mongodb/mongodb_with_no_auth/action.yml index 928f047abb4c..8d885bb5ea2e 100644 --- a/.github/services/mongodb/mongodb_with_no_auth/action.yml +++ b/.github/services/mongodb/mongodb_with_no_auth/action.yml @@ -19,17 +19,17 @@ name: mongodb_with_no_auth description: 'Behavior test for mongodb with no auth' runs: - using: "composite" - steps: - - name: Setup MongoDB Server - shell: bash - working-directory: fixtures/mongodb - run: docker-compose -f docker-compose-no-auth.yml up -d - - name: Setup - shell: bash - run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_MONGODB_CONNECTION_STRING=mongodb://127.0.0.1:27017 - OPENDAL_MONGODB_DATABASE=demo - OPENDAL_MONGODB_COLLECTION=demo - EOF + using: "composite" + steps: + - name: Setup MongoDB Server + shell: bash + working-directory: fixtures/mongodb + run: docker-compose -f docker-compose-no-auth.yml up -d + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_MONGODB_CONNECTION_STRING=mongodb://127.0.0.1:27017 + OPENDAL_MONGODB_DATABASE=demo + OPENDAL_MONGODB_COLLECTION=demo + EOF diff --git a/.github/services/mysql/mysql/action.yml b/.github/services/mysql/mysql/action.yml index 4843cacbf2ba..2f2b332e5ee9 100644 --- a/.github/services/mysql/mysql/action.yml +++ b/.github/services/mysql/mysql/action.yml @@ -19,18 +19,18 @@ name: mysql description: 'Behavior test for mysql' runs: - using: "composite" - steps: - - name: Setup MySQL Server - shell: bash - working-directory: fixtures/mysql - run: docker-compose -f docker-compose.yml up -d - - name: Setup - shell: bash - run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_MYSQL_CONNECTION_STRING=mysql://root:password@localhost:3306/testdb - OPENDAL_MYSQL_TABLE=data - OPENDAL_MYSQL_KEY_FIELD=key - OPENDAL_MYSQL_VALUE_FIELD=data - EOF + using: "composite" + steps: + - name: Setup MySQL Server + shell: bash + working-directory: fixtures/mysql + run: docker-compose -f docker-compose.yml up -d + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_MYSQL_CONNECTION_STRING=mysql://root:password@localhost:3306/testdb + OPENDAL_MYSQL_TABLE=data + OPENDAL_MYSQL_KEY_FIELD=key + OPENDAL_MYSQL_VALUE_FIELD=data + EOF diff --git a/.github/services/postgresql/postgresql/action.yml b/.github/services/postgresql/postgresql/action.yml index 6b3ddabe028b..8fd495054895 100644 --- a/.github/services/postgresql/postgresql/action.yml +++ b/.github/services/postgresql/postgresql/action.yml @@ -19,18 +19,18 @@ name: postgresql description: 'Behavior test for postgresql' runs: - using: "composite" - steps: - - name: Setup PostgreSQL Server - shell: bash - working-directory: fixtures/postgresql - run: docker-compose -f docker-compose.yml up -d - - name: Setup - shell: bash - run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_POSTGRESQL_CONNECTION_STRING=postgresql://user:password@localhost:5432/testdb - OPENDAL_POSTGRESQL_TABLE=data - OPENDAL_POSTGRESQL_KEY_FIELD=key - OPENDAL_POSTGRESQL_VALUE_FIELD=value - EOF + using: "composite" + steps: + - name: Setup PostgreSQL Server + shell: bash + working-directory: fixtures/postgresql + run: docker-compose -f docker-compose.yml up -d + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_POSTGRESQL_CONNECTION_STRING=postgresql://user:password@localhost:5432/testdb + OPENDAL_POSTGRESQL_TABLE=data + OPENDAL_POSTGRESQL_KEY_FIELD=key + OPENDAL_POSTGRESQL_VALUE_FIELD=value + EOF diff --git a/.github/services/redis/redis/action.yml b/.github/services/redis/redis/action.yml index 472329b33ac8..cf3ac0071385 100644 --- a/.github/services/redis/redis/action.yml +++ b/.github/services/redis/redis/action.yml @@ -19,17 +19,17 @@ name: redis description: 'Behavior test for redis' runs: - using: "composite" - steps: - - name: Setup Redis Server - shell: bash - working-directory: fixtures/redis - run: docker-compose -f docker-compose-redis.yml up -d - - name: Setup - shell: bash - run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379 - OPENDAL_REDIS_ROOT=/ - OPENDAL_REDIS_DB=0 - EOF + using: "composite" + steps: + - name: Setup Redis Server + shell: bash + working-directory: fixtures/redis + run: docker-compose -f docker-compose-redis.yml up -d + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379 + OPENDAL_REDIS_ROOT=/ + OPENDAL_REDIS_DB=0 + EOF diff --git a/.github/services/redis/redis_with_cluster/action.yml b/.github/services/redis/redis_with_cluster/action.yml index 4caeb85c3a2b..fba13bb1e0c2 100644 --- a/.github/services/redis/redis_with_cluster/action.yml +++ b/.github/services/redis/redis_with_cluster/action.yml @@ -19,17 +19,17 @@ name: redis_with_cluster description: 'Behavior test for redis with cluster' runs: - using: "composite" - steps: - - name: Setup Redis Cluster - shell: bash - working-directory: fixtures/redis - run: docker-compose -f docker-compose-redis-cluster.yml up -d - - name: Setup - shell: bash - run: | - cat << EOF >> $GITHUB_ENV - OPENDAL_REDIS_CLUSTER_ENDPOINTS=redis://127.0.0.1:6380/,redis://127.0.0.1:6381/,redis://127.0.0.1:6382/,redis://127.0.0.1:6383/,redis://127.0.0.1:6384/,redis://127.0.0.1:6385/ - OPENDAL_REDIS_ROOT=/test/opendal - OPENDAL_REDIS_DB=0 - EOF + using: "composite" + steps: + - name: Setup Redis Cluster + shell: bash + working-directory: fixtures/redis + run: docker-compose -f docker-compose-redis-cluster.yml up -d + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_REDIS_CLUSTER_ENDPOINTS=redis://127.0.0.1:6380/,redis://127.0.0.1:6381/,redis://127.0.0.1:6382/,redis://127.0.0.1:6383/,redis://127.0.0.1:6384/,redis://127.0.0.1:6385/ + OPENDAL_REDIS_ROOT=/test/opendal + OPENDAL_REDIS_DB=0 + EOF diff --git a/.github/workflows/behavior_test_binding_java.yml b/.github/workflows/behavior_test_binding_java.yml index 9eae4ce7c678..3a780d46889e 100644 --- a/.github/workflows/behavior_test_binding_java.yml +++ b/.github/workflows/behavior_test_binding_java.yml @@ -55,6 +55,6 @@ jobs: - name: Test Core uses: ./.github/actions/behavior_test_binding_java with: - setup: ${{ matrix.cases.setup }} - service: ${{ matrix.cases.service }} - feature: ${{ matrix.cases.feature }} + setup: ${{ matrix.cases.setup }} + service: ${{ matrix.cases.service }} + feature: ${{ matrix.cases.feature }} diff --git a/.github/workflows/behavior_test_core.yml b/.github/workflows/behavior_test_core.yml index 2df44b82f392..03d542f26a3c 100644 --- a/.github/workflows/behavior_test_core.yml +++ b/.github/workflows/behavior_test_core.yml @@ -55,6 +55,6 @@ jobs: - name: Test Core uses: ./.github/actions/behavior_test_core with: - setup: ${{ matrix.cases.setup }} - service: ${{ matrix.cases.service }} - feature: ${{ matrix.cases.feature }} + setup: ${{ matrix.cases.setup }} + service: ${{ matrix.cases.service }} + feature: ${{ matrix.cases.feature }} diff --git a/.github/workflows/bindings_ocaml.yml b/.github/workflows/bindings_ocaml.yml index 42e12afc313b..b0cbb56fbc7a 100644 --- a/.github/workflows/bindings_ocaml.yml +++ b/.github/workflows/bindings_ocaml.yml @@ -54,5 +54,5 @@ jobs: dune runtest dune build @fmt - - \ No newline at end of file + + diff --git a/.github/workflows/bindings_php.yml b/.github/workflows/bindings_php.yml index 84faae3dad4a..110c99fba55c 100644 --- a/.github/workflows/bindings_php.yml +++ b/.github/workflows/bindings_php.yml @@ -18,19 +18,19 @@ name: Bindings PHP CI on: -# Disable PHP build until https://github.com/apache/incubator-opendal/issues/3055 addressed -# -# push: -# branches: -# - main -# tags: -# - '*' -# pull_request: -# branches: -# - main -# paths: -# - "bindings/php/**" -# - ".github/workflows/bindings_php.yml" + # Disable PHP build until https://github.com/apache/incubator-opendal/issues/3055 addressed + # + # push: + # branches: + # - main + # tags: + # - '*' + # pull_request: + # branches: + # - main + # paths: + # - "bindings/php/**" + # - ".github/workflows/bindings_php.yml" workflow_dispatch: concurrency: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 56c8a50a28ab..aae58f433ecd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -365,7 +365,7 @@ jobs: run: yarn build - name: Copy asf file - run: cp .asf.yaml ./website/build/.asf.yaml + run: cp .asf.yaml ./website/build/.asf.yaml - name: Deploy to gh-pages uses: peaceiris/actions-gh-pages@v3.9.2 diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 3f7a31e62767..3c1abc92dd92 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -81,7 +81,7 @@ jobs: strategy: fail-fast: true matrix: - fuzz-targets: [ fuzz_reader, fuzz_writer ] + fuzz-targets: [fuzz_reader, fuzz_writer] steps: - name: Install libfuzzer run: sudo apt-get install -y libfuzzer-14-dev @@ -116,7 +116,7 @@ jobs: strategy: fail-fast: true matrix: - fuzz-targets: [ fuzz_reader, fuzz_writer ] + fuzz-targets: [fuzz_reader, fuzz_writer] steps: - name: Install libfuzzer run: sudo apt-get install -y libfuzzer-14-dev @@ -141,7 +141,7 @@ jobs: strategy: fail-fast: true matrix: - fuzz-targets: [ fuzz_reader, fuzz_writer ] + fuzz-targets: [fuzz_reader, fuzz_writer] steps: - name: Install libfuzzer run: sudo apt-get install -y libfuzzer-14-dev diff --git a/.github/workflows/service_test_libsql.yml b/.github/workflows/service_test_libsql.yml index b61de44a783f..0a27b72ad53c 100644 --- a/.github/workflows/service_test_libsql.yml +++ b/.github/workflows/service_test_libsql.yml @@ -56,21 +56,21 @@ jobs: shell: bash working-directory: core run: | - curl --location '127.0.0.1:8080/v2/pipeline' \ - --header 'Content-Type: application/json' \ - --data '{ - "baton": null, - "requests": [ - { - "type": "execute", - "stmt": { - "sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);", - "args": [], - "want_rows": true - } - } - ] - }' + curl --location '127.0.0.1:8080/v2/pipeline' \ + --header 'Content-Type: application/json' \ + --data '{ + "baton": null, + "requests": [ + { + "type": "execute", + "stmt": { + "sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);", + "args": [], + "want_rows": true + } + } + ] + }' - name: Test shell: bash @@ -102,31 +102,31 @@ jobs: shell: bash working-directory: core run: | - curl --location '127.0.0.1:8080/v2/pipeline' \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ' \ - --data '{ - "baton": null, - "requests": [ - { - "type": "execute", - "stmt": { - "sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);", - "args": [], - "want_rows": true - } - } - ] - }' + curl --location '127.0.0.1:8080/v2/pipeline' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ' \ + --data '{ + "baton": null, + "requests": [ + { + "type": "execute", + "stmt": { + "sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);", + "args": [], + "want_rows": true + } + } + ] + }' - name: Test shell: bash working-directory: core run: cargo nextest run behavior --features services-libsql env: - OPENDAL_TEST: libsql - OPENDAL_LIBSQL_CONNECTION_STRING: http://127.0.0.1:8080 - OPENDAL_LIBSQL_AUTH_TOKEN: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ - OPENDAL_LIBSQL_TABLE: data - OPENDAL_LIBSQL_KEY_FIELD: key - OPENDAL_LIBSQL_VALUE_FIELD: data + OPENDAL_TEST: libsql + OPENDAL_LIBSQL_CONNECTION_STRING: http://127.0.0.1:8080 + OPENDAL_LIBSQL_AUTH_TOKEN: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ + OPENDAL_LIBSQL_TABLE: data + OPENDAL_LIBSQL_KEY_FIELD: key + OPENDAL_LIBSQL_VALUE_FIELD: data diff --git a/.github/workflows/service_test_redis.yml b/.github/workflows/service_test_redis.yml index ef8cb682e3d5..fdc4f0fb2bf5 100644 --- a/.github/workflows/service_test_redis.yml +++ b/.github/workflows/service_test_redis.yml @@ -48,7 +48,6 @@ jobs: shell: bash working-directory: fixtures/redis run: | - # Install the CA in the system sudo cp ssl/ca.crt /usr/local/share/ca-certificates sudo update-ca-certificates diff --git a/.github/workflows/service_test_tikv.yml b/.github/workflows/service_test_tikv.yml index ef099eee24e3..043f18fbac0a 100644 --- a/.github/workflows/service_test_tikv.yml +++ b/.github/workflows/service_test_tikv.yml @@ -81,57 +81,57 @@ jobs: shell: bash working-directory: fixtures/tikv run: | - mkdir -p /tmp/tikv/ssl - cp -r `pwd`/ssl/* /tmp/tikv/ssl + mkdir -p /tmp/tikv/ssl + cp -r `pwd`/ssl/* /tmp/tikv/ssl - name: install tiup run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh - name: Start tikv-tls run: | - # use latest stable version - ~/.tiup/bin/tiup install tikv:v7.3.0 pd:v7.3.0 + # use latest stable version + ~/.tiup/bin/tiup install tikv:v7.3.0 pd:v7.3.0 - ~/.tiup/components/tikv/v7.3.0/tikv-server \ - --addr=127.0.0.1:20160 \ - --advertise-addr=127.0.0.1:20160 \ - --status-addr=127.0.0.1:20180 \ - --pd-endpoints=https://127.0.0.1:2379 \ - --data-dir=/tmp/tikv/data \ - --log-file=/tmp/tikv/tikv.log \ - --config=tikv-tls.toml & + ~/.tiup/components/tikv/v7.3.0/tikv-server \ + --addr=127.0.0.1:20160 \ + --advertise-addr=127.0.0.1:20160 \ + --status-addr=127.0.0.1:20180 \ + --pd-endpoints=https://127.0.0.1:2379 \ + --data-dir=/tmp/tikv/data \ + --log-file=/tmp/tikv/tikv.log \ + --config=tikv-tls.toml & - ~/.tiup/components/pd/v7.3.0/pd-server \ - --name=pd1 \ - --peer-urls=https://127.0.0.1:2380 \ - --advertise-peer-urls=https://127.0.0.1:2380 \ - --client-urls=https://127.0.0.1:2379 \ - --advertise-client-urls=https://127.0.0.1:2379 \ - --initial-cluster=pd1=https://127.0.0.1:2380 \ - --data-dir=/tmp/pd1/data \ - --log-file=/tmp/pd1/pd.log \ - --config=pd-tls.toml & + ~/.tiup/components/pd/v7.3.0/pd-server \ + --name=pd1 \ + --peer-urls=https://127.0.0.1:2380 \ + --advertise-peer-urls=https://127.0.0.1:2380 \ + --client-urls=https://127.0.0.1:2379 \ + --advertise-client-urls=https://127.0.0.1:2379 \ + --initial-cluster=pd1=https://127.0.0.1:2380 \ + --data-dir=/tmp/pd1/data \ + --log-file=/tmp/pd1/pd.log \ + --config=pd-tls.toml & - while :; do - echo "waiting tikv-tls-cluster to be ready" - [[ "$(curl -I --cacert /tmp/tikv/ssl/ca.pem --cert /tmp/tikv/ssl/client.pem --key /tmp/tikv/ssl/client-key.pem https://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break - sleep 1 - done + while :; do + echo "waiting tikv-tls-cluster to be ready" + [[ "$(curl -I --cacert /tmp/tikv/ssl/ca.pem --cert /tmp/tikv/ssl/client.pem --key /tmp/tikv/ssl/client-key.pem https://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break + sleep 1 + done working-directory: fixtures/tikv - name: Setup Rust toolchain uses: ./.github/actions/setup with: - need-protoc: true - need-nextest: true + need-protoc: true + need-nextest: true - name: Test shell: bash working-directory: core run: cargo nextest run behavior --features services-tikv env: - OPENDAL_TEST: tikv - OPENDAL_TIKV_ENDPOINTS: "https://127.0.0.1:2379" - OPENDAL_TIKV_INSECURE: false - OPENDAL_TIKV_CA_PATH: "/tmp/tikv/ssl/ca.pem" - OPENDAL_TIKV_CERT_PATH: "/tmp/tikv/ssl/client.pem" - OPENDAL_TIKV_KEY_PATH: "/tmp/tikv/ssl/client-key.pem" + OPENDAL_TEST: tikv + OPENDAL_TIKV_ENDPOINTS: "https://127.0.0.1:2379" + OPENDAL_TIKV_INSECURE: false + OPENDAL_TIKV_CA_PATH: "/tmp/tikv/ssl/ca.pem" + OPENDAL_TIKV_CERT_PATH: "/tmp/tikv/ssl/client.pem" + OPENDAL_TIKV_KEY_PATH: "/tmp/tikv/ssl/client-key.pem" diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 000000000000..8d09e47a9eb8 --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +# Configuration reference: https://github.com/google/yamlfmt/blob/main/docs/config-file.md + +formatter: + retain_line_breaks: true + scan_folded_as_literal: true diff --git a/bindings/ruby/cucumber.yml b/bindings/ruby/cucumber.yml index c4cc853e68f1..8df64c3e80b4 100644 --- a/bindings/ruby/cucumber.yml +++ b/bindings/ruby/cucumber.yml @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -default: tests -r tests/steps \ No newline at end of file +default: tests -r tests/steps diff --git a/fixtures/etcd/docker-compose-cluster-tls.yml b/fixtures/etcd/docker-compose-cluster-tls.yml index 8c515860f83f..afd7ce09fe5e 100644 --- a/fixtures/etcd/docker-compose-cluster-tls.yml +++ b/fixtures/etcd/docker-compose-cluster-tls.yml @@ -23,13 +23,13 @@ services: - "23790:2379" - "23800:2380" volumes: - - ./ca.pem:/opt/bitnami/etcd/conf/ca.pem - - ./server.pem:/opt/bitnami/etcd/conf/server.pem - - ./server-key.pem:/opt/bitnami/etcd/conf/server-key.pem - - ./client-key.pem:/opt/bitnami/etcd/client-key.pem - - ./client.pem:/opt/bitnami/etcd/client.pem - - ./etcd1/etcd.pem:/opt/bitnami/etcd/conf/peer.pem - - ./etcd1/etcd-key.pem:/opt/bitnami/etcd/conf/peer-key.pem + - ./ca.pem:/opt/bitnami/etcd/conf/ca.pem + - ./server.pem:/opt/bitnami/etcd/conf/server.pem + - ./server-key.pem:/opt/bitnami/etcd/conf/server-key.pem + - ./client-key.pem:/opt/bitnami/etcd/client-key.pem + - ./client.pem:/opt/bitnami/etcd/client.pem + - ./etcd1/etcd.pem:/opt/bitnami/etcd/conf/peer.pem + - ./etcd1/etcd-key.pem:/opt/bitnami/etcd/conf/peer-key.pem environment: ETCD_ROOT_PASSWORD: opendal ALLOW_NONE_AUTHENTICATION: "yes" @@ -55,13 +55,13 @@ services: - "23791:2379" - "23801:2380" volumes: - - ./ca.pem:/opt/bitnami/etcd/conf/ca.pem - - ./server.pem:/opt/bitnami/etcd/conf/server.pem - - ./server-key.pem:/opt/bitnami/etcd/conf/server-key.pem - - ./client-key.pem:/opt/bitnami/etcd/client-key.pem - - ./client.pem:/opt/bitnami/etcd/client.pem - - ./etcd2/etcd.pem:/opt/bitnami/etcd/conf/peer.pem - - ./etcd2/etcd-key.pem:/opt/bitnami/etcd/conf/peer-key.pem + - ./ca.pem:/opt/bitnami/etcd/conf/ca.pem + - ./server.pem:/opt/bitnami/etcd/conf/server.pem + - ./server-key.pem:/opt/bitnami/etcd/conf/server-key.pem + - ./client-key.pem:/opt/bitnami/etcd/client-key.pem + - ./client.pem:/opt/bitnami/etcd/client.pem + - ./etcd2/etcd.pem:/opt/bitnami/etcd/conf/peer.pem + - ./etcd2/etcd-key.pem:/opt/bitnami/etcd/conf/peer-key.pem environment: ETCD_ROOT_PASSWORD: opendal ALLOW_NONE_AUTHENTICATION: "yes" @@ -87,13 +87,13 @@ services: - "23792:2379" - "23802:2380" volumes: - - ./ca.pem:/opt/bitnami/etcd/conf/ca.pem - - ./server.pem:/opt/bitnami/etcd/conf/server.pem - - ./server-key.pem:/opt/bitnami/etcd/conf/server-key.pem - - ./client-key.pem:/opt/bitnami/etcd/client-key.pem - - ./client.pem:/opt/bitnami/etcd/client.pem - - ./etcd2/etcd.pem:/opt/bitnami/etcd/conf/peer.pem - - ./etcd2/etcd-key.pem:/opt/bitnami/etcd/conf/peer-key.pem + - ./ca.pem:/opt/bitnami/etcd/conf/ca.pem + - ./server.pem:/opt/bitnami/etcd/conf/server.pem + - ./server-key.pem:/opt/bitnami/etcd/conf/server-key.pem + - ./client-key.pem:/opt/bitnami/etcd/client-key.pem + - ./client.pem:/opt/bitnami/etcd/client.pem + - ./etcd2/etcd.pem:/opt/bitnami/etcd/conf/peer.pem + - ./etcd2/etcd-key.pem:/opt/bitnami/etcd/conf/peer-key.pem environment: ALLOW_NONE_AUTHENTICATION: "yes" ETCD_ROOT_PASSWORD: opendal diff --git a/fixtures/etcd/docker-compose-cluster.yml b/fixtures/etcd/docker-compose-cluster.yml index 212d9e5f8cca..54542042cec9 100644 --- a/fixtures/etcd/docker-compose-cluster.yml +++ b/fixtures/etcd/docker-compose-cluster.yml @@ -64,4 +64,4 @@ services: ETCD_INITIAL_CLUSTER_TOKEN: etcd-cluster ETCD_INITIAL_CLUSTER: etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 ETCD_INITIAL_CLUSTER_STATE: new - ETCD_MAX_REQUEST_BYTES: 10485760 \ No newline at end of file + ETCD_MAX_REQUEST_BYTES: 10485760 diff --git a/fixtures/etcd/docker-compose-stanlone.yml b/fixtures/etcd/docker-compose-stanlone.yml index 8f22009c01a3..9780eef839ff 100644 --- a/fixtures/etcd/docker-compose-stanlone.yml +++ b/fixtures/etcd/docker-compose-stanlone.yml @@ -17,14 +17,14 @@ version: '3.8' services: - etcd: - image: bitnami/etcd:latest - ports: - - "2379:2379" - - "2380:2380" - environment: - ALLOW_NONE_AUTHENTICATION: "yes" - ETCD_NAME: etcd - ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 - ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379 - ETCD_MAX_REQUEST_BYTES: 10485760 + etcd: + image: bitnami/etcd:latest + ports: + - "2379:2379" + - "2380:2380" + environment: + ALLOW_NONE_AUTHENTICATION: "yes" + ETCD_NAME: etcd + ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 + ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379 + ETCD_MAX_REQUEST_BYTES: 10485760 diff --git a/fixtures/http/docker-compose-caddy.yml b/fixtures/http/docker-compose-caddy.yml index b149d0c2f3f0..4f0f258b180e 100644 --- a/fixtures/http/docker-compose-caddy.yml +++ b/fixtures/http/docker-compose-caddy.yml @@ -23,4 +23,4 @@ services: - 8080:8080 volumes: - ../data:/tmp/static - - ./Caddyfile:/etc/caddy/Caddyfile \ No newline at end of file + - ./Caddyfile:/etc/caddy/Caddyfile diff --git a/fixtures/http/docker-compose-nginx.yml b/fixtures/http/docker-compose-nginx.yml index 73343e23ad54..8e836eacb6bb 100644 --- a/fixtures/http/docker-compose-nginx.yml +++ b/fixtures/http/docker-compose-nginx.yml @@ -23,4 +23,4 @@ services: - 8080:8080 volumes: - ./nginx.conf:/etc/nginx/nginx.conf - - ../data:/tmp/static \ No newline at end of file + - ../data:/tmp/static diff --git a/fixtures/mongodb/docker-compose-basic-auth.yml b/fixtures/mongodb/docker-compose-basic-auth.yml index 735dde825a4a..030d9817711f 100644 --- a/fixtures/mongodb/docker-compose-basic-auth.yml +++ b/fixtures/mongodb/docker-compose-basic-auth.yml @@ -26,4 +26,4 @@ services: - 27017:27017 environment: MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: example \ No newline at end of file + MONGO_INITDB_ROOT_PASSWORD: example diff --git a/fixtures/mysql/docker-compose.yml b/fixtures/mysql/docker-compose.yml index 9649218094ab..ec2ae9abb190 100644 --- a/fixtures/mysql/docker-compose.yml +++ b/fixtures/mysql/docker-compose.yml @@ -27,8 +27,8 @@ services: - MYSQL_ROOT_PASSWORD=password - MYSQL_DATABASE=testdb volumes: - - ./init.sql:/docker-entrypoint-initdb.d/init.sql + - ./init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: - test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] + test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] timeout: 20s - retries: 10 \ No newline at end of file + retries: 10 diff --git a/fixtures/postgresql/docker-compose.yml b/fixtures/postgresql/docker-compose.yml index acf4f11718a7..684a8955c4a2 100644 --- a/fixtures/postgresql/docker-compose.yml +++ b/fixtures/postgresql/docker-compose.yml @@ -27,7 +27,7 @@ services: - POSTGRES_USER=user - POSTGRES_DB=testdb volumes: - - ./init.sql:/docker-entrypoint-initdb.d/init.sql + - ./init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: test: ["CMD-SHELL", "sh -c 'pg_isready -U user -d testdb'"] interval: 3s diff --git a/fixtures/redis/docker-compose-redis-cluster-tls.yml b/fixtures/redis/docker-compose-redis-cluster-tls.yml index cb6333aba7b5..04f10033275e 100644 --- a/fixtures/redis/docker-compose-redis-cluster-tls.yml +++ b/fixtures/redis/docker-compose-redis-cluster-tls.yml @@ -140,6 +140,5 @@ networks: driver: bridge ipam: config: - - - subnet: 172.30.0.0/16 + - subnet: 172.30.0.0/16 gateway: 172.30.0.1