You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9988221
Browse filesBrowse the repository at this point in the historyBrowse files
Improve the Pixi lockfile freshness check so PRs are not blamed for lockfile drift that already exists on their base commit.
ClosesNVIDIA#2926
Description
For stale lockfiles in pull requests, the workflow now:
- runs the same pinned Pixi version against the PR candidate and base SHA;
- records the original and repaired lockfile blob hashes for both trees;
- classifies the failure as PR-induced, base maintenance, or mixed/ambiguous;
- provides category-specific remediation in annotations and the job summary;
- links to the open maintenance refresh PR when available, otherwise to the refresh workflow.
The aggregate check remains failing for every stale classification. Push and manual runs retain their existing strict behavior, while timeouts and other operational failures remain distinct from staleness.
A small Python helper contains the classification logic, with focused tests covering each outcome.
Testing
- `83 passed, 36 subtests passed` for `ci/tools/tests`
- Ruff passes
- actionlint v1.7.12 passes
- `git diff --check` passes
echo "::error::Lockfile is stale for '${manifest}'. Regenerate with: pixi lock --manifest-path ${manifest}. For default-branch dependency drift, maintainers can run ${REFRESH_WORKFLOW_URL}"
elif ! git diff --exit-code -- "${lockfile}"; then
120
-
echo "::error::pixi ${PIXI_VERSION} rewrote ${lockfile} during the check, so the committed bytes are not what it generates. Regenerate with pixi ${PIXI_VERSION}: pixi lock --manifest-path ${manifest}. For default-branch dependency drift, maintainers can run ${REFRESH_WORKFLOW_URL}"
echo "::error title=Stale Pixi lockfile::Lockfile '${lockfile}' is stale. Regenerate and commit it with pixi ${PIXI_VERSION}: pixi lock --manifest-path ${manifest}."
181
+
echo "| \`${manifest}\` | Stale: regenerate and commit the lockfile. |" >> "${GITHUB_STEP_SUMMARY}"
echo "::error::pixi ${PIXI_VERSION} failed while checking '${manifest}' at base ${BASE_SHA} (exit ${base_status}) without producing a repaired lockfile."
214
+
echo "| \`${manifest}\` | Operational error: base check failed with exit ${base_status}. |" >> "${GITHUB_STEP_SUMMARY}"
echo "::error title=PR-induced Pixi lockfile change::Lockfile '${lockfile}' became stale in this PR. Regenerate and commit it with pixi ${PIXI_VERSION}: pixi lock --manifest-path ${manifest}."
243
+
echo "| \`${manifest}\` | PR-induced: regenerate and commit the lockfile in this PR. |" >> "${GITHUB_STEP_SUMMARY}"
244
+
;;
245
+
base-maintenance)
246
+
echo "::error title=Base-maintenance Pixi lockfile change::Lockfile '${lockfile}' was already stale on the PR base; its original and repaired blobs match the candidate. Do not add this refresh to the feature PR. Resolve the base maintenance using ${MAINTENANCE_URL}, update the branch, and rerun CI."
247
+
echo "| \`${manifest}\` | Base maintenance: not introduced by this PR. Resolve the base [maintenance refresh](${MAINTENANCE_URL}), update the branch, and rerun CI. |" >> "${GITHUB_STEP_SUMMARY}"
248
+
;;
249
+
mixed-or-ambiguous)
250
+
echo "::error title=Mixed or ambiguous Pixi lockfile change::Lockfile '${lockfile}' is stale on both the PR base and candidate, but their original or repaired blobs differ. Refresh the base via ${MAINTENANCE_URL}, update the branch, then address any remaining PR-specific change."
251
+
echo "| \`${manifest}\` | Mixed or ambiguous: refresh the base via the [maintenance refresh](${MAINTENANCE_URL}), update the branch, then address any remaining PR-specific change. |" >> "${GITHUB_STEP_SUMMARY}"
252
+
;;
253
+
*)
254
+
echo "::error::Unknown lockfile freshness classification '${classification}' for '${manifest}'."
0 commit comments