FP601 · call-cycle
Reusable workflows call each other in a cycle.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP601 | call-cycle | Graph structure | 🔴 error | lint, check, the action, the editor |
What you see
In the cycles fixture:
✖ ERROR FP601 call-cycle
Call cycle: .github/workflows/b.yml → .github/workflows/c.yml → .github/workflows/b.yml
▶ .github/workflows/c.yml:5:11Why it matters
GitHub rejects recursive reusable workflow calls when the run starts.
How to fix
Break the cycle by extracting the shared jobs into a separate workflow that neither side calls back.
Example
# .github/workflows/test.yml, which build.yml calls
on: workflow_call
jobs:
package:
uses: ./.github/workflows/build.yml # build.yml calls test.yml: a cycleAccept one finding
When a finding is intended, accept it with a reason rather than turning the rule off. It is listed apart from the other findings, and does not fail the build.
On its line, with an ignore comment alone on the line above it (the
editor's quick fix adds it there) or at the end of the line, after any other comment such as a version
(# v4.3.0 # flowpact: ignore[FP601] why):
# flowpact: ignore[FP601] why it is acceptable here
uses: ./.github/workflows/b.ymlIn the config, with an override, which can expire:
overrides:
- rule: FP601
target: ".github/workflows/b.yml"
reason: Why it is acceptable here, at least 10 characters.
expires: YYYY-MM-DD # optionaltarget is the symbol the finding is about; to list them:
flowpact lint --format json | jq -r '.findings[] | select(.code == "FP601") | .symbol'* matches within a path segment and ** across segments, so one entry accepts every finding whose symbol matches:
target: '**#inputs.app-id' is that input in every workflow and action.
Change the severity
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP601: off
# or: call-cycle: errorExplain it in the terminal:
flowpact explain FP601Related
FP602nesting-depth: A chain of reusable workflow calls is deeper than the configured limit (limits.nestingDepth).