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

submitting-changes.chapter.md: explain *why* we have three branches #225920

Merged
1 commit merged into from Jul 12, 2023
Merged

submitting-changes.chapter.md: explain *why* we have three branches #225920

1 commit merged into from Jul 12, 2023

Conversation

ghost
Copy link

@ghost ghost commented Apr 12, 2023

The manual does an okay job of explaining the rules for each of the three development branches, but really doesn't give any intuition as to why there are three (why not four? or two?) or how we got where we are today. This commit tries to fix that.

I have also removed the term "stabilization" from the arc labels. This vague term is not defined anywhere, and does communicate any useful information without a longer explanation. Therefore it is not appropriate for use in a diagram.

screenshot-20230412-103006

Copy link
Member

@teutat3s teutat3s left a comment

Choose a reason for hiding this comment

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

LGTM

@ghost ghost requested a review from vcunat April 13, 2023 19:42
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

That's a very valuable addition, but I think we should restructure it a bit to make more probable that readers build the right mental model of what's going on, and we can do that by constructing a clearer narrative. Therefore I didn't go into detailed review, and while those suggestions apply in general, they may become invalid in their specific form if the text structure changes. (It would be sensible to incorporate them first and then continuing work on the contents.)

Right now the problem I see is that we're introducing at least three distinct concepts:

  • mass rebuilds
  • the branch structure
  • merge and batch strategies

But the text begins with the branches as if it were the key concept, and otherwise lumps everything together and interleaves subjects without a clear progression. Really what the whole thing is about is an optimization of resource use, and the setup is a particular solution motivated by the phenomenon of mass rebuilds. The text should reflect that and present the information it already contains in the following order:

  1. what mass rebuilds are (caused by change in widely used build inputs) and why it's a problem (extreme resource use and delays in fixing broken builds, whatever, you're the expert on this)
  2. which solution Nixpkgs maintainers came up with (perform mass rebuilds on separate branch, batch them up on intermediate branch)
  3. what these branches are called and how exactly changes progress through that system
  4. illustration and diagram description

It probably makes sense to leave the first paragraph as the top level information one will primarily care about to look up the branch names, as a reminder, and then go into the sequence I proposed.

Also please use one line per sentence, it's much easier to make focused suggestions that way. The diffs become unwieldy quickly if lines are broken at arbitrary points.

doc/contributing/submitting-changes.chapter.md Outdated Show resolved Hide resolved
doc/contributing/submitting-changes.chapter.md Outdated Show resolved Hide resolved
doc/contributing/submitting-changes.chapter.md Outdated Show resolved Hide resolved
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-47/27387/1

The manual does an okay job of explaining the rules for each of the
three development branches, but really doesn't give any intuition as
to why there are three (why not four? or two?) or how we got where
we are today.

This commit attempts to fix that, by explaining that there is one
branch that allows mass-rebuild commits, and it has a fast-building
branch both upstream and downstream of it (from the perspective of
automated merges).

I have also removed the term "stabilization" from the arc labels.
This vague term is not defined anywhere, and does communicate any
useful information without a longer explanation.  Therefore it is
not appropriate for use in a diagram.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
@ghost
Copy link
Author

ghost commented Jul 12, 2023

Committed @fricklerhandwerk's suggested changes.

Rebased to fix merge conflict.

No other changes.

@ghost
Copy link
Author

ghost commented Jul 12, 2023

Squashed.

@ghost
Copy link
Author

ghost commented Jul 12, 2023

Really what the whole thing is about is an optimization of resource use, and the setup is a particular solution motivated by the phenomenon of mass rebuilds. The text should reflect that and present the information it already contains in the following order

@fricklerhandwerk, you make several good suggestions on how to improve the prose here. However a mediocre explanation (this PR) is better than no explanation at all (which is what is currently in-tree).

I've committed all of your suggested changes except the one that deleted the color legend.

The remainder of your comments are suggestions on how to make the prose in this PR better, rather than indicating that the explanation is worse than no explanation at all. I'm going to merge this PR now so that I don't have to keep rebasing it. If you would like to submit a follow-up PR to improve the wording I would be happy to review it.

@ghost ghost merged commit bf226bd into NixOS:master Jul 12, 2023
4 of 5 checks passed
@ghost ghost deleted the pr/staging-next/explain-why-it-exists branch July 12, 2023 19:35
@ghost ghost restored the pr/staging-next/explain-why-it-exists branch July 12, 2023 19:58
@ghost
Copy link
Author

ghost commented Jul 12, 2023

I panic-reverted this thinking that I had broken CI on master, but on closer inspection it seems GitHub was putting big red Xes in my notifications list for stale versions of this PR.

Resubmitted as #243140

@ghost ghost deleted the pr/staging-next/explain-why-it-exists branch July 12, 2023 20:06
@lilyinstarlight
Copy link
Member

Did this intentionally revert @pennae's diff from https://github.com/NixOS/nixpkgs/pull/239636/files#diff-ba881223dddc816723e79c2ee074df7b18a08b6520273c22665143b700f3f52dL217-R221 that moved the graphviz dot file out of the markdown?

The graph currently is not rendered on https://nixos.org/manual/nixpkgs/unstable/#submitting-changes-branches as a result of this change

@ghost
Copy link
Author

ghost commented Jul 18, 2023

The graph currently is not rendered on https://nixos.org/manual/nixpkgs/unstable/#submitting-changes-branches

Why is inline graphviz not rendered anymore?

@lilyinstarlight
Copy link
Member

Why is inline graphviz not rendered anymore?

Presumably because no more docbook, but idk exactly. If you would rather, I suppose I can make the PR that moves this graphviz to the adjacent file and restores @pennae's change

@pennae
Copy link
Contributor

pennae commented Jul 18, 2023

Why is inline graphviz not rendered anymore?

it was the only inline graphviz figure in the entire manual, adding support for that to nixos-render-docs would've been so much more effort than it's worth. if a bunch of new users appear we may reevaluate that decision, but for now all graphviz must be rendered and referenced as svg (or any other graphviz output format, really, but preferrably svg).

@infinisil
Copy link
Member

I'm working on moving the contributing section out of the rendered manual and into CONTRIBUTING.md (see #244056), where we can then use GitHub markdowns mermaid support.

So we don't need to spend time trying to fix it in the rendered manual.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants