Copilot commented on code in PR #12836: URL: https://github.com/apache/cloudstack/pull/12836#discussion_r3014476244
########## .github/workflows/pre-commit-manual.yml: ########## @@ -0,0 +1,34 @@ +# 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: pre-commit + +on: [pull_request] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + Review Comment: Both `pre-commit.yml` and this new workflow set `name: pre-commit` and use `concurrency.group: ${{ github.workflow }}-...`. Since `github.workflow` is the workflow *name*, these two workflows will share the same concurrency group and end up cancelling each other (because `cancel-in-progress: true`), which defeats the goal of having separate checks. Make the workflow names and/or concurrency group strings distinct (e.g., hardcode different group prefixes per workflow file). ########## .github/workflows/pre-commit-reusable.yml: ########## @@ -0,0 +1,57 @@ +# 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: _pre-commit-base + +on: + workflow_call: + inputs: + extra_args: + required: false + type: string + default: '' + job_id: + required: true + type: string + +permissions: + contents: read + +jobs: + run-hooks: + runs-on: ubuntu-latest Review Comment: `runs-on: ubuntu-latest` can change over time as GitHub updates the default runner image, which can introduce unexpected CI breakages (especially for linting/tooling workflows). Consider pinning to a specific Ubuntu version (e.g., `ubuntu-22.04` or `ubuntu-24.04`) to keep pre-commit results reproducible. ```suggestion runs-on: ubuntu-22.04 ``` -- 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]
