NixOS / NixOS/ofborg

Detect what to build based on touched file paths

Open
#666 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
322
Forks
171
PR merge metrics
No merged PRs in 30d

Description

Relying on PR and commit titles to determine which attribute paths to build alone is sensitive to human error, and committers are depending on state of mind prone to merge PRs where CI is all green without checking if any builds were dispatched or not.

Therefore i propose some extra logic to determine which packages to build in ofborg CI:

  • Build packages whose meta.position is touched.
    • Skip this logic if more than say 5 packages share the same meta.position.
  • Build xyz if any file in pkgs/by-name/xy/xyz/ is touched
    • This is safe, since the by-name CI check ensures there are no ../* references in by-name packages.
    • This will cause a build if only say patch files are touched, and not only trigger for package.nix

This can of course be a fallback used only if no valid/existing attribute path could be extracted from the PR/commit titles.

Thoughts?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how ofborg currently extracts attribute paths from PR and commit titles and dispatches package builds. Review the proposed meta.position and pkgs/by-name/xy/xyz/ path rules, including the shared-position limit and title-parsing fallback. Done means touched paths reliably select the intended packages without unnecessary broad builds, with tests covering the cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.