You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "klesh (via GitHub)" <gi...@apache.org> on 2025/08/13 08:49:35 UTC

[PR] feat: pipeline scheduler supports priority [incubator-devlake]

klesh opened a new pull request, #8534:
URL: https://github.com/apache/incubator-devlake/pull/8534

   ### Summary
   Added priority support to the pipeline scheduler. When dequeuing pipelines from the database, it will now select the one with the highest priority first.
   
   ### Does this close any open issues?
   Closes #8351
   
   ### Screenshots
   Include any relevant screenshots here.
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
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: commits-unsubscribe@devlake.apache.org

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


Re: [PR] feat: pipeline scheduler supports priority [incubator-devlake]

Posted by "narrowizard (via GitHub)" <gi...@apache.org>.
narrowizard merged PR #8534:
URL: https://github.com/apache/incubator-devlake/pull/8534


-- 
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: commits-unsubscribe@devlake.apache.org

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


Re: [PR] feat: pipeline scheduler supports priority [incubator-devlake]

Posted by "petkostas (via GitHub)" <gi...@apache.org>.
petkostas commented on code in PR #8534:
URL: https://github.com/apache/incubator-devlake/pull/8534#discussion_r2274133097


##########
backend/core/models/pipeline.go:
##########
@@ -75,6 +76,7 @@ type NewPipeline struct {
 	Name        string       `json:"name"`
 	Plan        PipelinePlan `json:"plan" swaggertype:"array,string" example:"please check api /pipelines/<PLUGIN_NAME>/pipeline-plan"`
 	Labels      []string     `json:"labels"`
+	Priority    int          `json:"priority"` // greater is higher

Review Comment:
   question(non-blocking) does it make sense to index this? since we use it in the `Orderby` clause.



-- 
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: commits-unsubscribe@devlake.apache.org

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


Re: [PR] feat: pipeline scheduler supports priority [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #8534:
URL: https://github.com/apache/incubator-devlake/pull/8534#discussion_r2272560228


##########
config-ui/.yarnrc.yml:
##########
@@ -1,19 +1,5 @@
-#
-# 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.
-#
 nodeLinker: node-modules

Review Comment:
   ```suggestion
   # 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.
   
   nodeLinker: node-modules
   ```
   <!-- license-eye hidden identification -->



-- 
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: commits-unsubscribe@devlake.apache.org

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


Re: [PR] feat: pipeline scheduler supports priority [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on code in PR #8534:
URL: https://github.com/apache/incubator-devlake/pull/8534#discussion_r2275167949


##########
backend/core/models/pipeline.go:
##########
@@ -75,6 +76,7 @@ type NewPipeline struct {
 	Name        string       `json:"name"`
 	Plan        PipelinePlan `json:"plan" swaggertype:"array,string" example:"please check api /pipelines/<PLUGIN_NAME>/pipeline-plan"`
 	Labels      []string     `json:"labels"`
+	Priority    int          `json:"priority"` // greater is higher

Review Comment:
   Good question!
   Here’s why I didn’t define an index for it:
   
   - Indexes improve `SELECT` performance but add overhead to `INSERT` and `UPDATE` operations. If we were to create one here, it would likely need to include `status`, `priority`, and then `id`. The cost would be higher.
   
   - The `WHERE` clause filters only the pending pipelines, which I expect to be a relatively small set. This makes the `ORDER BY` operation inexpensive.
   
   Given the cost–benefit trade-off, I decided not to create an index in this case.



-- 
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: commits-unsubscribe@devlake.apache.org

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