You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/09/28 07:52:54 UTC

[skywalking] branch es updated (427312d -> a5aba6a)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch es
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


 discard 427312d  Add ElasticSearch 7.15 to test matrix
     new a5aba6a  test: fix that E2E is not run, also add ElasticSearch 7.15 to test matrix

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (427312d)
            \
             N -- N -- N   refs/heads/es (a5aba6a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/e2e.storages.yaml | 3 ---
 1 file changed, 3 deletions(-)

[skywalking] 01/01: test: fix that E2E is not run, also add ElasticSearch 7.15 to test matrix

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch es
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit a5aba6a3bd7b516b78f3df83b29a726f43eee8a9
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Tue Sep 28 13:34:33 2021 +0800

    test: fix that E2E is not run, also add ElasticSearch 7.15 to test matrix
---
 .github/actions/e2e-test/action.yml                |  5 ++-
 .github/workflows/e2e.istio.yaml                   |  6 ++-
 .github/workflows/e2e.storages.yaml                | 10 ++++-
 .../elasticsearch/ElasticSearchVersion.java        |  2 +-
 .../library/elasticsearch/ITElasticSearchTest.java | 34 ++++++++++++----
 .../elasticsearch/query/TraceQueryEsDAO.java       |  2 +-
 ...er-compose.es7.10.yml => docker-compose.es.yml} |  2 +-
 .../e2e-test/docker/storage/docker-compose.es6.yml | 47 ----------------------
 .../docker/storage/docker-compose.es7.0.yml        | 47 ----------------------
 .../docker/storage/docker-compose.es7.14.yml       | 47 ----------------------
 test/e2e/pom.xml                                   |  6 +++
 11 files changed, 52 insertions(+), 156 deletions(-)

diff --git a/.github/actions/e2e-test/action.yml b/.github/actions/e2e-test/action.yml
index 45aaa5c..8c3faab 100644
--- a/.github/actions/e2e-test/action.yml
+++ b/.github/actions/e2e-test/action.yml
@@ -46,6 +46,9 @@ runs:
     - name: Run E2E Test
       shell: bash
       run: |
+        echo "::group::Build E2E Test Modules"
+        ./mvnw -q -B -f test/e2e/pom.xml clean install
+        echo "::endgroup::"
         echo "::group::Run E2E Test ${{ inputs.test_class }}"
-        ./mvnw --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false verify -Dit.test=${{ inputs.test_class }}
+        ./mvnw -q --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false test -Dtest=${{ inputs.test_class }}
         echo "::endgroup::"
diff --git a/.github/workflows/e2e.istio.yaml b/.github/workflows/e2e.istio.yaml
index e864949..9ea4c0e 100644
--- a/.github/workflows/e2e.istio.yaml
+++ b/.github/workflows/e2e.istio.yaml
@@ -144,7 +144,8 @@ jobs:
           export WEBAPP_HOST=127.0.0.1
           export WEBAPP_PORT=8080
 
-          ./mvnw -q --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false verify -Dit.test=org.apache.skywalking.e2e.mesh.ALSE2E
+          ./mvnw -q -B -f test/e2e/pom.xml clean install
+          ./mvnw -q --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false test -Dtest=org.apache.skywalking.e2e.mesh.ALSE2E
 
       - name: Logs
         if: ${{ failure() }}
@@ -271,7 +272,8 @@ jobs:
           export WEBAPP_HOST=127.0.0.1
           export WEBAPP_PORT=8080
 
-          ./mvnw -q --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false verify -Dit.test=org.apache.skywalking.e2e.mesh.MetricsServiceE2E
+          ./mvnw -q -B -f test/e2e/pom.xml clean install
+          ./mvnw -q --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false test -Dtest=org.apache.skywalking.e2e.mesh.MetricsServiceE2E
 
       - name: Logs
         if: ${{ failure() }}
diff --git a/.github/workflows/e2e.storages.yaml b/.github/workflows/e2e.storages.yaml
index ea4ba9c..3ff68f6 100644
--- a/.github/workflows/e2e.storages.yaml
+++ b/.github/workflows/e2e.storages.yaml
@@ -36,9 +36,17 @@ jobs:
     timeout-minutes: 90
     strategy:
       matrix:
-        storage: ['mysql', 'es6', 'es7.0', 'es7.10', 'es7.14', 'opensearch', 'influxdb', 'tidb', 'postgresql']
+        storage: ['mysql', 'influxdb', 'tidb', 'postgresql'] #opensearch
+        include:
+          - { storage: es, es-version: 6.3.2 }
+          - { storage: es, es-version: 7.0.0 }
+          - { storage: es, es-version: 7.8.0 }
+          - { storage: es, es-version: 7.10.1 }
+          - { storage: es, es-version: 7.14.0 }
+          - { storage: es, es-version: 7.15.0 }
     env:
       SW_STORAGE: ${{ matrix.storage }}
+      ES_VERSION: ${{ matrix.es-version }}
     steps:
       - uses: actions/checkout@v2
         with:
diff --git a/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearchVersion.java b/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearchVersion.java
index 80af3dc..5e78d34 100644
--- a/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearchVersion.java
+++ b/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearchVersion.java
@@ -43,7 +43,7 @@ public final class ElasticSearchVersion {
 
         if (distribution.equalsIgnoreCase("OpenSearch")) {
             requestFactory = new V78RequestFactory(this);
-            codec = V7Codec.INSTANCE;
+            codec = V78Codec.INSTANCE;
             return;
         }
 
diff --git a/oap-server/server-library/library-elasticsearch-client/src/test/java/org/apache/skywalking/library/elasticsearch/ITElasticSearchTest.java b/oap-server/server-library/library-elasticsearch-client/src/test/java/org/apache/skywalking/library/elasticsearch/ITElasticSearchTest.java
index 82ab79c..0a7a6fe 100644
--- a/oap-server/server-library/library-elasticsearch-client/src/test/java/org/apache/skywalking/library/elasticsearch/ITElasticSearchTest.java
+++ b/oap-server/server-library/library-elasticsearch-client/src/test/java/org/apache/skywalking/library/elasticsearch/ITElasticSearchTest.java
@@ -52,23 +52,41 @@ import static org.junit.Assert.assertTrue;
 public class ITElasticSearchTest {
 
     @Parameterized.Parameters(name = "version: {0}")
-    public static Collection<Object[]> versions() {
-        return Arrays.asList(new Object[][] {
-            {"6.3.2"}, {"7.4.2"}, {"7.8.0"}, {"7.10.2"}
+    public static Collection<DockerImageName[]> versions() {
+        return Arrays.asList(new DockerImageName[][] {
+            {
+                DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
+                    .withTag("6.3.2")
+            },
+            {
+                DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
+                    .withTag("7.4.2")
+            },
+            {
+                DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
+                    .withTag("7.8.0")
+            },
+            {
+                DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
+                    .withTag("7.15.0")
+            },
+            {
+                DockerImageName.parse("opensearchproject/opensearch").withTag("1.0.0")
+                    .asCompatibleSubstituteFor("docker.elastic.co/elasticsearch/elasticsearch-oss")
+            }
         });
     }
 
-    private final String version;
+    private final DockerImageName version;
 
     private ElasticsearchContainer server;
     private ElasticSearch client;
 
     @Before
     public void setup() {
-        server = new ElasticsearchContainer(
-            DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
-                           .withTag(version)
-        );
+        server = new ElasticsearchContainer(version)
+            .withEnv("plugins.security.disabled", "true") // Takes effect in OpenSearch
+        ;
         server.start();
 
         client = ElasticSearch.builder()
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java
index 6157645..b4972fb 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TraceQueryEsDAO.java
@@ -121,7 +121,7 @@ public class TraceQueryEsDAO extends EsDAO implements ITraceQueryDAO {
         }
         if (CollectionUtils.isNotEmpty(tags)) {
             BoolQueryBuilder tagMatchQuery = Query.bool();
-            tags.forEach(tag -> tagMatchQuery.must(Query.term(SegmentRecord.TAGS, tag)));
+            tags.forEach(tag -> tagMatchQuery.must(Query.term(SegmentRecord.TAGS, tag.toString())));
             query.must(tagMatchQuery);
         }
         search.size(limit).from(from);
diff --git a/test/e2e/e2e-test/docker/storage/docker-compose.es7.10.yml b/test/e2e/e2e-test/docker/storage/docker-compose.es.yml
similarity index 96%
rename from test/e2e/e2e-test/docker/storage/docker-compose.es7.10.yml
rename to test/e2e/e2e-test/docker/storage/docker-compose.es.yml
index 8e4384e..c416695 100644
--- a/test/e2e/e2e-test/docker/storage/docker-compose.es7.10.yml
+++ b/test/e2e/e2e-test/docker/storage/docker-compose.es.yml
@@ -17,7 +17,7 @@ version: '2.1'
 
 services:
   es:
-    image: elastic/elasticsearch:7.10.1
+    image: elastic/elasticsearch:${ES_VERSION}
     expose:
       - 9200
     networks:
diff --git a/test/e2e/e2e-test/docker/storage/docker-compose.es6.yml b/test/e2e/e2e-test/docker/storage/docker-compose.es6.yml
deleted file mode 100644
index 9cc21be..0000000
--- a/test/e2e/e2e-test/docker/storage/docker-compose.es6.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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.
-
-version: '2.1'
-
-services:
-  es:
-    image: elastic/elasticsearch:6.3.2
-    expose:
-      - 9200
-    networks:
-      - e2e
-    environment:
-      - discovery.type=single-node
-      - cluster.routing.allocation.disk.threshold_enabled=false
-    healthcheck:
-      test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9200"]
-      interval: 5s
-      timeout: 60s
-      retries: 120
-
-  oap:
-    extends:
-      file: ../base-compose.yml
-      service: oap
-    environment:
-      SW_STORAGE: elasticsearch
-      SW_PROMETHEUS_FETCHER: "default"
-      SW_TELEMETRY: prometheus
-    depends_on:
-      es:
-        condition: service_healthy
-
-networks:
-  e2e:
diff --git a/test/e2e/e2e-test/docker/storage/docker-compose.es7.0.yml b/test/e2e/e2e-test/docker/storage/docker-compose.es7.0.yml
deleted file mode 100644
index 2702f08..0000000
--- a/test/e2e/e2e-test/docker/storage/docker-compose.es7.0.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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.
-
-version: '2.1'
-
-services:
-  es:
-    image: elastic/elasticsearch:7.0.0
-    expose:
-      - 9200
-    networks:
-      - e2e
-    environment:
-      - discovery.type=single-node
-      - cluster.routing.allocation.disk.threshold_enabled=false
-    healthcheck:
-      test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9200"]
-      interval: 5s
-      timeout: 60s
-      retries: 120
-
-  oap:
-    extends:
-      file: ../base-compose.yml
-      service: oap
-    environment:
-      SW_STORAGE: elasticsearch
-      SW_PROMETHEUS_FETCHER: "default"
-      SW_TELEMETRY: prometheus
-    depends_on:
-      es:
-        condition: service_healthy
-
-networks:
-  e2e:
diff --git a/test/e2e/e2e-test/docker/storage/docker-compose.es7.14.yml b/test/e2e/e2e-test/docker/storage/docker-compose.es7.14.yml
deleted file mode 100644
index 53ce509..0000000
--- a/test/e2e/e2e-test/docker/storage/docker-compose.es7.14.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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.
-
-version: '2.1'
-
-services:
-  es:
-    image: elastic/elasticsearch:7.14.0
-    expose:
-      - 9200
-    networks:
-      - e2e
-    environment:
-      - discovery.type=single-node
-      - cluster.routing.allocation.disk.threshold_enabled=false
-    healthcheck:
-      test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9200"]
-      interval: 5s
-      timeout: 60s
-      retries: 120
-
-  oap:
-    extends:
-      file: ../base-compose.yml
-      service: oap
-    environment:
-      SW_STORAGE: elasticsearch
-      SW_PROMETHEUS_FETCHER: "default"
-      SW_TELEMETRY: prometheus
-    depends_on:
-      es:
-        condition: service_healthy
-
-networks:
-  e2e:
diff --git a/test/e2e/pom.xml b/test/e2e/pom.xml
index 3b7f234..825db98 100644
--- a/test/e2e/pom.xml
+++ b/test/e2e/pom.xml
@@ -58,6 +58,7 @@
         <maven-failsafe-plugin.version>2.22.0</maven-failsafe-plugin.version>
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
+        <maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
 
         <testcontainers.version>1.15.3</testcontainers.version>
     </properties>
@@ -191,6 +192,11 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${maven-surefire-plugin.version}</version>
+            </plugin>
         </plugins>
     </build>