Aman-Mittal opened a new issue, #235:
URL: https://github.com/apache/fineract-backoffice-ui/issues/235
## What is wrong
None of the five workflows (`ci.yml`, `e2e.yml`, `codeql.yml`, `zizmor.yml`,
`api-spec-sync.yml`) declare a `concurrency` group. Push twice to the same PR
and both runs execute to completion, even though nobody will ever read the
first result.
`ci.yml` alone has 16 jobs and `e2e.yml` runs a real Fineract, so a
superseded run is not cheap.
## Business value
Two things get worse without this, and both hit hardest when iterating
quickly — which is exactly when a fast signal matters most.
**Feedback gets slower.** ASF projects share a runner pool. Obsolete runs
sit in that queue holding slots, so the run you actually care about starts
later. Fix a lint error, push, and you wait behind the run for the code you
just replaced.
**Results get ambiguous.** A PR briefly shows results from two different
commits. The failure you are looking at may belong to a commit that no longer
exists, which is a confusing thing to debug and an easy way to waste an
afternoon.
## How to fix
Add a `concurrency` block at the top level of each workflow, after `on:`:
```yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
```
Two details matter:
- **Only cancel on pull requests.** On `main`, each commit's result is worth
keeping — cancelling there loses history and can leave a commit with no
recorded status. The expression above cancels for PRs and lets pushes to `main`
run to completion.
- **`api-spec-sync.yml` should not cancel at all.** It is a scheduled job
that opens a PR; interrupting it halfway is not useful. Either leave it alone
or give it a group with `cancel-in-progress: false` so two scheduled runs
cannot overlap.
Including `github.workflow` in the group keeps workflows from cancelling
each other.
## ASF compliance
`concurrency` is native GitHub Actions syntax — no new action, so nothing to
review against the ASF third-party Actions allowlist. (On `apache/*`
repositories, anything outside `apache/*`, `github/*` and `actions/*` is
blocked by default and must be INFRA-reviewed and SHA-pinned. This change adds
no dependency at all.)
## Verifying
Push twice in quick succession to a PR branch and confirm the first run
shows as cancelled while the second proceeds. Then confirm a push to `main` is
**not** cancelled by a subsequent one.
## Picking this up
No need to be assigned — assignment here is limited to committers. Comment
that you are starting, then open a PR.
This touches only `.github/workflows/`, so it does not conflict with any of
the source-code issues currently open.
--
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]