Skip to content

Commit 64fb42c

Browse files
committed
Merge branch 'master' into source
2 parents 3db2feb + 510cf2d commit 64fb42c

File tree

71 files changed

+1606
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1606
-222
lines changed

.github/workflows/ci.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ jobs:
3939
steps:
4040
- name: Checkout repository
4141
uses: actions/checkout@v4
42+
with:
43+
submodules: true
4244

43-
- if: matrix.language == 'cpp' || matrix.language == 'csharp'
44-
name: Build C
45-
run: |
46-
git submodule init
47-
git submodule update
48-
make -C ./eventmesh-sdks/eventmesh-sdk-c
45+
- name: Build C SDK
46+
if: matrix.language == 'cpp'
47+
run: make -C ./eventmesh-sdks/eventmesh-sdk-c
4948

5049
- name: Setup Gradle
5150
uses: gradle/actions/setup-gradle@v4

.github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
It has been 60 days since the last activity on this pull request. I am reaching out here to gently remind you that the Apache EventMesh community values every pull request, and please feel free to get in touch with the reviewers at any time. They are available to assist you in advancing the progress of your pull request and offering the latest feedback.
4343
4444
If you encounter any challenges during development, seeking support within the community is encouraged. We sincerely appreciate your contributions to Apache EventMesh.
45-
exempt-issue-labels: 'pinned,discussion,help wanted,WIP,weopen-star,GLCC,summer of code'
45+
exempt-issue-labels: 'pinned,discussion,help wanted,WIP,weopen-star,GLCC,GSoC'
4646
exempt-pr-labels: 'help wanted,dependencies'
4747
exempt-all-milestones: true # Exempt all issues/PRs with milestones from stale
4848
operations-per-run: 300

build.gradle

+11-11
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ buildscript {
4646
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.13.0"
4747

4848
classpath "org.apache.httpcomponents:httpclient:4.5.14"
49-
classpath "commons-io:commons-io:2.16.1"
49+
classpath "commons-io:commons-io:2.17.0"
5050
}
5151
}
5252

5353
plugins {
5454
id 'org.cyclonedx.bom' version '1.8.2'
55-
id 'com.github.jk1.dependency-license-report' version '2.8'
55+
id 'com.github.jk1.dependency-license-report' version '2.9'
5656
}
5757

5858
allprojects {
@@ -109,7 +109,7 @@ allprojects {
109109
url "https://maven.aliyun.com/repository/public"
110110
}
111111
}
112-
testImplementation "org.junit.jupiter:junit-jupiter:5.10.3"
112+
testImplementation "org.junit.jupiter:junit-jupiter:5.11.0"
113113
}
114114

115115
spotless {
@@ -697,9 +697,9 @@ subprojects {
697697
sign publishing.publications.mavenJava
698698
}
699699

700-
def grpcVersion = '1.66.0'
701-
def log4jVersion = '2.23.1'
702-
def jacksonVersion = '2.17.2'
700+
def grpcVersion = '1.68.0'
701+
def log4jVersion = '2.24.1'
702+
def jacksonVersion = '2.18.0'
703703
def dropwizardMetricsVersion = '4.2.26'
704704
def opentelemetryVersion = '1.36.0'
705705
def cloudeventsVersion = '3.0.0'
@@ -711,9 +711,9 @@ subprojects {
711711
dependency "org.apache.commons:commons-lang3:3.17.0"
712712
dependency "org.apache.commons:commons-collections4:4.4"
713713
dependency "org.apache.commons:commons-text:1.12.0"
714-
dependency "commons-io:commons-io:2.16.1"
714+
dependency "commons-io:commons-io:2.17.0"
715715
dependency "commons-validator:commons-validator:1.9.0"
716-
dependency "com.google.guava:guava:33.2.1-jre"
716+
dependency "com.google.guava:guava:33.3.0-jre"
717717

718718
dependency "org.slf4j:slf4j-api:2.0.13"
719719
dependency "org.apache.logging.log4j:log4j-api:${log4jVersion}"
@@ -757,7 +757,7 @@ subprojects {
757757
dependency "org.springframework.boot:spring-boot-starter-web:2.7.18"
758758
dependency "io.openmessaging:registry-server:0.0.1"
759759

760-
dependency "org.junit.jupiter:junit-jupiter:5.10.3"
760+
dependency "org.junit.jupiter:junit-jupiter:5.11.0"
761761
dependency "org.junit-pioneer:junit-pioneer:1.9.1"
762762
dependency "org.assertj:assertj-core:3.26.3"
763763

@@ -794,14 +794,14 @@ subprojects {
794794
dependency "javax.annotation:javax.annotation-api:1.3.2"
795795
dependency "com.alibaba.fastjson2:fastjson2:2.0.52"
796796

797-
dependency "software.amazon.awssdk:s3:2.26.3"
797+
dependency "software.amazon.awssdk:s3:2.28.12"
798798
dependency "com.github.rholder:guava-retrying:2.0.0"
799799

800800
dependency "com.alibaba:druid-spring-boot-starter:1.2.23"
801801
dependency "com.baomidou:mybatis-plus-boot-starter:3.5.7"
802802
dependency "com.mysql:mysql-connector-j:8.4.0"
803803
dependency "org.springframework.boot:spring-boot-starter-jetty:2.7.18"
804-
dependency "org.locationtech.jts:jts-core:1.19.0"
804+
dependency "org.locationtech.jts:jts-core:1.20.0"
805805
}
806806
}
807807
}

eventmesh-admin-server/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies {
3838
implementation "com.alibaba:druid-spring-boot-starter"
3939
compileOnly 'com.mysql:mysql-connector-j'
4040
compileOnly 'org.projectlombok:lombok'
41-
testImplementation 'junit:junit:4.12'
41+
testImplementation 'junit:junit:4.13.2'
4242
testImplementation 'org.projectlombok:lombok'
4343
annotationProcessor 'org.projectlombok:lombok'
4444
}

eventmesh-common/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
def grpcVersion = '1.66.0'
18+
def grpcVersion = '1.68.0'
1919

2020
dependencies {
2121
api "com.google.guava:guava"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.eventmesh.common.stubs;
19+
20+
import org.apache.eventmesh.common.protocol.http.common.ProtocolKey;
21+
import org.apache.eventmesh.common.protocol.http.header.Header;
22+
import org.apache.eventmesh.common.utils.HttpConvertsUtils;
23+
24+
import java.util.Map;
25+
26+
public class HeaderStub extends Header {
27+
28+
public String code;
29+
public String eventmeshenv;
30+
31+
@Override
32+
public Map<String, Object> toMap() {
33+
return new HttpConvertsUtils().httpMapConverts(this, new ProtocolKey(), new ProtocolKey.EventMeshInstanceKey());
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.eventmesh.common.utils;
19+
20+
import org.apache.eventmesh.common.protocol.http.common.ProtocolKey;
21+
import org.apache.eventmesh.common.protocol.http.common.ProtocolKey.EventMeshInstanceKey;
22+
import org.apache.eventmesh.common.protocol.http.header.Header;
23+
import org.apache.eventmesh.common.stubs.HeaderStub;
24+
25+
import java.util.HashMap;
26+
import java.util.Map;
27+
28+
import org.junit.jupiter.api.Assertions;
29+
import org.junit.jupiter.api.Test;
30+
31+
class HttpConvertsUtilsTest {
32+
33+
private final HeaderStub headerStub = new HeaderStub();
34+
private final ProtocolKey mockedProtocolKey = new ProtocolKey();
35+
private final EventMeshInstanceKey mockedEventMeshProtocolKey = new EventMeshInstanceKey();
36+
37+
@Test
38+
void httpMapConverts() {
39+
Map<String, Object> httpMapConverts = new HttpConvertsUtils().httpMapConverts(headerStub, mockedProtocolKey);
40+
Assertions.assertEquals(httpMapConverts.get(headerStub.code), headerStub.code);
41+
}
42+
43+
@Test
44+
void testHttpMapConverts() {
45+
Map<String, Object> httpMapConverts = new HttpConvertsUtils().httpMapConverts(headerStub, mockedProtocolKey, mockedEventMeshProtocolKey);
46+
Assertions.assertEquals(httpMapConverts.get(headerStub.code), headerStub.code);
47+
Assertions.assertEquals(httpMapConverts.get(headerStub.eventmeshenv), headerStub.eventmeshenv);
48+
}
49+
50+
@Test
51+
void httpHeaderConverts() {
52+
HashMap<String, Object> headerParams = new HashMap<>();
53+
String code = "test";
54+
headerParams.put("code", code);
55+
Header header = new HttpConvertsUtils().httpHeaderConverts(headerStub, headerParams);
56+
Assertions.assertEquals(code, header.toMap().get("code"));
57+
}
58+
59+
@Test
60+
void testHttpHeaderConverts() {
61+
HashMap<String, Object> headerParams = new HashMap<>();
62+
String env = "test";
63+
headerParams.put("eventmeshenv", env);
64+
Header header = new HttpConvertsUtils().httpHeaderConverts(headerStub, headerParams, mockedEventMeshProtocolKey);
65+
Assertions.assertEquals(env, header.toMap().get("eventmeshenv"));
66+
}
67+
}

0 commit comments

Comments
 (0)