未验证 提交 a4c68d30 编写于 作者: K kezhenxu94 提交者: GitHub

test: fix that E2E is not run, also add ElasticSearch 7.15 to test matrix (#7826)

上级 4c95f07a
......@@ -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::"
......@@ -82,6 +82,7 @@ jobs:
if: env.SKIP_CI != 'true' && matrix.os != 'ubuntu'
run: ./mvnw -q --batch-mode -P"backend,ui,dist" clean verify install
- uses: actions/upload-artifact@v2
if: env.SKIP_CI != 'true' && matrix.os == 'ubuntu' && matrix.java-version == '8'
name: Upload Agent
with:
name: dist
......
......@@ -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() }}
......
......@@ -39,9 +39,17 @@ jobs:
timeout-minutes: 90
strategy:
matrix:
storage: ['h2', 'mysql', 'es6', 'es7', 'influxdb']
storage: ['h2', 'mysql', 'es', 'influxdb']
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:
......
......@@ -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:
......
......@@ -6,7 +6,8 @@ Release Notes.
------------------
#### OAP Server
* Fix wrong (de)serializer of ElasticSearch client for OpenSearch storage.
* Fix that traces query with tags will report error.
#### UI
......
......@@ -77,6 +77,11 @@
<outputDirectory>oap-libs</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/target/skywalking-tools-exporter-assembly/skywalking-tools-exporter/libs</directory>
<outputDirectory>oap-libs</outputDirectory>
</fileSet>
<!-- Profile exporter tools -->
<fileSet>
<directory>${project.basedir}/../tools/profile-exporter</directory>
......
......@@ -43,7 +43,7 @@ public final class ElasticSearchVersion {
if (distribution.equalsIgnoreCase("OpenSearch")) {
requestFactory = new V78RequestFactory(this);
codec = V7Codec.INSTANCE;
codec = V78Codec.INSTANCE;
return;
}
......
......@@ -52,23 +52,54 @@ import static org.junit.Assert.assertTrue;
public class ITElasticSearchTest {
@Parameterized.Parameters(name = "version: {0}")
public static Collection<Object[]> versions() {
public static Collection<Object[]> es() {
return Arrays.asList(new Object[][] {
{"6.3.2"}, {"7.4.2"}, {"7.8.0"}, {"7.10.2"}
{
"ElasticSearch 6.3.2",
new ElasticsearchContainer(
DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
.withTag("6.3.2"))
},
{
"ElasticSearch 7.4.2",
new ElasticsearchContainer(
DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
.withTag("7.4.2"))
},
{
"ElasticSearch 7.8.0",
new ElasticsearchContainer(
DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
.withTag("7.8.0"))
},
{
"ElasticSearch 7.15.0",
new ElasticsearchContainer(
DockerImageName.parse("elastic/elasticsearch")
.withTag("7.15.0")
.asCompatibleSubstituteFor(
"docker.elastic.co/elasticsearch/elasticsearch-oss"))
},
{
"OpenSearch 1.0.0",
new ElasticsearchContainer(
DockerImageName.parse("opensearchproject/opensearch")
.withTag("1.0.0")
.asCompatibleSubstituteFor(
"docker.elastic.co/elasticsearch/elasticsearch-oss"))
.withEnv("plugins.security.disabled", "true")
}
});
}
private final String version;
private ElasticsearchContainer server;
@Parameterized.Parameter
public String ignored;
@Parameterized.Parameter(1)
public ElasticsearchContainer server;
private ElasticSearch client;
@Before
public void setup() {
server = new ElasticsearchContainer(
DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss")
.withTag(version)
);
server.start();
client = ElasticSearch.builder()
......
......@@ -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);
......
......@@ -33,6 +33,5 @@
<module>tool-profile-snapshot-server-mock</module>
<module>tool-profile-snapshot-bootstrap</module>
<module>tool-profile-snapshot-exporter</module>
<module>tool-profile-snapshot-exporter-es</module>
</modules>
</project>
......@@ -42,19 +42,6 @@
<version>${project.version}</version>
</dependency>
<!-- core module -->
<!-- storage module -->
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>storage-jdbc-hikaricp-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>storage-influxdb-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<!-- storage module -->
</dependencies>
</project>
/*
* 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.
*
*/
package org.apache.skywalking.oap.server.tool.profile.exporter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class ProfileSnapshotExporter {
public static void main(String[] args) {
ProfileSnapshotExporterBootstrap.export(args);
}
}
......@@ -34,11 +34,29 @@
<artifactId>tool-profile-snapshot-bootstrap</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>storage-elasticsearch-plugin</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>skywalking-tools-exporter</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
......@@ -17,23 +16,18 @@
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>profile-exporter</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>8.9.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tool-profile-snapshot-exporter-es7</artifactId>
<version>8.9.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>tool-profile-snapshot-bootstrap</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>assembly</id>
<formats>
<format>dir</format>
</formats>
<dependencySets>
<dependencySet>
<outputDirectory>/libs</outputDirectory>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>
......@@ -25,7 +25,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.skywalking</groupId>
<artifactId>tool-profile-snapshot-server-mock</artifactId>
<version>8.9.0-SNAPSHOT</version>
......@@ -37,4 +36,4 @@
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
......@@ -70,11 +70,15 @@
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
......
# 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.
FROM golang:1.14 AS builder
ARG COMMIT_HASH=ae085deb32434a0859e49c45819fed7a5c4010b5
ARG CLI_CODE=${COMMIT_HASH}.tar.gz
ARG CLI_CODE_URL=https://github.com/apache/skywalking-cli/archive/${CLI_CODE}
ENV CGO_ENABLED=0
ENV GO111MODULE=on
WORKDIR /cli
ADD ${CLI_CODE_URL} .
RUN tar -xf ${CLI_CODE} --strip 1
RUN rm ${CLI_CODE}
RUN make build && mv bin/swctl-latest-linux-amd64 /swctl
ENTRYPOINT [ "/swctl" ]
......@@ -25,9 +25,7 @@ services:
condition: service_healthy
cli:
build:
context: .
dockerfile: ../Dockerfile.cli
image: ghcr.io/apache/skywalking-cli/skywalking-cli:401e0e5671a3fb49de1d1e1e89f5b693b2062867
networks:
- e2e
entrypoint:
......
......@@ -17,7 +17,7 @@ version: '2.1'
services:
es:
image: elastic/elasticsearch:7.4.2
image: elastic/elasticsearch:${ES_VERSION}
expose:
- 9200
networks:
......
# 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
depends_on:
es:
condition: service_healthy
networks:
e2e:
......@@ -17,7 +17,7 @@ version: '2.1'
services:
es:
image: elastic/elasticsearch:6.3.2
image: elastic/elasticsearch:${ES_VERSION}
expose:
- 9200
networks:
......
# 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:
# 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.10.1
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:
# 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:
......@@ -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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册