dwsmith1983 commented on code in PR #5762: URL: https://github.com/apache/datafusion-comet/pull/5762#discussion_r3957368313
########## .github/workflows/label_prs.yml: ########## @@ -0,0 +1,86 @@ +# 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. + +name: Label pull requests + +# Runs on pull_request_target so it can label pull requests from forks. Nothing from the pull +# request is checked out or executed: the labeler reads the changed file list through the API +# and the title step reads the event payload. +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +# Pushes replace each other's path-labeling run, but the opened run stays in its own group: +# the title step runs on open only, and a synchronize run that cancelled it would leave the +# type label missing with no later event to add it. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.action }} Review Comment: Agreed, separate groups traded the cancellation for a lost update. Now one group per pull request with `queue: max` and no cancellation (`cancel-in-progress` is rejected alongside it), so runs for the same pull request execute in order, every run completes, and the opened run's title step can no longer race a path run's read and replace. The cost is that rapid pushes queue a few seconds of labeling each instead of cancelling, bounded by the 100 pending runs GitHub allows per group. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
