Skip to content

chrony: 4.5 -> 4.6.1; move to by-name#346858

Merged
fpletz merged 7 commits intoNixOS:masterfrom
vifino:chrony-4.6
Oct 10, 2024
Merged

chrony: 4.5 -> 4.6.1; move to by-name#346858
fpletz merged 7 commits intoNixOS:masterfrom
vifino:chrony-4.6

Conversation

@vifino
Copy link
Member

@vifino vifino commented Oct 6, 2024

https://chrony-project.org/news.html

Now runs the testsuite sans one broken test.
Enabled it for Darwin and removed OpenBSD, where it never ran.

Moved to by-name and ran nixfmt.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@vifino vifino requested a review from thoughtpolice as a code owner October 6, 2024 11:11
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Oct 6, 2024
@ofborg ofborg bot requested a review from fpletz October 6, 2024 12:06
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Oct 6, 2024
Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

Code changes look good but Darwin fails on ofborg.

Copy link
Member

@GetPsyched GetPsyched left a comment

Choose a reason for hiding this comment

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

These changes should be broken down to multiple commits, in no particular order:

  • Version bump
  • Running nixfmt
  • Refactoring the derivation
  • Adding yourself as a maintainer
  • Moving the package to by-name

@vifino
Copy link
Member Author

vifino commented Oct 6, 2024

Code changes look good but Darwin fails on ofborg.

It works on aarch64-darwin, but not x86_64-darwin.
sys/timex.h is missing, it should be there on after macOS 10.13, guessing the SDKs are too old?

Do you know how to change them to something newer if I'm not explicitly using any framework?

@vifino vifino marked this pull request as draft October 7, 2024 11:15
@vifino vifino marked this pull request as ready for review October 8, 2024 15:02
@ofborg ofborg bot requested a review from fpletz October 8, 2024 16:01
@vifino vifino changed the title chrony: 4.5 -> 4.6; move to by-name chrony: 4.5 -> 4.6.1; move to by-name Oct 8, 2024
Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

@GetPsyched's review is valid. Though all the refactoring that doesn't change any outputs like nixfmt and the by-name move can be done in one commit.

@vifino
Copy link
Member Author

vifino commented Oct 9, 2024

So, essentially, I have to do all the work from scratch?
Don't the commits usually get squashed on merge anyway?
What's the point?

@infinisil
Copy link
Member

@vifino The convention is to not squash, but I think it's good like this and I appreciate the effort to split it into independent commits! This notably aligns with the commit conventions:

Create a commit for each logical unit.

There's also this:

If you have commits pkg-name: oh, forgot to insert whitespace: squash commits in this case. Use git rebase -i.

But this doesn't apply here, and I'm pretty sure there's no other guidelines that would imply having to squash the commits in this PR more, so I'd like to ask @fpletz to reconsider blocking on this. If there's a good reason to squash more in certain cases, we should discuss it separately and then amend the guidelines so we can refer to it, as suggested in C4 (search for "value judgments").

@infinisil
Copy link
Member

Independently of the above though, we do have a new codeowner validator CI check, which is now detecting a problem with this PR:

    [err] line 229: "/pkgs/tools/networking/chrony" does not match any files in repository

You'll need to change this line to fix that:

/pkgs/tools/networking/chrony @thoughtpolice

This would fit well into the first commit (you can do git rebase -i to amend a change to the first commit, see here for a tutorial if you don't know about it already)

@vifino
Copy link
Member Author

vifino commented Oct 9, 2024

Hey @infinisil, thank you for elaborating on this!

Just so we're on the same page:
The initial issue with the PR was that I committed the move, reformat, update and fixup for darwin in a single commit.
To me, that seemed OK as I believe to have seen it done this way in the past.
My assumption of "logical unit" is a lot more coarse, think split by package/module/tests/docs.
It is not very defined and probably differs a lot, developer to developer.

My annoyance with the request to split it into multiple (fine-detailed) commits was that I essentially needed to redo the work in it's entirety for - to me - questionable benefits, since I had (incorrectly) assumed that it would be squashed - not rebased - just judging from a quick glance at the nixpkgs commit history.

In my personal experience, reviewing the changes requires to look at the entire diff - if not the whole file/derivation - as skipping a "run the formatter" commit in the review process could yield.. bad outcomes.
Hence I was a bit upset at the request, since doing that just for the review of (to me) trivial changes seemed a bit pointless, as the resulting file looks very readable.

@fpletz was actually chiming in to tell me that I don't need to as many individual commits as initially requested, trying to save me work, not squashing down fine-grained commits.

However, after I resigned to the fact that the only way I can get this approved is by redoing all the changes, I followed my interpretation of the initial demands as best as I could, yielding the current state (which took me about an hour).

@vifino
Copy link
Member Author

vifino commented Oct 9, 2024

You'll need to change this line to fix that:

/pkgs/tools/networking/chrony @thoughtpolice

I assume I'd only change the path, correct?

@github-actions github-actions bot added the 6.topic: policy discussion Discuss policies to work in and around Nixpkgs label Oct 9, 2024
@infinisil
Copy link
Member

infinisil commented Oct 9, 2024

@vifino Ah I see, thanks for the clarification, and sorry for the misinterpretation, @fpletz!

I do think there is a case to be made for granular commits to a degree, not just for the sake reviews, but also history, as it makes reverting, bisecting and blaming nicer (could use .git-blame-ignore-revs). So I think it's best to get into the habit of committing often, because it's easy to squash multiple commits together. Going the other way is hard, so I wouldn't want to impose that if it's not too beneficial.

Sounds like we need to clarify the guidelines on this to hint at the right balance :)

Edit: #347586

@infinisil
Copy link
Member

You'll need to change this line to fix that:

/pkgs/tools/networking/chrony @thoughtpolice

I assume I'd only change the path, correct?

Yup!

@github-actions github-actions bot removed the 6.topic: policy discussion Discuss policies to work in and around Nixpkgs label Oct 10, 2024
@vifino
Copy link
Member Author

vifino commented Oct 10, 2024

Updated the ci/OWNERS file now, following #347610!

@fpletz
Copy link
Member

fpletz commented Oct 10, 2024

@fpletz was actually chiming in to tell me that I don't need to as many individual commits as initially requested, trying to save me work, not squashing down fine-grained commits.

Yup, that was my intention. Some degree of separation in the commits does makes sense but we don't have to be too pedantic about it. Generally, I don't like nitpicking in PRs and tend to just force push my nitpicks rather than put the burden on the PR author to fix minor issues.

My personal interpretation of the rules is that we should make it easy to revert or backport something that later turns out to break something. Changes like formatting or the by-name move most probably won't get reverted so that's fine. The version bump might if we find issues with the release that can't be trivially fixed.

Anyway, thanks everyone for chiming in here and @vifino for separating the commits. 🎉

@fpletz fpletz merged commit 46b63d3 into NixOS:master Oct 10, 2024
@vifino vifino deleted the chrony-4.6 branch October 10, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants