Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-05-03 Thread via GitHub


wolfboys merged PR #3696:
URL: https://github.com/apache/incubator-streampark/pull/3696


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-05-01 Thread via GitHub


zhilinli123 closed pull request #3687: [Improve][project-build] Limit the 
number of running build projects
URL: https://github.com/apache/incubator-streampark/pull/3687


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-30 Thread via GitHub


wolfboys commented on code in PR #3687:
URL: 
https://github.com/apache/incubator-streampark/pull/3687#discussion_r1585158627


##
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ProjectController.java:
##
@@ -77,6 +82,16 @@ public RestResponse get(Project project) {
   @RequiresPermissions("project:build")
   @PermissionScope(team = "#project.teamId")
   public RestResponse build(Project project) throws Exception {
+Long currentBuildCount = projectService.selectCurrentBuildCount();

Review Comment:
   Don’t write logic code at the Controller layer, You can move the code in to 
the build method of ProjectServiceImpl, 
   
   ```
ApiAlertException.throwIfTrue(
 currentBuildCount > maxProjectBuildNum,
 String.format(
 "The number of running Build projects exceeds the maximum 
number: %d of project max build",
 maxProjectBuildNum)
 );
   
   ```



-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-30 Thread via GitHub


wolfboys commented on code in PR #3687:
URL: 
https://github.com/apache/incubator-streampark/pull/3687#discussion_r1585147912


##
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/ProjectService.java:
##
@@ -57,4 +57,11 @@ public interface ProjectService extends IService {
   List getApplications(Project project);
 
   boolean checkExists(Project project);
+
+  /**
+   * Gets current running build project data
+   *
+   * @return build number
+   */
+  Long selectCurrentBuildCount();

Review Comment:
   How about change the method name to getBuildingCount?



-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-30 Thread via GitHub


wolfboys commented on code in PR #3687:
URL: 
https://github.com/apache/incubator-streampark/pull/3687#discussion_r1585141931


##
streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml:
##
@@ -84,5 +84,11 @@
 
 
 
+

Review Comment:
   ```
   
   select count(1)
   from t_flink_project
   where build_state = 0
 
 ```



-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-30 Thread via GitHub


wolfboys commented on code in PR #3687:
URL: 
https://github.com/apache/incubator-streampark/pull/3687#discussion_r1585132573


##
streampark-console/streampark-console-service/src/main/resources/config.yaml:
##
@@ -61,6 +61,9 @@ streampark:
 http-auth: 'simple'  # default simple, or kerberos
   # flink on yarn or spark on yarn, HADOOP_USER_NAME
   hadoop-user-name: hdfs
+  project:
+  # Number of projects allowed to be running at the same time , If there 
is no limit, -1 can be configured
+build-num: 6

Review Comment:
   how  about max-build?



-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-28 Thread via GitHub


zhilinli123 commented on PR #3687:
URL: 
https://github.com/apache/incubator-streampark/pull/3687#issuecomment-2081435945

   
   
![5f1b8b26-935e-43d6-9b80-256823247d88](https://github.com/apache/incubator-streampark/assets/76689593/bc6d69c5-4ea3-4234-a6f2-6b55deefbb3d)
   
![363b6882-f8a9-4926-af65-35cccf6cad17](https://github.com/apache/incubator-streampark/assets/76689593/ec764861-5189-4cb8-98ea-0e416af8bfbb)


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-26 Thread via GitHub


zhilinli123 closed pull request #3677: [Improve][project-build] Limit the 
number of running build projects
URL: https://github.com/apache/incubator-streampark/pull/3677


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-25 Thread via GitHub


wolfboys commented on PR #3677:
URL: 
https://github.com/apache/incubator-streampark/pull/3677#issuecomment-2076888626

   hi, the config file application.yml is deprecated, I suggest setting this 
parameter in the system-settings page. Do not write it to the configuration 
file. 🛠️
   
   


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-24 Thread via GitHub


zhilinli123 commented on PR #3677:
URL: 
https://github.com/apache/incubator-streampark/pull/3677#issuecomment-2076351685

   pre pull request 
:https://github.com/apache/incubator-streampark/pull/3679/files#diff-625e877ffa250d016d6edb0be3d702299e91eba563967b1731e502fb18ce2f15


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-24 Thread via GitHub


caicancai commented on PR #3677:
URL: 
https://github.com/apache/incubator-streampark/pull/3677#issuecomment-2076325994

   @wolfboys PATL


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve][project-build] Limit the number of running build projects [incubator-streampark]

2024-04-22 Thread via GitHub


zhilinli123 commented on PR #3677:
URL: 
https://github.com/apache/incubator-streampark/pull/3677#issuecomment-2068763403

   
![img_v3_02a6_341893f8-55ef-4485-bc6c-809e4138ae0g](https://github.com/apache/incubator-streampark/assets/76689593/a426abd0-41c0-45d7-8fdc-58925a2b6f24)
   
![img_v3_02a6_45f874fd-4f04-4a87-a7ce-233d98698c5g](https://github.com/apache/incubator-streampark/assets/76689593/070d561a-6723-4e24-8631-e4121069390a)
   


-- 
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: issues-unsubscr...@streampark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org