Skip to content

ci(pip-audit): don't fail the workflow when auto-upgrade can't resolve - #450

Closed
eagmon wants to merge 1 commit into
masterfrom
ci/pip-audit-nonfatal
Closed

eagmon wants to merge 1 commit into
masterfrom
ci/pip-audit-nonfatal

Conversation

@eagmon

@eagmon eagmon commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Problem

The pip-audit workflow has been red on master (and across the vEcoli-family repos: vEcoli_Plasmid, vEcolisRNA, vEcoli-spatial-voronoi, which share this workflow).

It's an advisory job — audit dependencies, then open a security-updates PR with the fixes. The pip-audit scan itself is already non-fatal (|| true). But the Apply package updates step runs the generated apply_security_upgrades.sh, which does uv lock -P pkg==ver … for the recommended upgrades. When those recommended pins can't be co-resolved against the project's constraints, uv lock exits non-zero —

× No solution found when resolving dependencies

— and the whole workflow goes red. That's a false alarm: there's no code defect, and the job's only outputs are a report and an optional PR.

Fix

Make the auto-upgrade non-fatal: on an unresolvable uv lock, emit a ::warning:: instead of failing the step. The vulnerability report is still generated, the Create Pull Request step still opens a PR when uv.lock actually changed, and the repo stays green. Resolvable upgrades are unaffected (they still apply and still PR).

This is the root-source fix; the same change should be propagated to the three sibling repos that copy this workflow.

The pip-audit workflow is advisory — it audits dependencies and opens a
`security-updates` PR for the fixes. Its `Apply package updates` step runs the
generated `apply_security_upgrades.sh`, which does `uv lock -P pkg==ver ...` for
the recommended upgrades. When those recommended pins can't be co-resolved
against the project constraints, `uv lock` exits non-zero ("No solution found
when resolving dependencies") and the whole workflow goes red — a false alarm,
since there's no code defect and the job's only output is a report + an
optional PR.

Make the auto-upgrade non-fatal: on an unresolvable `uv lock`, emit a
::warning:: instead of failing. The vulnerability report is still generated, the
Create Pull Request step still opens a PR when uv.lock actually changed, and the
repo stays green. Resolvable upgrades are unaffected.
@eagmon eagmon closed this Oct 22, 2026
@eagmon
eagmon deleted the ci/pip-audit-nonfatal branch October 22, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant