Skip to Content
flowpact

Upgrading

What changes between flowpact releases, and what to do when you move to a new one.

A minor release can change what is reported. An incompatible change to the CLI, the configuration, the action, the reports or the API is a major release (the next one is 1.0.0); up to 0.14, a minor release could make one too.

Move to a new version

  • GitHub Action: uses: ciatlas/flowpact@v0.<minor> with the new minor version. Before 1.0 the floating tag follows a minor release, so @v0.22 stays on 0.22.
  • CLI: npx flowpact@0.<minor>, or update the dev dependency.
  • VS Code: the extension updates itself.

Then read the sections below from your version up.

0.29.0 → 0.29.1

Run flowpact remotes download once in each repository whose remote sources you open in the editor. The sources cache now keeps each file under its host (github.com/octo/ship/<sha>/…), and flowpact no longer reads the files earlier releases kept: go to definition on a remote reference finds nothing until the cache has it again. Delete the old <owner> directories in it, or the whole remotes directory. remotes update now also reads a file the cache has instead of asking the API for it.

0.26 → 0.29

Remove the overrides and ignore comments that FP902 and FP905 report after the upgrade. What is new:

  • FP105 leaves out skips the workflow expects: a step whose results are only read through a fallback that is not empty when the step is skipped (steps.token.outputs.token || github.token), in a condition that asks whether it ran or that is true when it was skipped (as a whole, or in the && or || operand that reads it, taken with the !s around it), or through a job output read that way. Nor does it report a condition with text around ${{ }}, which is always true, or one that leaving out the input cannot turn false (inputs.x || 'yes', !inputs.x). Overrides and ignore comments that accepted those findings now match nothing, and FP902 and FP905 (warnings) report them. A finding whose message named another input of the same condition that is no longer reported loses that note, which changes its fingerprint.
  • New findings: FP105 and FP107 treat default: '' as no default, since GitHub passes '' for an omitted input anyway. An input whose default is '' (default: '', default: ${{ '' }}) is reported where one without a default is: make it required: true or give it a non-empty default, or, if skipping is intended, say so in the condition (inputs.x != '').
  • New findings: a new rule, FP506, reports a value read as a boolean that can be another string. It is an error for fromJSON() of a value that may be '' (an optional input without a default, or the output of a step whose if: can skip it), or that may be other text in continue-on-error:, which fails the job, and a warning for a comparison with 'true' or 'false' of a value that can be other text, or for an || under env:, with: or outputs: that gives a boolean or text (a == 'b' || inputs.file). The editor offers != '' where the value is set as a quick fix.
  • A new rule, FP507, off by default: a condition that compares a value with '' (x != '', x == ''), which an if: already does by itself. Turn it on with FP507: info: the editor then fades the comparison and removes it in a quick fix (x, !x). It reports nothing under env:, with:, outputs: or continue-on-error:, where the comparison is what makes the value true or false.
  • GitHub's actions.lock pins actions only: a reusable workflow call is read where its ref points, as GitHub runs it, even when an action of the same repository and ref is pinned. FP612 no longer reports such a call's entry as recording another commit than actions.lock, and the first remotes update may list it as changed. A v0.0.1 actions.lock is now read.
  • A new warning, FP614: flowpact cannot read actions.lock (a schema version after v0.0.x, or a file that does not parse), so it checks remote actions where their ref points now, not at the commit GitHub runs. Before, only remotes update said so. A repository without the file, or with one flowpact reads, gets none.
  • Editor: hovering an expression away from a symbol says whether GitHub reads it as a condition or a value and what it yields, and a step output's hover says when it may be ''.

0.25 → 0.26

Nothing to change. What is new:

  • A new error, FP613: a job of a called workflow requests a GITHUB_TOKEN permission the call does not grant, which GitHub refuses when the run starts. A call that sets no permissions:, in its job or its workflow, is not checked: it gets the repository's default. The editor offers a quick fix that raises the grant.
  • Remote interfaces lockfile: flowpact remotes update now records what a remote reusable workflow's jobs request (permissions, jobPermissions), and FP613 checks your calls of it too. The first remotes update lists those entries as changed, though their commits are the same, and grades no call on what they now record. flowpact 0.21 and later ignore keys a later version adds, so an older pin of the action or the CLI keeps reading the lockfile.
  • From 0.26.1, impact mode's own rules are judged by the baseline: the severities and overrides of FP810–FP814 come from the baseline's config, like the impact policy. A pull request that turns one off or accepts its finding in its own config is still graded, with a note that the change applies once merged, and an ignore comment naming one is invalid (FP904). Settings already on the base branch keep working.

0.24 → 0.25

Nothing to change. What is new:

  • Ignore comments: # flowpact: ignore[FP501] why accepts a finding on its line, or alone on the line above it, also after a pinned action's version comment. The editor offers it as a quick fix. Accepted findings are listed under ignoredByComment in the JSON report and counted in summary.ignoredByComment, both additions to the schema; the action sets the ignored-by-comment output.
  • Two new warnings: FP904 reports a # flowpact: comment that names an unknown rule or is not ignore[<rules>], and FP905 one whose rule reports nothing on its line. A repository that has no # flowpact: comments gets neither.

0.21 → 0.24

Nothing to change. What is new:

  • Editor: quick fixes, Accept this finding with an override, rename, completion of the inputs and secrets a call does not pass yet, and hover and go to definition in contract files, for a step's own env, and from steps.<id>.outcome to the step. A repository with no .github folder, such as an action's, is now analyzed, so its findings appear.
  • Reports: a finding flowpact can fix with certainty carries suggestions in the JSON report and fixes in SARIF. Both are additions to the existing schemas.

0.20 → 0.21

Remote interfaces lockfile

flowpact remotes update now records, for a remote reusable workflow, the secrets it reads without declaring them (undeclaredSecrets), and FP205 reports a call of it without secrets: inherit. The first remotes update lists those entries as changed, though their commits are the same.

flowpact 0.20 and earlier refuse a lockfile with this key (FP611) and then check no remote call. Update every flowpact that reads the lockfile (the action's pin, the CLI, the editor extension) before running remotes update with 0.21. From 0.21, a key a later version adds is ignored instead.

New findings

FP205 reports calls of remote reusable workflows without secrets: inherit whose secrets the lockfile records, and, with --fetch-remotes or the action's remotes: fetch, those it fetches for the run. Use secrets: inherit, or add an override on the symbol (octo/ship/.github/workflows/ship.yml@v1#secrets.NPM_TOKEN). FP205 no longer reports a read where GitHub allows no secrets (an input default, a workflow_call output, jobs.<id>.with, if or name).

FP612 also reports a lockfile entry that records another commit than the full commit SHA its reference pins (octo/setup@<sha>). remotes update never writes one, so only an edited lockfile has it; flowpact no longer checks calls against such an entry. Run flowpact remotes update to correct it.

Sources cache

flowpact remotes update now keeps the workflow files and action.ymls it reads in a per-user sources cache, for go to definition in the editor, and prunes it to the 3 most recently used commits of each repository. Nothing to do: it keeps nothing in CI unless you ask (--cache-dir), and --no-cache turns it off. remotes update also no longer loads the plugins your config lists: it runs no rule.

Older releases

On this page