ci: add package version diff comment on PRs#2299
Open
brainrake wants to merge 4 commits into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
Package version diff: noneCompares built package versions in No Package DifferencesAll packages are hash-identical on all systems ( |
Adds a version-diff job that compares every legacyPackages.<system> derivation between a PR's head and base commit and posts the result as a collapsed comment (one <details> per system, folded into its summary line), using nvd for the actual version/added/removed diff. Enumerates legacyPackages directly (via a small linkFarm collector expression) rather than relying on nix-eval's packages_matrix, since that matrix only lists not-yet-cached packages and goes stale/empty once a PR's packages are built and cached -- the wrong signal for "did anything change vs base". Uses a GitHub App token via actions/create-github-app-token so the comment step isn't blocked by the org's "Actions can't create/approve PRs" policy, and grants pull-requests: write only to the comment job.
brainrake
force-pushed
the
ci/nix-version-diff
branch
from
July 22, 2026 06:38
f26e8e7 to
c9a2c80
Compare
PostgreSQL Extension Dependency Analysis: PR #2299
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2299
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
brainrake
marked this pull request as ready for review
July 22, 2026 07:05
This comment has been minimized.
This comment has been minimized.
Building the entire legacyPackages closure on both sides just to nvd-diff two roots meant realizing ~700+ store paths per side per arch even when only one package changed -- most of that time was substituter narinfo lookups and downloads, not building anything. Evaluate each attr's drvPath (pure evaluation, no network) on both sides first. Equal maps mean no changes, decided without touching the store at all. Otherwise only the attrs whose drvPath actually differs get built and nvd-diffed; added/removed attrs are reported directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a package version diff comment to the
nix-build.yml(Nix CI) workflow.For each of
x86_64-linux,aarch64-linux,aarch64-darwin: evaluates every derivation'sdrvPathunderlegacyPackages.<system>on the PR's head and base commits (pure evaluation — no network, no build). If nothing differs, that's reported directly with zero further work. If something differs, only the changed/added/removed attrs are built (substituted from the shared cache) and diffed withnvd— the rest of the closure (typically 700+ paths) is never touched.Results are posted as a single collapsed comment per PR (one
<details>per system), updated in place on subsequent pushes.Example — no differences: see this PR's own comment above.
Example — with a real diff (added package): #2306 (closed test PR, kept for reference; also used to verify timing — see PR discussion for the before/after breakdown)