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
Solarflare #404
Solarflare #404
Conversation
I see you figured it out, awesome. Everyone should always do a For instance:
I suggest you go back to where you first opened the PR and do the rebase-fu. I suspect most test failures will disappear and generally you will get a cleaner history. You can do this all while the PR is open. A One conflict I suspect you will see is regarding the |
My own views on rebasing are evolving. Broadly speaking, I used to be for rebasing and now I am against it. Linus said it best: clean history should be (a) clean and (b) history. If we rebase routinely then we create a couple of problems:
I suspect that we should stop rebasing branches after we publish them on github/PR. (To keep history clean we should consider rebasing them immediately before publishing them, to make sure all the changes make sense and have excellent commit messages.) If something is really screwed up then we can create a new branch and rebase onto that, but this should be the exception. If the changes are just messy then, well, that is history, and we should either live with it or adjust our development habits. It seems to me like the reason that rebasing is solving test problems is that we have had regressions on our default branch that people base changes on. I see a couple of potential solutions to this. First to be more careful to avoid letting in regressions, which we are already doing. Second we could perhaps use a separate branch for integrating and debugging changes and keep the default/master branch more stable. (End braindump.) |
In this specific case I think its the worst of all worlds to have multiple fixes of the same regressions, each months apart, without any context. I think rebasing open PR's is a very sensible choice because the history will be clean and accurately historic once it's merged. Compare the history of e.g. Hans' branch vs the history of Snabb mainline. This is not rebasing the Snabb master, but instead editing the point of a branch being merged. Merging with the current master is in any way superior than merging with an ancient version of master. Not rebasing is just repeating already resolved merges and giving a lot of opportunity to mistakes. (E.g. reintroducing previously purged functions). Btw rebasing leaves the timestamps intact so again, this is when was it written vs when was it merged. |
+1 on @eugeneia |
Let me see if I understand the options. (Git workflows are complex with long-lived branches.)
Is that a reasonable overview of how these things work with git? Generally we need to work out some more details of our suggested git workflow:
I want to have a truly distributed workflow like the Linux kernel has. I want master to be "just another branch" and not a global bottleneck for all review and merge work. This stuff is hard :). |
No, squashing doesn't mean you compress everything into one commit - you can squash an arbitrary number of commits together and rewrite the commit message to reflect what is going on or do multiple squashes of different commits. I produce a new driver with a few commits:
Now you can take commit 4 and squash it into commit 2. Since 4 seems like just a fix, you might not want to update the commit message as you still achieve the same end goal, ie a complete TX side driver but it is now fixed, perhaps as a consequence of some feedback on a PR. There is a git action for this called "fixup". During the time this driver was developed and before it was merged, Snabb has merged straightline, so is it really relevant to keep the pre-straightline version of the driver? Most likely not, so we can squash 7 into 3 and 8 into 2 but perhaps this time we rewrite the messages somewhat to reflect that we are inline with the straigtline concepts. At the end, we are down to
We can certainly discuss what kind of history we want to keep but I would like to highlight that there is a spectra on how squashing/fixups can be applied - it's not about squashing everything into one single commit. EDIT: funny how I picked pre vs post straightline for example. I just reread your comment and saw you might want to keep some stuff pre-straightline for history :) I don't want to get into the specifics of what to keep or not - just outline that it's not about flattening an entire branch - it's about selectively squashing commits to achieve a clean history. |
@plajjan I see what you mean! So we could squash together several sub-series of commits to shorten the history into fewer better-defined points and still expect them to behave the same as they always did. Question then is which series to squash? And do we have to be careful with the merge commits somehow or can we squash those at will too? Would a reasonable starting point be to plan on squashing the commits between merges from upstream? Then those could be split up a little if it makes logical sense and if we are lucky we could squash away some unnecessary merges (e.g. when there are two consecutive merge commits)? |
@plajjan @eugeneia Further thought: we are all saying "rebase" but we are talking about different things, right? ("Rebase" is a very versatile verb.. like to "emacs" a branch it can mean almost anything.) Kristian is talking about reducing the number of commits on this branch by coalescing them. The effect of this is a shorter history, which mostly affects how things will look in Max is talking about eliminating the merges so that the commits on this branch all target the same version of master. The effect of this is to make it look like the code was all written for the current version of master, which will make the older commits look nonsensical e.g. code that uses APIs that don't exist anymore. If we take this route then it seems like the history will be a negative thing to have around ("how the heck did this ever work?" - it didn't) and we would be better off squashing the history and discarding the code that would never have existed in our new historical narrative. I am sure I am missing multiple important things. Improvements to my world view always welcome :). |
(Incidentally my favourite source of history in the world is novels by Robert Graves and Gore Vidal so I do appreciate the value of a spiced up historical narrative with no more of the truth than is needed :-)) |
I tried to consistently use "squash" when talking about.. well, squashing commits. The command to do that is still "git rebase ..." but it differs very much from other rebase, like when you are just replaying changes over a new branch. Should we have this discussion on this PR? While somewhat on-topic, it is getting rather long and has a wider effect than on this PR. ML or open dummy issue to discuss? |
program=port.Port.loopback_test, | ||
report=true} | ||
port.selftest(options) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was intentionally removed in a previous PR #382 . It shouldn't be reintroduced here. AFAIK its not used anywhere.
We went way off topic here which sucks because I am really talking about two specific issues (see inline comments above) I see in this PR that were caused by the branch not being rebased onto It took me ~30 minutes just to track down how these changes slipped in, which proves my point being that the history will be harder to understand without the rebase described by me which should be done at 4f0d42a. Can we please rewind in time, forget the whole git philosophy discussion, and focus on the fact that the way this branch is currently merged is problematic. In the end I don't care how we get a clean merge of this, I can guarantee you that rebasing is the smartest and easiest way to do it, and I am happy to explain why in another thread, but please... stop derailing this. (I don't think I should try to answer any of @lukego or @plajjan comments here because this would just worsen the situation for @hanshuebner really.) |
Let us merge this change in two steps:
Max has already clearly said what is needed to get into his tree. I will accept squashed, rebased, or fixed-in-a-new-merge-commit. |
@lukego Ok. I ran the rebase I proposed just out of curiosity this afternoon and it indeed needed a ton of manual conflict resolution. So its no surprise a few small things slipped through. @hanshuebner I threw out ~20 commits because they didn't apply to the current master anymore. I also adjusted a few documentation changes that were still targeting the pre-christmas tree. I wonder if we can remove Also for simplicities sake I might want to leave out a few I will post you guys with a rebased version of the branch for review once I polished it a bit further. |
@eugeneia Thanks for taking care of the rebase! I don't think that we need With respect to |
@hanshuebner How do I test the solarflare driver? I hear there is a solarflare NIC in chur, which device is it? |
@lukego Can't get rid of this using
|
The solarflare NIC is in grindelwald (0000:86:00.0/1). It passes the nfv
selftest and the tests that "make test" runs. There also is
programs/solarflare which is a simple tx/rx test which I used for basic
validation - That directory should probably not stay in the mainline once
the driver is integrated, I just find it useful as a quick confidence test.
|
A standalone driver test would be important to keep, can we turn it into a selftest similar to
What is this about? Is this something external or did I miss a submodule update along the rebase? |
2015-03-16 22:04 GMT+01:00 Max Rottenkolber notifications@github.com:
The SolarFlare driver needs a specific version of libciul.so because we're |
Not yet. ;) I just asked because I get that |
The basic solarflare test/benchmark could live in I like the idea of the |
@eugeneia here is the story on memcpy:
Could be that you need to |
I did that and it didn't fix things. |
@lukego Got it was a mistake when merging on my side. |
@lukego @hanshuebner Requesting review on #409 (Solarflare branch Rebased)! I have tested this on grindelwald to full success. I have to say I am very impressed that the NFV selftest works flawlessly with the solarflare NIC, I know its supposed to be that way but anyways: Great work Hans! 🍻 |
Superceded by #409. |
As discussed on IRC, merging without waiting for checks since it's only doc changes.
It may be better to collapse this stuff into one commit, do you agree?