Skip to content

Commit

Permalink
Merge branch 'raft_ssl' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
Muluo-cyan committed Oct 18, 2024
2 parents e98dc9d + 55203ce commit 02230f9
Show file tree
Hide file tree
Showing 31 changed files with 169 additions and 66 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 8, 17 ]
java: [ 8, 17, 21 ]
steps:
# step 1
- name: "Checkout"
Expand All @@ -39,10 +39,9 @@ jobs:
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
if [ "${{ github.ref_name }}" == "develop" ] || [ "${{ github.ref_name }}" == "snapshot" || [ "${{ github.ref_name }}" == "2.x" ]; then
./mvnw -T 4C clean package -Dimage.name=openjdk:8u342 -Pimage -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
./mvnw -T 4C clean package -Dimage.name=eclipse-temurin:8u422-b05-jdk -Pimage -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
else
./mvnw -T 4C clean package -Dimage.name=openjdk:8u342 -Pimage,release-image-based-on-java8 -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
./mvnw -T 4C clean package -Dimage.name=openjdk:8u342-slim -Pimage,release-image-based-on-java8-slim -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
./mvnw -T 4C clean package -Dimage.name=eclipse-temurin:8u422-b05-jdk -Pimage,release-image-based-on-java8 -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
fi
# step 4 based on java17
- name: "Publish images to DockerHub based on java17"
Expand All @@ -51,5 +50,12 @@ jobs:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_USER }}
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
./mvnw -T 4C clean package -Dimage.name=openjdk:17.0.2 -Pimage,release-image-based-on-java17 -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
./mvnw -T 4C clean package -Dimage.name=openjdk:17.0.2-slim -Pimage,release-image-based-on-java17-slim -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
./mvnw -T 4C clean package -Dimage.name=eclipse-temurin:17.0.12_7-jdk -Pimage,release-image-based-on-java17 -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
# step 5 based on java21
- name: "Publish images to DockerHub based on java21"
if: ${{ matrix.java == 21 && github.ref_name != 'develop' && github.ref_name != 'snapshot' && github.ref_name != '2.x' }}
env:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_USER }}
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
./mvnw -T 4C clean package -Dimage.name=eclipse-temurin:21.0.4_7-jdk -Pimage,release-image-based-on-java21 -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ language: java
sudo: false # faster builds

jdk:
- openjdk11
- openjdk8
- openjdk17
- openjdk21

cache:
directories:
Expand All @@ -28,10 +29,13 @@ install: true

before_script:
- if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ]; then
export IMAGE_NAME="openjdk:8-jre-slim";
export IMAGE_NAME="eclipse-temurin:8u422-b05-jre";
fi
- if [ "$TRAVIS_JDK_VERSION" == "openjdk11" ]; then
export IMAGE_NAME="openjdk:11-jre-stretch";
- if [ "$TRAVIS_JDK_VERSION" == "openjdk17" ]; then
export IMAGE_NAME="eclipse-temurin:17.0.12_7-jre";
fi
- if [ "$TRAVIS_JDK_VERSION" == "openjdk21" ]; then
export IMAGE_NAME="eclipse-temurin:21.0.4_7-jre";
fi

script:
Expand Down
12 changes: 9 additions & 3 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Add changes here for all PR submitted to the 2.x branch.

### feature:

- [[#6876](https://github.com/apache/incubator-seata/pull/6876)]support kingbase
- [[#6881](https://github.com/apache/incubator-seata/pull/6881)]support grpc
- [[#6864](https://github.com/apache/incubator-seata/pull/6864)]support shentong database
- [[#6876](https://github.com/apache/incubator-seata/pull/6876)] support kingbase
- [[#6881](https://github.com/apache/incubator-seata/pull/6881)] support grpc
- [[#6864](https://github.com/apache/incubator-seata/pull/6864)] support shentong database

### bugfix:
- [[#6899](https://github.com/apache/incubator-seata/pull/6899)] fix file.conf read failed after package
Expand All @@ -23,7 +23,11 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6898](https://github.com/apache/incubator-seata/pull/6898)] upgrade npmjs version in saga module
- [[#6879](https://github.com/apache/incubator-seata/pull/6879)] fix log argument mismatch issue
- [[#6902](https://github.com/apache/incubator-seata/pull/6900)] optimize readme docs
- [[#6905](https://github.com/apache/incubator-seata/pull/6905)] remove incompatible licenses at build time
- [[#6906](https://github.com/apache/incubator-seata/pull/6906)] h2 dependency adds test scope
- [[#6911](https://github.com/apache/incubator-seata/pull/6911)] fix some typos in project
- [[#6918](https://github.com/apache/incubator-seata/pull/6918)] Use the openjdk image of eclipse-temurin as the base image



### refactor:
Expand All @@ -46,6 +50,8 @@ Thanks to these contributors for their code commits. Please report an unintended
- [xjlgod](https://github.com/xjlgod)
- [PleaseGiveMeTheCoke](https://github.com/PleaseGiveMeTheCoke)
- [dsomehan](https://github.com/dsomehan)
- [psxjoy](https://github.com/psxjoy)
- [xingfudeshi](https://github.com/xingfudeshi)



Expand Down
14 changes: 9 additions & 5 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<!-- 请根据PR的类型添加 `变更记录` 到以下对应位置(feature/bugfix/optimize/test) 下 -->

### feature:
- [[#6876](https://github.com/apache/incubator-seata/pull/6876)]支持人大金仓数据库(kingbase)
- [[#6881](https://github.com/apache/incubator-seata/pull/6881)]全链路支持grpc
- [[#6864](https://github.com/apache/incubator-seata/pull/6864)]支持神通数据库(oscar)
- [[#6876](https://github.com/apache/incubator-seata/pull/6876)] 支持人大金仓数据库(kingbase)
- [[#6881](https://github.com/apache/incubator-seata/pull/6881)] client和server支持grpc协议
- [[#6864](https://github.com/apache/incubator-seata/pull/6864)] 支持神通数据库(oscar)


### bugfix:
Expand All @@ -25,8 +25,11 @@
- [[#6879](https://github.com/apache/incubator-seata/pull/6879)] 修复日志参数不匹配问题
- [[#6898](https://github.com/apache/incubator-seata/pull/6898)] 升级 saga 模块 npmjs 版本
- [[#6902](https://github.com/apache/incubator-seata/pull/6900)] 优化 readme 文档
- [[#6905](https://github.com/apache/incubator-seata/pull/6905)] 移除构建期不兼容的 license
- [[#6906](https://github.com/apache/incubator-seata/pull/6906)] h2依赖添加test scope

- [[#6911](https://github.com/apache/incubator-seata/pull/6911)] 修正项目中的部分拼写错误
- [[#6918](https://github.com/apache/incubator-seata/pull/6918)] 使用eclipse-temurin的openjdk镜像作为基础镜像
-

### refactor:

Expand All @@ -49,7 +52,8 @@
- [xjlgod](https://github.com/xjlgod)
- [PleaseGiveMeTheCoke](https://github.com/PleaseGiveMeTheCoke)
- [dsomehan](https://github.com/dsomehan)

- [psxjoy](https://github.com/psxjoy)
- [xingfudeshi](https://github.com/xingfudeshi)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。

Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,21 @@ public interface ConfigurationKeys {
*/
String SERVER_RAFT = SERVER_PREFIX + "raft.";

/**
* The constant SERVER_RAFT_SSL.
*/
String SERVER_RAFT_SSL = SERVER_RAFT + "ssl.";

/**
* The constant SERVER_RAFT_SSL_CLIENT.
*/
String SERVER_RAFT_SSL_CLIENT = SERVER_RAFT_SSL + "client.";

/**
* The constant SERVER_RAFT_SSL_SERVER.
*/
String SERVER_RAFT_SSL_SERVER = SERVER_RAFT_SSL + "server.";

/**
* The constant SERVER_RAFT_SERVER_ADDR.
*/
Expand Down Expand Up @@ -923,6 +938,42 @@ public interface ConfigurationKeys {
*/
String SERVER_RAFT_SYNC = SERVER_RAFT + "sync";

/**
* The constant SERVER_RAFT_SSL_ENABLED.
*/
String SERVER_RAFT_SSL_ENABLED = SERVER_RAFT_SSL + "enabled";

/**
* The constant SERVER_RAFT_SSL_SERVER_KEYSTORE.
*/
String SERVER_RAFT_SSL_SERVER_KEYSTORE = SERVER_RAFT_SSL_SERVER + "keystore";

/**
* The constant SERVER_RAFT_SSL_CLIENT_KEYSTORE.
*/
String SERVER_RAFT_SSL_CLIENT_KEYSTORE = SERVER_RAFT_SSL_CLIENT + "keystore";

/**
* The constant SERVER_RAFT_SSL_SERVER_KEYSTORE_PASSWORD.
*/
String SERVER_RAFT_SSL_SERVER_KEYSTORE_PASSWORD = SERVER_RAFT_SSL_SERVER + "keystore.password";

/**
* The constant SERVER_RAFT_SSL_CLIENT_KEYSTORE_PASSWORD.
*/
String SERVER_RAFT_SSL_CLIENT_KEYSTORE_PASSWORD = SERVER_RAFT_SSL_CLIENT + "keystore.password";


/**
* The constant SERVER_RAFT_SSL_KEYSTORE_TYPE.
*/
String SERVER_RAFT_SSL_KEYSTORE_TYPE = SERVER_RAFT_SSL + "keystore.type";

/**
* The constant SERVER_RAFT_SSL_KMF_ALGORITHM.
*/
String SERVER_RAFT_SSL_KMF_ALGORITHM = SERVER_RAFT_SSL + "kmf.algorithm";

/**
* The constant SERVER_RAFT_MAX_APPEND_BUFFER_SIZE.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public interface GlobalTransaction extends BaseTransaction {
/**
* Suspend the global transaction.
*
* @param clean the clean if true, clean the transaction context. otherwise,supend only
* @param clean the clean if true, clean the transaction context. otherwise,suspend only
* @return the SuspendedResourcesHolder which holds the suspend resources
* @throws TransactionException Any exception that fails this will be wrapped with TransactionException and thrown
* @see SuspendedResourcesHolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public final class ConfigurationFactory {
public static volatile FileConfiguration ORIGIN_FILE_INSTANCE = null;

static {
initOriginConfiguraction();
initOriginConfiguration();
load();
maybeNeedOriginFileInstance();
}
Expand All @@ -83,7 +83,7 @@ private static void load() {
CURRENT_FILE_INSTANCE = extConfiguration == null ? configuration : extConfiguration;
}

private static void initOriginConfiguraction() {
private static void initOriginConfiguration() {
String seataConfigName = System.getProperty(SYSTEM_PROPERTY_SEATA_CONFIG_NAME);
if (seataConfigName == null) {
seataConfigName = System.getenv(ENV_SEATA_CONFIG_NAME);
Expand Down Expand Up @@ -225,7 +225,7 @@ private static Configuration getNonSpringConfiguration(String configTypeName) {

public static void reload() {
ConfigurationCache.clear();
initOriginConfiguraction();
initOriginConfiguration();
load();
maybeNeedOriginFileInstance();
instance = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.Collection;

/**
* custem user
* custom user
*
*/
public class CustomUserDetails implements UserDetails {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import javax.annotation.PostConstruct;

/**
* Custem user service
* Custom user service
*
*/
@Service("consoleUserDetailsService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public enum TransactionExceptionCode {
/**
* Failed to lock global transaction exception code.
*/
FailedLockGlobalTranscation,
FailedLockGlobalTransaction,

/**
* FailedWriteSession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum Protocol {
/**
* grpc
*/
GPRC("grpc"),
GRPC("grpc"),

/**
* seata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void start() {
@Override
public void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) {
if (nettyClientConfig.getProtocol().equals(Protocol.GRPC.value)) {
pipeline.addLast(Http2FrameCodecBuilder.forClient().build())
.addLast(new Http2MultiplexHandler(new ChannelDuplexHandler()));
} else {
Expand Down Expand Up @@ -191,7 +191,7 @@ public Channel getNewChannel(InetSocketAddress address) {
channel = f.channel();
}

if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) {
if (nettyClientConfig.getProtocol().equals(Protocol.GRPC.value)) {
Http2StreamChannelBootstrap bootstrap = new Http2StreamChannelBootstrap(channel);
bootstrap.handler(new ChannelInboundHandlerAdapter() {
@Override
Expand Down
6 changes: 0 additions & 6 deletions distribution/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,6 @@ BSD-3-Clause licenses
org.antlr:antlr4-runtime 4.8 BSD-3-Clause
org.abego.treelayout:org.abego.treelayout.core 1.0.3 BSD-3-Clause

========================================================================
CC-BY-4.0 licenses
========================================================================

caniuse-lite 1.0.30001589 CC-BY-4.0

========================================================================
CDDL-1.0 licenses
========================================================================
Expand Down
6 changes: 3 additions & 3 deletions distribution/docker/namingserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# 1. docker run --name=seata-namingserver -d seata-namingserver:2.2.0-dev
#
# https://hub.docker.com/r/apache/seata-namingserver
FROM openjdk:8u342
FROM eclipse-temurin:8u422-b05-jdk

# set label
LABEL maintainer="Seata <seata.apache.org>"
Expand All @@ -37,8 +37,8 @@ ADD bin/ /seata-namingserver/bin
ADD lib/ /seata-namingserver/lib
ADD conf/ /seata-namingserver/conf
ADD target /seata-namingserver/target
ADD ../LICENSE ./LICENSE
ADD ../NOTICE ./LICENSE
ADD LICENSE /LICENSE
ADD NOTICE /NOTICE

# set extra environment
ENV LOADER_PATH="/seata-namingserver/lib"
Expand Down
6 changes: 3 additions & 3 deletions distribution/docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# 1. docker run --name=seata-server -d seata-server:2.2.0-dev
#
# https://hub.docker.com/r/apache/seata-server
FROM openjdk:8u342
FROM eclipse-temurin:8u422-b05-jdk

# set label
LABEL maintainer="Seata <seata.apache.org>"
Expand All @@ -38,8 +38,8 @@ ADD ext/ /seata-server/ext
ADD lib/ /seata-server/lib
ADD conf/ /seata-server/conf
ADD target /seata-server/target
ADD ../LICENSE ./LICENSE
ADD ../NOTICE ./LICENSE
ADD LICENSE /LICENSE
ADD NOTICE /NOTICE

# set extra environment
ENV LOADER_PATH="/seata-server/lib"
Expand Down
14 changes: 14 additions & 0 deletions distribution/release-seata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@
<file>
<source>LICENSE</source>
<destName>LICENSE</destName>
<outputDirectory>seata-server/</outputDirectory>
</file>

<file>
<source>LICENSE</source>
<destName>LICENSE</destName>
<outputDirectory>seata-namingserver/</outputDirectory>
</file>

<file>
Expand All @@ -115,6 +122,13 @@
<file>
<source>NOTICE</source>
<destName>NOTICE</destName>
<outputDirectory>seata-server/</outputDirectory>
</file>

<file>
<source>NOTICE</source>
<destName>NOTICE</destName>
<outputDirectory>seata-namingserver/</outputDirectory>
</file>

<file>
Expand Down
Loading

0 comments on commit 02230f9

Please sign in to comment.