You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "G-XD (via GitHub)" <gi...@apache.org> on 2023/07/26 11:56:28 UTC
[GitHub] [incubator-opendal] G-XD opened a new pull request, #2719: test(services/etcd): add etcd integration test
G-XD opened a new pull request, #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #2719: test(services/etcd): add etcd integration test
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719#discussion_r1275062230
##########
core/src/services/etcd/backend.rs:
##########
@@ -303,22 +302,6 @@ impl kv::Adapter for Adapter {
let _ = client.delete(p, None).await?;
Ok(())
}
-
- async fn scan(&self, path: &str) -> Result<Vec<String>> {
Review Comment:
It's acceptable to raise an issue to track a failure case, fix it at a later time, and remove it for the time being.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] dqhl76 commented on a diff in pull request #2719: test(services/etcd): add etcd integration test
Posted by "dqhl76 (via GitHub)" <gi...@apache.org>.
dqhl76 commented on code in PR #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719#discussion_r1275031502
##########
.github/workflows/service_test_etcd.yml:
##########
@@ -0,0 +1,322 @@
+# 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.
+
+name: Service Test Etcd
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+ paths:
+ - "core/src/**"
+ - "core/tests/**"
+ - "!core/src/docs/**"
+ - "!core/src/services/**"
+ - "core/src/services/etcd/**"
+ - ".github/workflows/service_test_etcd.yml"
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+ cancel-in-progress: true
+
+jobs:
+ etcd-cluster:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Configure Etcd Service
+ # ETCD will use ports: 23790,23791,23792,23800,23801,23802
+ run: |
+ docker network create -d bridge etcd-net
+ docker run -d \
+ -p 23790:2379 \
+ -p 23800:2380 \
+ --network etcd-net \
+ --name etcd1 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd1 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd1:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd1:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
Review Comment:
may be we can use Github Action [service](https://docs.github.com/en/actions/using-containerized-services/about-service-containers) to run the etcd instead of `docker run`. It is easier to understand
```
services:
etcd:
image: bitnami/etcd
ports:
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] Xuanwo merged pull request #2719: test(services/etcd): add etcd integration test
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] G-XD commented on a diff in pull request #2719: test(services/etcd): add etcd integration test
Posted by "G-XD (via GitHub)" <gi...@apache.org>.
G-XD commented on code in PR #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719#discussion_r1274998173
##########
core/src/services/etcd/backend.rs:
##########
@@ -303,22 +302,6 @@ impl kv::Adapter for Adapter {
let _ = client.delete(p, None).await?;
Ok(())
}
-
- async fn scan(&self, path: &str) -> Result<Vec<String>> {
Review Comment:
Because the integration test could not pass. I tried to fix it but failed, can you give me some suggestions?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] oowl commented on a diff in pull request #2719: test(services/etcd): add etcd integration test
Posted by "oowl (via GitHub)" <gi...@apache.org>.
oowl commented on code in PR #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719#discussion_r1274959676
##########
core/src/services/etcd/backend.rs:
##########
@@ -303,22 +302,6 @@ impl kv::Adapter for Adapter {
let _ = client.delete(p, None).await?;
Ok(())
}
-
- async fn scan(&self, path: &str) -> Result<Vec<String>> {
Review Comment:
why do you delete `scan` function?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #2719: test(services/etcd): add etcd integration test
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #2719:
URL: https://github.com/apache/incubator-opendal/pull/2719#discussion_r1275071189
##########
.github/workflows/service_test_etcd.yml:
##########
@@ -0,0 +1,322 @@
+# 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.
+
+name: Service Test Etcd
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+ paths:
+ - "core/src/**"
+ - "core/tests/**"
+ - "!core/src/docs/**"
+ - "!core/src/services/**"
+ - "core/src/services/etcd/**"
+ - ".github/workflows/service_test_etcd.yml"
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+ cancel-in-progress: true
+
+jobs:
+ etcd-cluster:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Configure Etcd Service
+ # ETCD will use ports: 23790,23791,23792,23800,23801,23802
+ run: |
+ docker network create -d bridge etcd-net
Review Comment:
I suggest starting with a single node to verify our implementation before extending it to an etcd cluster.
##########
.github/workflows/service_test_etcd.yml:
##########
@@ -0,0 +1,322 @@
+# 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.
+
+name: Service Test Etcd
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+ paths:
+ - "core/src/**"
+ - "core/tests/**"
+ - "!core/src/docs/**"
+ - "!core/src/services/**"
+ - "core/src/services/etcd/**"
+ - ".github/workflows/service_test_etcd.yml"
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+ cancel-in-progress: true
+
+jobs:
+ etcd-cluster:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Configure Etcd Service
+ # ETCD will use ports: 23790,23791,23792,23800,23801,23802
+ run: |
+ docker network create -d bridge etcd-net
+ docker run -d \
+ -p 23790:2379 \
+ -p 23800:2380 \
+ --network etcd-net \
+ --name etcd1 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd1 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd1:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd1:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
+
+ docker run -d \
+ -p 23791:2379 \
+ -p 23801:2380 \
+ --network etcd-net \
+ --name etcd2 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd2 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd2:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd2:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
+
+ docker run -d \
+ -p 23792:2379 \
+ -p 23802:2380 \
+ --network etcd-net \
+ --name etcd3 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd3 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd3:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd3:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
+ - name: Setup Rust toolchain
+ uses: ./.github/actions/setup
+ with:
+ need-protoc: true
+ need-nextest: true
+ - name: Test
+ shell: bash
+ working-directory: core
+ run: cargo nextest run etcd --features services-etcd
+ env:
+ OPENDAL_ETCD_TEST: on
+ 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
+
+ etcd-cluster-tls:
Review Comment:
TLS setup is complex, it's better to make sure the plain etcd works first.
##########
.github/workflows/service_test_etcd.yml:
##########
@@ -0,0 +1,322 @@
+# 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.
+
+name: Service Test Etcd
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+ paths:
+ - "core/src/**"
+ - "core/tests/**"
+ - "!core/src/docs/**"
+ - "!core/src/services/**"
+ - "core/src/services/etcd/**"
+ - ".github/workflows/service_test_etcd.yml"
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+ cancel-in-progress: true
+
+jobs:
+ etcd-cluster:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Configure Etcd Service
+ # ETCD will use ports: 23790,23791,23792,23800,23801,23802
+ run: |
+ docker network create -d bridge etcd-net
+ docker run -d \
+ -p 23790:2379 \
+ -p 23800:2380 \
+ --network etcd-net \
+ --name etcd1 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd1 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd1:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd1:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
+
+ docker run -d \
+ -p 23791:2379 \
+ -p 23801:2380 \
+ --network etcd-net \
+ --name etcd2 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd2 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd2:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd2:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
+
+ docker run -d \
+ -p 23792:2379 \
+ -p 23802:2380 \
+ --network etcd-net \
+ --name etcd3 \
+ -e ALLOW_NONE_AUTHENTICATION=yes \
+ -e ETCD_NAME=etcd3 \
+ -e ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd3:2380 \
+ -e ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 \
+ -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
+ -e ETCD_ADVERTISE_CLIENT_URLS=http://etcd3:2379 \
+ -e ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster \
+ -e ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380 \
+ -e ETCD_INITIAL_CLUSTER_STATE=new \
+ -e ETCD_MAX_REQUEST_BYTES=10485760 \
+ bitnami/etcd:latest
+ - name: Setup Rust toolchain
+ uses: ./.github/actions/setup
+ with:
+ need-protoc: true
+ need-nextest: true
+ - name: Test
+ shell: bash
+ working-directory: core
+ run: cargo nextest run etcd --features services-etcd
+ env:
+ OPENDAL_ETCD_TEST: on
+ 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
+
+ etcd-cluster-tls:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Configure Etcd Service With TLS
+ # ETCD will use ports: 23790,23791,23792,23800,23801,23802
+ run: |
+ # Install cfssl & cfssljson
+ mkdir ~/bin
+ curl -s -L -o ~/bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
+ curl -s -L -o ~/bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64
+ chmod +x ~/bin/{cfssl,cfssljson}
+
+ # Create ca
Review Comment:
It's better to place those file in `services/etcd/fixtures` like `webdav` so other developers can start test locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org