Re: [pgadmin-hackers] Patch submissions - Mailing list pgadmin-hackers
From | Atira Odhner |
---|---|
Subject | Re: [pgadmin-hackers] Patch submissions |
Date | |
Msg-id | CA+Vc24pbE61sFJEBvktE02Zd8M7T6MkcmqQ3sEC3dO7LU=Cadw@mail.gmail.com Whole thread Raw |
In response to | Re: [pgadmin-hackers] Patch submissions (Dave Page <dpage@pgadmin.org>) |
Responses |
Re: [pgadmin-hackers] Patch submissions
|
List | pgadmin-hackers |
Patch 4 fixed quotes in sqleditor.js (arguably part of feature 2)
This change isn't related to any of the other changes. Combining it with another patch would make it more difficult to understand the project history.
Patch 5 was rejected early on as it was unnecessary, but was resubmitted
Totally a mistake. Sorry.
Patch 9 fixed patch 7 (feature 1)
This change was to exclude node modules from the dmg build. Yes, it is *related* to adding node modules. I think having it as a separate commit again makes history easier to understand. The commit message on the changes is very clear and specific. The commit improves one simple thing which the other commits work with or without.
Regarding the commits that move around the specs, I understand the desire to rewrite history and "pretend" that the code was right the first time around. There are valid reasons for re-writing history, but it does more harm than good when applied so liberally. It hides the conversations that were had about the code. It's true that those conversations live on in an archived email thread, but why hide them from the code history?
If one day someone wants to move karma.conf back up to the pgAdmin4 directory, having two commits instead of one will provide valuable information to them. Just annotating the file will show them that there has already been a conversation about where karma.conf lives and there is probably some good thought behind it. Having that context will tip them off that they should then go look at the email thread.
There is no final version of code. That's why it's so important to write code that is readily changeable, and that's why it's important to have a commit history that's understandable as well.
Dave, I absolutely appreciate the work that you are doing to review our commits before pulling them in. You've provided lots of great substantive feedback which clearly involved carefully reading the code as well as testing out our changes.
I'd like to lend a hand in reviewing the patches from your team in order to alleviate some of this process burden from you. Is there a process I can follow beyond replying to a patch email?
Thanks,
Tira
On Fri, Mar 17, 2017 at 5:23 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi
On Thu, Mar 16, 2017 at 5:58 PM, Atira Odhner <aodhner@pivotal.io> wrote:
> Hi Dave,
>
> I'm wondering what pain you are feeling around having multiple patches.
>
> From my perspective it is much easier to deal with smaller commits as it
> gives us a quicker way to understand each change if we want to look back at
> history. I agree that each patch should work standalone (tests should be
> passing, the application should run.) But, I think aiming for a patch size
> that encompasses an entire feature is often too large.
>
> When we were squashing patches and then having to go back and modify them,
> we were spending a large portion of our time managing patches and branches
> rather than working on code. With smaller patches, rebasing is much simpler
> and easier to understand. So I'd really like to be able to continue to do
> things this way. I do understand the desire not to have a 'bad' commit on
> master.
>
> Can you explain how having a large number of patches impacts your process
> and maybe we can together come up with a process that works better for all
> of us?
> E.g. if you just wanted to review all the changes at once, you could do `git
> apply *.patch` to review, and then `git am *.patch` when you are ready to
> commit the changes.
We aim to commit only the final version of the code, which is also
what I'm reviewing. If a patch set contains multiple patches
correcting review comments, and there are also other patches produced
in the middle, it becomes very difficult to separate the unrelated
changes, and review the final version of each individual change.
I was trying not to single out any particular work, but really the
Jasmine changes are a great example of this:
Patch 1 added Jasmine (feature 1)
Patch 2 added centralised translation rendering (feature 2)
Patch 3 refactored clipboard code into it's own file (feature 3)
Patch 4 (original version) removed some dead code in sqleditor.js (feature 4)
Patch 4 fixed quotes in sqleditor.js (arguably part of feature 2)
Patch 5 was rejected early on as it was unnecessary, but was resubmitted
Patch 6 fixed an issue in patch 3 (feature 3)
Patch 7 cleaned up patch 1 (feature 1)
Patch 8 updated packages to exclude unnecessary files introduced in
patch 1 (feature 1)
Patch 9 fixed patch 7 (feature 1)
I can tell you that had those been patches to PostgreSQL, they would
have been rejected out of hand.
What I want to see submitted, is 4 separate patches that evolve with
the feedback given:
Add Jasmine (feature 1)
Centralised translation rendering (feature 2)
Refactor clipboard code (feature 3)
Remove dead code (feature 4)
That enables reviewers to independently review and test each new block
of functionality, and commit the change as one completed unit of work.
With the 10 patches above, that wasn't possible because the
dependencies are intermixed.
I appreciate this puts more work on developers, however, there are far
fewer reviewers than developers, and patch review is not simply a case
of applying the patches and committing; it can take a significant
amount of time.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
pgadmin-hackers by date: