Skip to Content
flowpact

FP601 · call-cycle

Reusable workflows call each other in a cycle.

CodeNameCategoryDefault severityReported by
FP601call-cycleGraph structure🔴 errorlint, 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:11

Why 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 cycle

Accept 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):

.github/workflows/c.yml
# flowpact: ignore[FP601] why it is acceptable here
uses: ./.github/workflows/b.yml

In the config, with an override, which can expire:

.github/flowpact/flowpact.config.yml
overrides:
  - rule: FP601
    target: ".github/workflows/b.yml"
    reason: Why it is acceptable here, at least 10 characters.
    expires: YYYY-MM-DD   # optional

target 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:

.github/flowpact/flowpact.config.yml
rules:
  FP601: off
  # or: call-cycle: error

Explain it in the terminal:

flowpact explain FP601
  • FP602 nesting-depth: A chain of reusable workflow calls is deeper than the configured limit (limits.nestingDepth).

On this page