Detect what to build based on touched file paths
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.positionis touched.- Skip this logic if more than say 5 packages share the same
meta.position.
- Skip this logic if more than say 5 packages share the same
- Build
xyzif any file inpkgs/by-name/xy/xyz/is touched- This is safe, since the
by-nameCI check ensures there are no../*references inby-namepackages. - This will cause a build if only say patch files are touched, and not only trigger for
package.nix
- This is safe, since the
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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