Skip to content

auto bump with new build system#1366

Draft
daniel-noland wants to merge 3 commits intopr/mvachhar/new-build-systemfrom
pr/daniel-noland/auto-bump
Draft

auto bump with new build system#1366
daniel-noland wants to merge 3 commits intopr/mvachhar/new-build-systemfrom
pr/daniel-noland/auto-bump

Conversation

@daniel-noland
Copy link
Collaborator

No description provided.

Rewrites scripts/bump.sh to use npins for all pin management (previously
it only handled dpdk-sys). Adds a new `bump-pins` just recipe that
invokes the rewritten script. Removes the now-obsolete gen-pins.sh and
dpdk-sys.env which are superseded by the new approach.

Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Updates rust-overlay pin to latest. This is the result of running the
newly added bump-pins recipe.

Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Adds a 'bump nix pins' step that runs `just bump-pins` before the
cargo upgrade logic, creating a distinct commit for nix pin updates.
Keeping nix and cargo bumps in separate commits makes git bisect easier.

Also updates the PR branch and title to reflect that the workflow now
covers both nix and cargo dependency bumps, and includes nix pin update
status in the PR body.

Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland daniel-noland changed the base branch from main to pr/mvachhar/new-build-system March 22, 2026 04:27
@daniel-noland daniel-noland requested a review from Copilot March 22, 2026 04:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the automated dependency bump workflow to also refresh Nix/npins pins as part of scheduled “bump” runs, aligning Nix pin regeneration with the new build system flow.

Changes:

  • Removed the standalone pin-generation script and folded pin (re)initialization into scripts/bump.sh.
  • Added a just bump-pins recipe and integrated it into .github/workflows/bump.yml before running Cargo upgrades.
  • Updated npins/sources.json (example: rust-overlay revision/hash bump) and adjusted the automated bump PR branch/title.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/gen-pins.sh Removed; prior pin initialization logic is now handled elsewhere.
scripts/dpdk-sys.env Removed; dpdk-sys pin env file no longer tracked/generated by this workflow.
scripts/bump.sh Repurposed to initialize/add npins sources (replacing prior behavior).
npins/sources.json Updated a pinned source revision/hash (rust-overlay).
justfile Added bump-pins recipe to regenerate pins.
.github/workflows/bump.yml Added scheduled CI step to run bump-pins and include pin changes in the bump PR.

Comment on lines +279 to +280
rm ./npins/sources.json || true
./scripts/bump.sh
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confidence: 7
tags: [operational_implications]

This recipe deletes ./npins/sources.json before regenerating it. If ./scripts/bump.sh fails partway through, the working tree can be left without sources.json, which breaks subsequent nix-shell/Nix evaluation until it’s restored.

It would be safer to make this update atomic (e.g., generate into a temporary file/dir and move into place, or keep a backup and restore it on error), or prefer npins update so you don’t need to remove sources.json at all. Also, rm ... || true masks real delete failures; rm -f avoids failing on a missing file without hiding permission/path errors.

Suggested change
rm ./npins/sources.json || true
./scripts/bump.sh
set -euo pipefail
backup=""
if [ -f ./npins/sources.json ]; then
backup="$(mktemp ./npins/sources.json.bak.XXXXXX)"
cp ./npins/sources.json "$backup"
fi
restore() {
if [ -n "${backup:-}" ] && [ -f "$backup" ]; then
mv "$backup" ./npins/sources.json
fi
}
trap restore ERR
rm -f ./npins/sources.json
./scripts/bump.sh
trap - ERR
if [ -n "${backup:-}" ] && [ -f "$backup" ]; then
rm -f "$backup"
fi

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +85
- name: "bump npins"
id: "bump-pins"
run: |
git config user.name 'github-actions[bot]'
git config user.email '<41898282+github-actions[bot]@users.noreply.github.com>'

echo "::notice::Running just npins"
nix-shell --run "just bump-pins"
if ! git diff --quiet; then
echo "Found changes after bump-pins, creating commit"
git add -A
git commit -sm "bump(nix)!: bump nix pins (just bump-pins)"
echo "changed=true" >> "${GITHUB_OUTPUT}"
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confidence: 8
tags: [docs, operational_implications]

This workflow now runs just bump-pins on schedule, which (with the current implementation) regenerates all npins entries and will also update fabric to the latest tag each run. That conflicts with the repo’s documented process of keeping fabric frozen and only updating it intentionally to a specific version.

Either adjust the pin-bump mechanism to respect frozen pins (e.g., npins update without recreating sources), or update the documentation to reflect that the Gateway API/fabric version is now expected to be auto-bumped by CI.

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +57
# The fabric should be pinned to a specific and manually changed version, the best way to reach this goal is to pin the
# release and freeze it with npins. Then you can manually update with `npins update --frozen` instead of repeatedly
# editing the script or otherwise fighting the update process.
npins add github githedgehog fabric # Will pick highest tagged version on pin bump
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confidence: 8
tags: [docs, logic]

The comments and npins freeze fabric here suggest the fabric/Gateway API version should remain manually controlled, but the new bump flow regenerates npins/sources.json from scratch (see just bump-pins removing the file + npins init). That means fabric will be re-added at the latest tag every run, effectively auto-bumping it and undermining the “frozen to prevent accidental updates” workflow documented in README.

Consider either (a) switching to npins update so freeze is respected, or (b) pinning fabric with an explicit --at <version> in this script and documenting how automation should (or should not) change it.

Suggested change
# The fabric should be pinned to a specific and manually changed version, the best way to reach this goal is to pin the
# release and freeze it with npins. Then you can manually update with `npins update --frozen` instead of repeatedly
# editing the script or otherwise fighting the update process.
npins add github githedgehog fabric # Will pick highest tagged version on pin bump
# The fabric should be pinned to a specific and manually changed version. To achieve this,
# set FABRIC_VERSION to the desired tag and keep it stable; automation must not change it
# implicitly. When you want to update, change FABRIC_VERSION deliberately and re-run.
npins add github githedgehog fabric --at "${FABRIC_VERSION:?FABRIC_VERSION must be set to a specific fabric tag}"

Copilot uses AI. Check for mistakes.
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.

2 participants