Skip to content

Commit

Permalink
[Feature][scaleph-dag] update scaleph-dag module (#705)
Browse files Browse the repository at this point in the history
* feature: update workflow task dag

* feature: add kubernetes component status check

* feature: update workflow task dag

* feature: update workflow action definition

* feature: update workflow action definition

* feature: add dag algorithm

* feature: add dag config mysql schema

* feature: add dag config service

* feature: add dag config service

* feature: add dag config service

* feature: add demo workflow

* feature: add demo workflow

* feature: add kubernetes component status check

---------

Co-authored-by: wangqi <wangqi@xinxuan.net>
  • Loading branch information
kalencaya and wangqi authored Apr 16, 2024
1 parent 8ad3293 commit 94cb6c7
Show file tree
Hide file tree
Showing 77 changed files with 2,630 additions and 199 deletions.
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
<module>scaleph-api</module>
<module>scaleph-meta</module>

<module>scaleph-application</module>
<module>scaleph-engine</module>
<module>scaleph-workspace</module>
<module>scaleph-plugins</module>
Expand Down Expand Up @@ -175,6 +176,7 @@
<redisson.version>3.27.2</redisson.version>
<cola.version>4.3.2</cola.version>
<fury.version>0.4.1</fury.version>
<jgrapht.version>1.5.2</jgrapht.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -263,6 +265,11 @@
<artifactId>scaleph-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>scaleph-application</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>scaleph-workspace-project</artifactId>
Expand Down Expand Up @@ -774,6 +781,12 @@
<artifactId>fury-core</artifactId>
<version>${fury.version}</version>
</dependency>

<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
<version>${jgrapht.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
35 changes: 35 additions & 0 deletions scaleph-application/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.sliew</groupId>
<artifactId>scaleph</artifactId>
<version>2.0.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>scaleph-application</artifactId>

<dependencies>

</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* limitations under the License.
*/

package cn.sliew.scaleph.workflow.model;
package cn.sliew.scaleph.application;

import java.util.List;
public class Main {

public interface Flow {

List<Task> getTasks();
public static void main(String[] args) {
System.out.println("Hello Application!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package cn.sliew.scaleph.dao.entity.master.dag;

import cn.sliew.scaleph.dao.entity.BaseDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
* DAG 配置
*/
@Data
@TableName("dag_config")
public class DagConfig extends BaseDO {

private static final long serialVersionUID = 1L;

@TableField("`type`")
private String type;

@Schema(description = "DAG名称")
@TableField("`name`")
private String name;

@TableField("config_id")
private String configId;

@TableField("dag_meta")
private String dagMeta;

@TableField("dag_attrs")
private String dagAttrs;

@TableField("intput_options")
private String intputOptions;

@TableField("output_options")
private String outputOptions;

@TableField("version")
private Integer version;

@TableField("remark")
private String remark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package cn.sliew.scaleph.dao.entity.master.dag;

import cn.sliew.scaleph.dao.entity.BaseDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
* DAG 配置连线
*/
@Data
@TableName("dag_config_link")
public class DagConfigLink extends BaseDO {

private static final long serialVersionUID = 1L;

@TableField("dag_id")
private Long dagId;

@TableField("link_id")
private String linkId;

@TableField("link_name")
private String linkName;

@TableField("from_step_id")
private String fromStepId;

@TableField("to_step_id")
private String toStepId;

@TableField("shape")
private String shape;

@TableField("style")
private String style;

@TableField("link_meta")
private String linkMeta;

@TableField("link_attrs")
private String linkAttrs;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package cn.sliew.scaleph.dao.entity.master.dag;

import cn.sliew.scaleph.dao.entity.BaseDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
* DAG 配置步骤
*/
@Data
@TableName("dag_config_step")
public class DagConfigStep extends BaseDO {

private static final long serialVersionUID = 1L;

@TableField("dag_id")
private Long dagId;

@TableField("step_id")
private String stepId;

@TableField("step_name")
private String stepName;

@TableField("position_x")
private Integer positionX;

@TableField("position_y")
private Integer positionY;

@TableField("shape")
private String shape;

@TableField("style")
private String style;

@TableField("step_meta")
private String stepMeta;

@TableField("step_attrs")
private String stepAttrs;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package cn.sliew.scaleph.dao.mapper.master.dag;

import cn.sliew.scaleph.dao.entity.master.dag.DagConfigLink;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
* DAG 配置连线 Mapper 接口
*/
@Repository
public interface DagConfigLinkMapper extends BaseMapper<DagConfigLink> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package cn.sliew.scaleph.dao.mapper.master.dag;

import cn.sliew.scaleph.dao.entity.master.dag.DagConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
* DAG 配置 Mapper 接口
*/
@Repository
public interface DagConfigMapper extends BaseMapper<DagConfig> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package cn.sliew.scaleph.dao.mapper.master.dag;

import cn.sliew.scaleph.dao.entity.master.dag.DagConfigStep;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
* DAG 配置步骤 Mapper 接口
*/
@Repository
public interface DagConfigStepMapper extends BaseMapper<DagConfigStep> {

}
Loading

0 comments on commit 94cb6c7

Please sign in to comment.