From 92bf6aaef3afe8cbd331bee62059903436878ff2 Mon Sep 17 00:00:00 2001
From: HzjNeverStop <441627022@qq.com>
Date: Fri, 22 Mar 2024 14:24:02 +0800
Subject: [PATCH 1/3] update 2.1.1-SNAPSHOT (#200)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: “HzjNeverStop” <“441627022@qq.com”>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ee1310d..b98d3af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.alipay.sofa.common
sofa-common-tools
- 2.1.0
+ 2.1.1-SNAPSHOT
jar
${project.groupId}:${project.artifactId}
From 6155d069b93fa7eed70c2439991eebca563e70fa Mon Sep 17 00:00:00 2001
From: HzjNeverStop <441627022@qq.com>
Date: Fri, 22 Mar 2024 14:55:31 +0800
Subject: [PATCH 2/3] Enable other class find all threadpool and logspaces
(#201)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* update 2.1.1-SNAPSHOT
* enable other class find all threadpool and logspaces
---------
Co-authored-by: “HzjNeverStop” <“441627022@qq.com”>
---
.../alipay/sofa/common/log/MultiAppLoggerSpaceManager.java | 5 +++++
.../com/alipay/sofa/common/thread/ThreadPoolGovernor.java | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/src/main/java/com/alipay/sofa/common/log/MultiAppLoggerSpaceManager.java b/src/main/java/com/alipay/sofa/common/log/MultiAppLoggerSpaceManager.java
index 298940c..f1bd23d 100644
--- a/src/main/java/com/alipay/sofa/common/log/MultiAppLoggerSpaceManager.java
+++ b/src/main/java/com/alipay/sofa/common/log/MultiAppLoggerSpaceManager.java
@@ -32,6 +32,7 @@
import org.slf4j.Logger;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -361,4 +362,8 @@ private static AbstractLoggerSpaceFactory createILoggerFactory(SpaceId spaceId,
return NOP_LOGGER_FACTORY;
}
+
+ public static Map getLogFactoryMap() {
+ return new HashMap<>(LOG_FACTORY_MAP);
+ }
}
diff --git a/src/main/java/com/alipay/sofa/common/thread/ThreadPoolGovernor.java b/src/main/java/com/alipay/sofa/common/thread/ThreadPoolGovernor.java
index 4907841..ea2a077 100644
--- a/src/main/java/com/alipay/sofa/common/thread/ThreadPoolGovernor.java
+++ b/src/main/java/com/alipay/sofa/common/thread/ThreadPoolGovernor.java
@@ -20,6 +20,8 @@
import com.alipay.sofa.common.thread.space.ThreadPoolSpace;
import com.alipay.sofa.common.utils.StringUtil;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.Map;
import java.util.concurrent.*;
@@ -366,4 +368,7 @@ public void setMonitorThreadPoolBySpaceName(String spaceName, long period) {
});
ThreadLogger.info("Thread pool with spaceName '{}' rescheduled with period '{}'", spaceName, period);
}
+ public Collection getAllThreadPoolWrappers() {
+ return new ArrayList<>(registry.values());
+ }
}
From de55c9db81e11c741ef56a948805c94633023032 Mon Sep 17 00:00:00 2001
From: Duan-0916 <76544421+Duan-0916@users.noreply.github.com>
Date: Tue, 2 Apr 2024 17:03:18 +0800
Subject: [PATCH 3/3] Create cloud_code_scan.yml (#197)
Co-authored-by: HzjNeverStop <441627022@qq.com>
---
.github/workflows/cloud_code_scan.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 .github/workflows/cloud_code_scan.yml
diff --git a/.github/workflows/cloud_code_scan.yml b/.github/workflows/cloud_code_scan.yml
new file mode 100644
index 0000000..9a6da4a
--- /dev/null
+++ b/.github/workflows/cloud_code_scan.yml
@@ -0,0 +1,22 @@
+name: Alipay Cloud Devops Codescan
+on:
+ pull_request_target:
+jobs:
+ stc: # Code security scanning
+ runs-on: ubuntu-latest
+ steps:
+ - name: codeScan
+ uses: layotto/alipay-cloud-devops-codescan@main
+ with:
+ parent_uid: ${{ secrets.ALI_PID }}
+ private_key: ${{ secrets.ALI_PK }}
+ scan_type: stc
+ sca: # Open source compliance scanning
+ runs-on: ubuntu-latest
+ steps:
+ - name: codeScan
+ uses: layotto/alipay-cloud-devops-codescan@main
+ with:
+ parent_uid: ${{ secrets.ALI_PID }}
+ private_key: ${{ secrets.ALI_PK }}
+ scan_type: sca