Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect what to build based on touched file paths #666

Open
pbsds opened this issue Dec 20, 2023 · 0 comments
Open

Detect what to build based on touched file paths #666

pbsds opened this issue Dec 20, 2023 · 0 comments

Comments

@pbsds
Copy link

pbsds commented Dec 20, 2023

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?

@pbsds pbsds changed the title Detect what to rebuild builds based touched file paths Detect what to rebuild builds based on touched file paths Dec 20, 2023
@pbsds pbsds changed the title Detect what to rebuild builds based on touched file paths Detect what to build based on touched file paths Dec 20, 2023
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

No branches or pull requests

1 participant