You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/28 09:03:49 UTC
[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #23111: Refactor agent bootstrap
terrymanu commented on code in PR #23111:
URL: https://github.com/apache/shardingsphere/pull/23111#discussion_r1058171968
##########
.github/workflows/e2e.yml:
##########
@@ -219,4 +219,5 @@ jobs:
- name: Run Integration Test
run: |
./mvnw -B clean install -f test/e2e/agent/plugins/metrics/pom.xml -Dspotless.apply.skip=true -Pit.env.metrics
+ ./mvnw clean install -B -T1C -Dmaven.javadoc.skip=true -Djacoco.skip=true -Drat.skip=true -DskipITs -DskipTests -Dcheckstyle.skip=true -Prelease
Review Comment:
Check why metrics do not need -Prelease
##########
agent/bootstrap/pom.xml:
##########
@@ -47,9 +52,8 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-agent-plugin-core</artifactId>
- <version>${project.version}</version>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-transport</artifactId>
</dependency>
Review Comment:
Bootstrap do not need netty
##########
agent/bootstrap/src/main/java/org/apache/shardingsphere/agent/bootstrap/plugin/loader/AgentPluginLoader.java:
##########
@@ -46,8 +48,15 @@ public final class AgentPluginLoader {
* @throws IOException IO exception
*/
public static Collection<PluginJar> load() throws IOException {
- File[] jarFiles = AgentPathBuilder.getPluginPath().listFiles(each -> each.getName().endsWith(".jar"));
- if (null == jarFiles) {
+ List<File> jarFiles = new LinkedList<>();
+ AgentPathBuilder.getPluginClassPaths().forEach(
Review Comment:
extract one method
##########
agent/bootstrap/src/main/java/org/apache/shardingsphere/agent/bootstrap/path/AgentPathBuilder.java:
##########
@@ -71,7 +74,8 @@ private static File getFileInResource(final String url, final String classResour
return new File(classLocation);
}
- private static File buildAgentPluginPath() {
- return new File(String.join("/", agentPath.getPath(), "plugins"));
+ private static List<File> buildAgentPluginPath() {
Review Comment:
Rename to buildAgentPluginPaths
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org