Skip to content

Commit f41c17f

Browse files
committed
fix attach event
1 parent 87709be commit f41c17f

File tree

4 files changed

+113
-115
lines changed

4 files changed

+113
-115
lines changed

.github/workflows/skywalking.yaml

Lines changed: 104 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -962,110 +962,110 @@ jobs:
962962
with:
963963
e2e-file: $GITHUB_WORKSPACE/test/e2e-v2/cases/simple/jdk/e2e.yaml
964964

965-
e2e-test-banyandb-stages:
966-
if: |
967-
( always() && ! cancelled() ) &&
968-
((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
969-
name: E2E test
970-
needs: [docker, dist-tar]
971-
runs-on: ${{ matrix.test.runs-on || 'ubuntu-latest' }}
972-
timeout-minutes: 60
973-
env:
974-
BANYANDB_DATA_GENERATE_ROOT: test/e2e-v2/cases/storage/banyandb/data-generate
975-
strategy:
976-
fail-fast: false
977-
matrix:
978-
test:
979-
- name: BanyanDB Stages
980-
config: test/e2e-v2/cases/storage/banyandb/stages/e2e.yaml
981-
steps:
982-
- uses: actions/checkout@v4
983-
with:
984-
submodules: true
985-
persist-credentials: false
986-
- run: grep -v '^#' test/e2e-v2/script/env >> "$GITHUB_ENV"
987-
- uses: apache/skywalking-cli/actions/setup@master
988-
with:
989-
version: ${{ env.SW_CTL_COMMIT }}
990-
- uses: actions/download-artifact@v4
991-
name: Download docker images
992-
with:
993-
name: docker-images-11
994-
path: docker-images
995-
- name: Load docker images
996-
run: |
997-
find docker-images -name "*.tar" -exec docker load -i {} \;
998-
find docker-images -name "*.tar" -exec rm {} \;
999-
- uses: actions/download-artifact@v4
1000-
name: Download distribution tar
1001-
with:
1002-
name: dist
1003-
path: dist
1004-
- name: Login to ghcr
1005-
uses: docker/login-action@v3
1006-
with:
1007-
registry: ghcr.io
1008-
username: ${{ github.repository_owner }}
1009-
password: ${{ secrets.GITHUB_TOKEN }}
1010-
- name: Cache maven repository
1011-
uses: actions/cache@v4
1012-
with:
1013-
path: ~/.m2/repository
1014-
key: ${{ runner.os }}-maven-${{ hashFiles('test/e2e-v2/java-test-service/**/pom.xml') }}
1015-
restore-keys: ${{ runner.os }}-maven-
1016-
- name: Prepare test services
1017-
shell: bash
1018-
run: ./mvnw -B -q -f test/e2e-v2/java-test-service/pom.xml clean flatten:flatten package
1019-
- name: Set env var
1020-
run: |
1021-
echo "${{ matrix.test.env }}" >> $GITHUB_ENV
1022-
- name: Build test image
1023-
if: matrix.test.docker != null
1024-
run: docker build -t ${{ matrix.test.docker.name }} -f ${{ matrix.test.docker.base }}/${{ matrix.test.docker.file }} ${{ matrix.test.docker.base }}
1025-
- name: Generate BanyanDB cold data
1026-
run: |
1027-
export $(grep -v '^#' test/e2e-v2/script/env | xargs)
1028-
docker compose -f ${BANYANDB_DATA_GENERATE_ROOT}/docker-compose.yml up -d
1029-
CONTAINER_ID=$(docker compose -f ${BANYANDB_DATA_GENERATE_ROOT}/docker-compose.yml ps -q banyandb)
1030-
echo "⌛ monitoring segment files..."
1031-
found=false
1032-
for i in {1..60}; do
1033-
# check if segment files exist
1034-
if docker exec $CONTAINER_ID sh -c '[ -n "$(ls /tmp/measure-data/measure/data/metricsDay/seg* 2>/dev/null)" ]'; then
1035-
echo "✅ found segment files"
1036-
sleep 180
1037-
# create and copy files
1038-
docker cp $CONTAINER_ID:/tmp ${BANYANDB_DATA_GENERATE_ROOT}
1039-
docker cp $CONTAINER_ID:/tmp/measure-data/measure/data/metadata ${BANYANDB_DATA_GENERATE_ROOT}
1040-
found=true
1041-
break
1042-
else
1043-
echo "⏳ didn't find segment files (retry $i/60)"
1044-
sleep 10
1045-
fi
1046-
done
1047-
if $found; then
1048-
echo "✅ segment files copied to ${BANYANDB_DATA_GENERATE_ROOT}"
1049-
else
1050-
echo "❌ segment files not found"
1051-
exit 1
1052-
fi
1053-
docker compose -f ${BANYANDB_DATA_GENERATE_ROOT}/docker-compose.yml down -v
1054-
- name: ${{ matrix.test.name }}
1055-
uses: apache/skywalking-infra-e2e@cf589b4a0b9f8e6f436f78e9cfd94a1ee5494180
1056-
with:
1057-
e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
1058-
- if: ${{ failure() }}
1059-
run: |
1060-
df -h
1061-
du -sh .
1062-
docker images
1063-
- uses: actions/upload-artifact@v4
1064-
if: ${{ failure() }}
1065-
name: Upload Logs
1066-
with:
1067-
name: test-logs-${{ matrix.test.name }}
1068-
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
965+
# e2e-test-banyandb-stages:
966+
# if: |
967+
# ( always() && ! cancelled() ) &&
968+
# ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
969+
# name: E2E test
970+
# needs: [docker, dist-tar]
971+
# runs-on: ${{ matrix.test.runs-on || 'ubuntu-latest' }}
972+
# timeout-minutes: 60
973+
# env:
974+
# BANYANDB_DATA_GENERATE_ROOT: test/e2e-v2/cases/storage/banyandb/data-generate
975+
# strategy:
976+
# fail-fast: false
977+
# matrix:
978+
# test:
979+
# - name: BanyanDB Stages
980+
# config: test/e2e-v2/cases/storage/banyandb/stages/e2e.yaml
981+
# steps:
982+
# - uses: actions/checkout@v4
983+
# with:
984+
# submodules: true
985+
# persist-credentials: false
986+
# - run: grep -v '^#' test/e2e-v2/script/env >> "$GITHUB_ENV"
987+
# - uses: apache/skywalking-cli/actions/setup@master
988+
# with:
989+
# version: ${{ env.SW_CTL_COMMIT }}
990+
# - uses: actions/download-artifact@v4
991+
# name: Download docker images
992+
# with:
993+
# name: docker-images-11
994+
# path: docker-images
995+
# - name: Load docker images
996+
# run: |
997+
# find docker-images -name "*.tar" -exec docker load -i {} \;
998+
# find docker-images -name "*.tar" -exec rm {} \;
999+
# - uses: actions/download-artifact@v4
1000+
# name: Download distribution tar
1001+
# with:
1002+
# name: dist
1003+
# path: dist
1004+
# - name: Login to ghcr
1005+
# uses: docker/login-action@v3
1006+
# with:
1007+
# registry: ghcr.io
1008+
# username: ${{ github.repository_owner }}
1009+
# password: ${{ secrets.GITHUB_TOKEN }}
1010+
# - name: Cache maven repository
1011+
# uses: actions/cache@v4
1012+
# with:
1013+
# path: ~/.m2/repository
1014+
# key: ${{ runner.os }}-maven-${{ hashFiles('test/e2e-v2/java-test-service/**/pom.xml') }}
1015+
# restore-keys: ${{ runner.os }}-maven-
1016+
# - name: Prepare test services
1017+
# shell: bash
1018+
# run: ./mvnw -B -q -f test/e2e-v2/java-test-service/pom.xml clean flatten:flatten package
1019+
# - name: Set env var
1020+
# run: |
1021+
# echo "${{ matrix.test.env }}" >> $GITHUB_ENV
1022+
# - name: Build test image
1023+
# if: matrix.test.docker != null
1024+
# run: docker build -t ${{ matrix.test.docker.name }} -f ${{ matrix.test.docker.base }}/${{ matrix.test.docker.file }} ${{ matrix.test.docker.base }}
1025+
# - name: Generate BanyanDB cold data
1026+
# run: |
1027+
# export $(grep -v '^#' test/e2e-v2/script/env | xargs)
1028+
# docker compose -f ${BANYANDB_DATA_GENERATE_ROOT}/docker-compose.yml up -d
1029+
# CONTAINER_ID=$(docker compose -f ${BANYANDB_DATA_GENERATE_ROOT}/docker-compose.yml ps -q banyandb)
1030+
# echo "⌛ monitoring segment files..."
1031+
# found=false
1032+
# for i in {1..60}; do
1033+
# # check if segment files exist
1034+
# if docker exec $CONTAINER_ID sh -c '[ -n "$(ls /tmp/measure-data/measure/data/metricsDay/seg* 2>/dev/null)" ]'; then
1035+
# echo "✅ found segment files"
1036+
# sleep 180
1037+
# # create and copy files
1038+
# docker cp $CONTAINER_ID:/tmp ${BANYANDB_DATA_GENERATE_ROOT}
1039+
# docker cp $CONTAINER_ID:/tmp/measure-data/measure/data/metadata ${BANYANDB_DATA_GENERATE_ROOT}
1040+
# found=true
1041+
# break
1042+
# else
1043+
# echo "⏳ didn't find segment files (retry $i/60)"
1044+
# sleep 10
1045+
# fi
1046+
# done
1047+
# if $found; then
1048+
# echo "✅ segment files copied to ${BANYANDB_DATA_GENERATE_ROOT}"
1049+
# else
1050+
# echo "❌ segment files not found"
1051+
# exit 1
1052+
# fi
1053+
# docker compose -f ${BANYANDB_DATA_GENERATE_ROOT}/docker-compose.yml down -v
1054+
# - name: ${{ matrix.test.name }}
1055+
# uses: apache/skywalking-infra-e2e@cf589b4a0b9f8e6f436f78e9cfd94a1ee5494180
1056+
# with:
1057+
# e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
1058+
# - if: ${{ failure() }}
1059+
# run: |
1060+
# df -h
1061+
# du -sh .
1062+
# docker images
1063+
# - uses: actions/upload-artifact@v4
1064+
# if: ${{ failure() }}
1065+
# name: Upload Logs
1066+
# with:
1067+
# name: test-logs-${{ matrix.test.name }}
1068+
# path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
10691069

10701070
required:
10711071
if: always()

dist-material/release-docs/LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ The text of each license is the standard Apache 2.0 license.
254254
https://mvnrepository.com/artifact/commons-codec/commons-codec/1.11 Apache-2.0
255255
https://mvnrepository.com/artifact/commons-io/commons-io/2.17.0 Apache-2.0
256256
https://mvnrepository.com/artifact/commons-net/commons-net/3.9.0 Apache-2.0
257-
https://mvnrepository.com/artifact/commons-validator/commons-validator/1.7 Apache-2.0
257+
https://mvnrepository.com/artifact/commons-validator/commons-validator/1.9 Apache-2.0
258258
https://npmjs.com/package/d3-flame-graph/v/4.1.3 4.1.3 Apache-2.0
259259
https://npmjs.com/package/echarts/v/5.4.1 5.4.1 Apache-2.0
260260
https://mvnrepository.com/artifact/io.etcd/jetcd-api/0.6.1 Apache-2.0
@@ -591,7 +591,7 @@ https://golang.org/LICENSE licenses
591591
The following components are provided under the https://golang.org/LICENSE License. See project link for details.
592592
The text of each license is also included in licenses/LICENSE-[project].txt.
593593

594-
https://mvnrepository.com/artifact/com.google.re2j/re2j/1.5 https://golang.org/LICENSE
594+
https://mvnrepository.com/artifact/com.google.re2j/re2j/1.7 https://golang.org/LICENSE
595595

596596
========================================================================
597597
https://opensource.org/licenses/BSD-2-Clause;description=BSD 2-Clause License licenses

docs/en/setup/backend/storages/banyandb.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ groups:
107107
ttl: ${SW_STORAGE_BANYANDB_RECORDS_COLD_TTL_DAYS:30}
108108
replicas: ${SW_STORAGE_BANYANDB_RECORDS_COLD_REPLICAS:0}
109109
nodeSelector: ${SW_STORAGE_BANYANDB_RECORDS_COLD_NODE_SELECTOR:"type=cold"}
110-
# The group settings of super datasets.
111-
# Super datasets are used to store trace or log data that is too large for normal datasets.
112-
recordsTrace:
110+
trace:
113111
shardNum: ${SW_STORAGE_BANYANDB_TRACE_SHARD_NUM:2}
114112
segmentInterval: ${SW_STORAGE_BANYANDB_TRACE_SI_DAYS:1}
115113
ttl: ${SW_STORAGE_BANYANDB_TRACE_TTL_DAYS:3}
@@ -128,7 +126,7 @@ groups:
128126
ttl: ${SW_STORAGE_BANYANDB_TRACE_COLD_TTL_DAYS:30}
129127
replicas: ${SW_STORAGE_BANYANDB_TRACE_COLD_REPLICAS:0}
130128
nodeSelector: ${SW_STORAGE_BANYANDB_TRACE_COLD_NODE_SELECTOR:"type=cold"}
131-
recordsZipkinTrace:
129+
zipkinTrace:
132130
shardNum: ${SW_STORAGE_BANYANDB_ZIPKIN_TRACE_SHARD_NUM:2}
133131
segmentInterval: ${SW_STORAGE_BANYANDB_ZIPKIN_TRACE_SI_DAYS:1}
134132
ttl: ${SW_STORAGE_BANYANDB_ZIPKIN_TRACE_TTL_DAYS:3}

oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBIndexInstaller.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ public InstallInfo isExists(Model model) throws StorageException {
7575
final DownSamplingConfigService downSamplingConfigService = moduleManager.find(CoreModule.NAME)
7676
.provider()
7777
.getService(DownSamplingConfigService.class);
78-
if (BanyanDBTrace.MergeTable.class.isAssignableFrom(model.getStreamClass())) {
79-
installInfo.setAllExist(true);
80-
return installInfo;
81-
}
8278
final MetadataRegistry.SchemaMetadata metadata = MetadataRegistry.INSTANCE.parseMetadata(
8379
model, config, downSamplingConfigService);
8480
installInfo.setTableName(metadata.name());
@@ -90,7 +86,7 @@ public InstallInfo isExists(Model model) throws StorageException {
9086
final ResourceExist resourceExist = checkResourceExistence(metadata, c);
9187
installInfo.setGroupExist(resourceExist.hasGroup());
9288
installInfo.setTableExist(resourceExist.hasResource());
93-
if (!resourceExist.hasResource()) {
89+
if (!resourceExist.hasResource() && !BanyanDBTrace.MergeTable.class.isAssignableFrom(model.getStreamClass())) {
9490
installInfo.setAllExist(false);
9591
return installInfo;
9692
} else {
@@ -100,6 +96,10 @@ public InstallInfo isExists(Model model) throws StorageException {
10096
if (BanyanDB.TraceGroup.NONE != model.getBanyanDBModelExtension().getTraceGroup()) {
10197
// trace
10298
TraceModel traceModel = MetadataRegistry.INSTANCE.registerTraceModel(model, config);
99+
if (BanyanDBTrace.MergeTable.class.isAssignableFrom(model.getStreamClass())) {
100+
installInfo.setAllExist(true);
101+
return installInfo;
102+
}
103103
if (!RunningMode.isNoInitMode()) {
104104
checkTrace(traceModel.getTrace(), c);
105105
checkIndexRules(model.getName(), traceModel.getIndexRules(), c);

0 commit comments

Comments
 (0)