| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Adds a concurrency configuration to generated PR check workflows to limit simultaneous runs per workflow/ref, cancelling superseded pull_request runs while serializing other event types. Key goal is to reduce parallel workflow executions and associated API load.
Copilot reviewed 56 out of 56 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| pr-checks/sync.py | Adds concurrency configuration template used to regenerate workflows. |
| .github/workflows/__with-checkout-path.yml | Generated: adds concurrency block. |
| .github/workflows/__upload-ref-sha-input.yml | Generated: adds concurrency block. |
| .github/workflows/__upload-quality-sarif.yml | Generated: adds concurrency block. |
| .github/workflows/__unset-environment.yml | Generated: adds concurrency block. |
| .github/workflows/__test-proxy.yml | Generated: adds concurrency block. |
| .github/workflows/__test-local-codeql.yml | Generated: adds concurrency block. |
| .github/workflows/__test-autobuild-working-dir.yml | Generated: adds concurrency block. |
| .github/workflows/__swift-custom-build.yml | Generated: adds concurrency block. |
| .github/workflows/__swift-autobuild.yml | Generated: adds concurrency block. |
| .github/workflows/__submit-sarif-failure.yml | Generated: adds concurrency block. |
| .github/workflows/__start-proxy.yml | Generated: adds concurrency block. |
| .github/workflows/__split-workflow.yml | Generated: adds concurrency block. |
| .github/workflows/__rust.yml | Generated: adds concurrency block. |
| .github/workflows/__ruby.yml | Generated: adds concurrency block. |
| .github/workflows/__rubocop-multi-language.yml | Generated: adds concurrency block. |
| .github/workflows/__resolve-environment-action.yml | Generated: adds concurrency block. |
| .github/workflows/__remote-config.yml | Generated: adds concurrency block. |
| .github/workflows/__quality-queries.yml | Generated: adds concurrency block. |
| .github/workflows/__packaging-inputs-js.yml | Generated: adds concurrency block. |
| .github/workflows/__packaging-config-js.yml | Generated: adds concurrency block. |
| .github/workflows/__packaging-config-inputs-js.yml | Generated: adds concurrency block. |
| .github/workflows/__packaging-codescanning-config-inputs-js.yml | Generated: adds concurrency block. |
| .github/workflows/__overlay-init-fallback.yml | Generated: adds concurrency block. |
| .github/workflows/__multi-language-autodetect.yml | Generated: adds concurrency block. |
| .github/workflows/__language-aliases.yml | Generated: adds concurrency block. |
| .github/workflows/__job-run-uuid-sarif.yml | Generated: adds concurrency block. |
| .github/workflows/__javascript-source-root.yml | Generated: adds concurrency block. |
| .github/workflows/__init-with-registries.yml | Generated: adds concurrency block. |
| .github/workflows/__go-tracing-legacy-workflow.yml | Generated: adds concurrency block. |
| .github/workflows/__go-tracing-custom-build-steps.yml | Generated: adds concurrency block. |
| .github/workflows/__go-tracing-autobuilder.yml | Generated: adds concurrency block. |
| .github/workflows/__go-indirect-tracing-workaround.yml | Generated: adds concurrency block. |
| .github/workflows/__go-indirect-tracing-workaround-no-file-program.yml | Generated: adds concurrency block. |
| .github/workflows/__go-indirect-tracing-workaround-diagnostic.yml | Generated: adds concurrency block. |
| .github/workflows/__go-custom-queries.yml | Generated: adds concurrency block. |
| .github/workflows/__extractor-ram-threads.yml | Generated: adds concurrency block. |
| .github/workflows/__export-file-baseline-information.yml | Generated: adds concurrency block. |
| .github/workflows/__diagnostics-export.yml | Generated: adds concurrency block. |
| .github/workflows/__cpp-deptrace-enabled.yml | Generated: adds concurrency block. |
| .github/workflows/__cpp-deptrace-enabled-on-macos.yml | Generated: adds concurrency block. |
| .github/workflows/__cpp-deptrace-disabled.yml | Generated: adds concurrency block. |
| .github/workflows/__config-input.yml | Generated: adds concurrency block. |
| .github/workflows/__config-export.yml | Generated: adds concurrency block. |
| .github/workflows/__cleanup-db-cluster-dir.yml | Generated: adds concurrency block. |
| .github/workflows/__bundle-zstd.yml | Generated: adds concurrency block. |
| .github/workflows/__bundle-toolcache.yml | Generated: adds concurrency block. |
| .github/workflows/__build-mode-rollback.yml | Generated: adds concurrency block. |
| .github/workflows/__build-mode-none.yml | Generated: adds concurrency block. |
| .github/workflows/__build-mode-manual.yml | Generated: adds concurrency block. |
| .github/workflows/__build-mode-autobuild.yml | Generated: adds concurrency block. |
| .github/workflows/__autobuild-direct-tracing.yml | Generated: adds concurrency block. |
| .github/workflows/__autobuild-direct-tracing-with-working-dir.yml | Generated: adds concurrency block. |
| .github/workflows/__autobuild-action.yml | Generated: adds concurrency block. |
| .github/workflows/__analyze-ref-input.yml | Generated: adds concurrency block. |
| .github/workflows/__all-platform-bundle.yml | Generated: adds concurrency block. |
Sorry, something went wrong.
| # consequently the number of concurrent API requests. | ||
| 'cancel-in-progress': "${{ github.event_name == 'pull_request' }}", | ||
| # The group is determined by the workflow name + the ref | ||
| 'group': "${{ github.workflow }}-${{ github.ref }}" |
There was a problem hiding this comment.
My understanding is this prevents duplicate checks on the same ref due to marking ready for review, for instance. However couldn't we go further and base the concurrency group on the PR number, so that new pushes cancel runs for previous pushes?
Sorry, something went wrong.
There was a problem hiding this comment.
According to the docs:
For workflows triggered by pull_request, this is the pull request merge branch. For workflows triggered by release, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is refs/heads/<branch_name>. For pull requests events except pull_request_target, it is refs/pull/<pr_number>/merge. pull_request_target events have the ref from the base branch. For tags it is refs/tags/<tag_name>. For example, refs/heads/feature-branch-1.
So for pull_request events, we should get the fully-formed branch name (not the commit ref). You can see this in action on this PR: a bunch of in-progress workflows for 6fcf631 got cancelled because I pushed 2d8d639.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the clarification!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR updates sync.py to add concurrency settings to all PR checks so that:
This should reduce the number of concurrent workflows that we have running for the repo.
Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist