Skip to content

Contributing via signed commits #1208

Closed

Description

@karussell

As already mentioned in #1207 I would like to change the signing process for the CLAs. The current process requires printing&signing&scanning&emailing us or submitting to a third party like signaturit.com.

When we instead switch to a "signed commit"-based procedure we can improve the visibility & transparency who has signed and therefore 'commit rights'. Also we increase the number of signed & verified commits in general improving "trust" into open source code further IMO.

Necessary steps for the contributor will be:

  1. change CONTRIBUTORS.md and add a line in alphabetical order with his/her github nickname stating the CLA agreement, optionally adding contribution details and company or website.
  2. sign the commit
  3. make sure the commit contains a valid Email

This still give us the guarantee that a certain user agrees to the CLA and also contact information via the email. Would this be an improvement?

Activity

  1. devemux86 commented on Nov 2, 2017

    @devemux86
    Contributor

    As repositories administrator, I find the loss of PR commits squash (mentioned in #1207) as disadvantage.
    That would lead to excessive repository history and difficulty to read a PR if spreading to many commits.

    BTW GitHub nicknames better to be links to the actual web pages?

  2. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    That would lead to excessive repository history and difficulty to read a PR if spreading to many commits.

    This does not happen if the contributors rebase their commits as then multiple commits could end up in the master better reflecting the history compared to a single squashed commit. This has the disadvantage of the mentioned steeper learning curve but also has two advantages: clearer history of PR itself and identical commits like in the master branch

    See this article: https://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit which also points out the "reset origin/master"-solution for more complicated situations. In all cases one should avoid merging the master into the branch when squashing.

    GitHub nicknames better to be links to the actual web pages?

    Optionally yes, also supporting company or similar

  3. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    Would be interested in an opinion from @michaz @boldtrn @oblonski @ratrun and @stefanholder (just picked a few contributors regarding the different scenarios like external company, single dev etc :) ).

  4. ratrun commented on Nov 2, 2017

    @ratrun
    Contributor

    The requirement to provide a valid e-mail would be a no-go for me.

  5. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    The problem without an email is the lack of identity and another personal argument <sent via email> ;)

  6. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    This method is used from the linux kernel (I think) and there it says: It is imperative that all code contributed to the kernel be legitimately free software. For that reason, code from anonymous (or pseudonymous) contributors will not be accepted. All contributors are required to “sign off” on their code, stating that the code can be distributed with the kernel under the GPL.

  7. boldtrn commented on Nov 2, 2017

    @boldtrn
    Member

    This does not happen if the contributors rebase their commits as then multiple commits could end up in the master better reflecting the history compared to a single squashed commit.

    It would be great if we could avoid rebasing. In my experience rebasing is error prone, especially for bigger PRs. This also increases the time it takes to merge a PR. First it has to be approved, then squashed, then merged. Isn't there another way? For example each commits stay signed in the PR, wouldn't that be enough?

  8. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    A big PR should also be broken down into meaningful commits and often that will be how it was created ie multiple signed commits. But sometimes commits e.g. just remove previously introduced commits and would be too noisy. The creator and reviewer of the PR would decide together if this is ok or not (depending on complexity and noise it would mean). As the project grows there is a need for a clean(er) history to make branching and feature development easier.

    I find this better than the current process where we will squash (which is btw a 'simple' rebase) everything into one commit. Even for bigger PRs if not explicitly mentioned from the contributor.

  9. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    The 'real process' including all details should be worked out together and we will find improvements here or changes there. The main question for me is if signed commits are a burden that is ok or if the previous 'manual' signing process feels easier although there is a lack of transparency.

  10. boldtrn commented on Nov 2, 2017

    @boldtrn
    Member

    I haven't actually tried signing my commits yet, the documentation looks quite straightforward to me and it seems that signing is available for all major platforms. So I don't see a big issue with signing.

    BTW: The way the linux kernel works is not with PRs. I just looked that up and you are actually working in a mailing list. You would send your code as email to the mailing list. So in this case signing your commit makes a lot of sense and makes sure that your are actually the person that sends the email. Commits in GitHub are already guaranteed to be made by that particular user by GitHub (due to sign in).

    I find this better than the current process where we will squash (which is btw a 'simple' rebase) everything into one commit.

    The issue with rebase was probably created by me and not necessarily by git :). Doing a rebase is error prone, it happens too easy that one makes a mistake on the way. Overall my experience with rebasing was rather frustrating and I was really happy when GitHub introduced squash&merge, as it removed the need to rebase.

  11. karussell commented on Nov 2, 2017

    @karussell
    MemberAuthor

    I just looked that up and you are actually working in a mailing list.

    They the inbuilt mechanism of git called "git-request-pull". And read here what Linus thinks what would be required from him to use Github: good commit description, email, "sign-offs" (signed commits with content like this) and some other stuff. This way they can differentiate between the author and the one that merges the PR.

    Commits in GitHub are already guaranteed to be made by that particular user by GitHub (due to sign in).

    Yes, but I would like to have a Github-independent way of contacting the author, especially since contacting someone via Github is broken

  12. boldtrn commented on Nov 3, 2017

    @boldtrn
    Member

    Yes, but I would like to have a Github-independent way of contacting the author, especially since contacting someone via Github is broken

    Ok, understood. Could you maybe further explain, why squashing is not possible, I don't see an issue here so far. I create a test repo to play around with signed-off commits.

    I tried to squash a PR with two verified commits. I merged it myself, the result was a verified squashed commit, containing my commit messages and also sign-offs. I wouldn't have expected that the squashed commit would be verified as well. Maybe you could create a random PR there, adding two or so commits (preferably signed off by using git commit -S. I would squash them and we could see if everything looks alright?

    Github: good commit description, email, "sign-offs"

    Yes this thread is from 2012. I think a lot improved significant during that time. I think one of his major complaint was that the commit messages become too long for the terminal, as Github does not enforce enforce the line length.

    I just set up my workspace for verified commits. One issue I see is that it makes it unnecessary complicated for non technical contributors or contributors that don't use the terminal. For these it might be easier to sign the CLA. Also it might be better for companies to sign a CLA?

  13. boldtrn commented on Nov 3, 2017

    @boldtrn
    Member

    Thanks for creating the PR in the test repo @karussell. Here is the git log --pretty=fuller:

    commit 3d8384c56717a1e0c7e6068400219a750d297a5e
    Author:     Peter <graphhopper@***.de>
    AuthorDate: Fri Nov 3 21:48:20 2017 +0100
    Commit:     Robin <[email protected]>
    CommitDate: Sat Nov 4 07:48:20 2017 +1100
    
        test contributor sign off (#2)
        
        * added my important comment
        
        * ignore
    
    

    I squash merged this PR. You are named as the author with your email address (I masked a part of the email address). I am the comitter, with my default Github Emailaddress, because I used the UI. The squashed commit is not verified anymore. IMHO this shouldn't be a problem if the original commits where verified. WDYT?

  14. karussell commented on Nov 5, 2017

    @karussell
    MemberAuthor

    Again, I do not see a big problem if we require the contributor to squash his changes and squashing into a single commit is relative simple (we can have a simple explanation that will always work). Having verified commits in a PR but then unsigned commits in the master does not make sense to me. Either veryfied commits in the master or no extra burden at all.

    @ratrun Thinking about the email requirement or others: I think as an exception we could allow external ID verification like sending us an email and mentioning the github nickname and PR. But I'm unsure if this makes sense as the gpg key will be associated to an email.

  15. karussell commented on Nov 23, 2017

    @karussell
    MemberAuthor

    Ok, I'm proposing a less cumbersome change:

    • every contributor enables verified commits
    • a new contributor adds herself to the CONTRIBUTORS list and signs this commit (with a correct email) and includes the 'I agree to the CLA' message
    • further PRs should also be verified but it is not necessary that a PR is always squashed from the contributor (this can be a pain for people without git knowledge). Instead someone with commit rights (usually the reviewer) squashes the commits so that the PR ends up as a single commit in the master branch. These commits can be verified as I learned recently:

    elasticsearch

    Will have to find out how :) and also if the verification is from the contributor displayed in the commit or from the reviewer.

  16. devemux86 commented on Nov 23, 2017

    @devemux86
    Contributor

    Instead someone with commit rights (usually the reviewer) squashes the commits so that the PR ends up as a single commit in the master branch. These commits can be verified as I learned recently

    Recent experiments showed that squash by the reviewer via commands, keeps the "verified" in merged commit, but doing all via GitHub UI removes it, is that you mean?

  17. karussell commented on Nov 23, 2017

    @karussell
    MemberAuthor

    There are two possible ways to merge a PR:

    1. either the "perfect" one where verified commits of the original author land in the branch: this requires squashing from the original author as otherwise the history of master gets a bit too lengthy. But squashing isn't that easy.
    2. When squash&merge from Github UI there was no "verified" notice in the logs. But now I think this is possible with the minor caveat that the verification is from the one who merges and not from the author (which is shown in the commit). I'm not yet 100% sure if this is true and have to find out how elasticsearch did this for some of there PRs.
  18. devemux86 commented on Nov 23, 2017

    @devemux86
    Contributor
    1. I spoke too early above, even from command line the squash leads to a commit with the "verified" from the committer, not the author. 🙂
  19. karussell commented on Dec 12, 2017

    @karussell
    MemberAuthor

    Ok, this 100% verified commits makes stuff at times too unhandy and complicated for no real benefit.

    I propose:

    • it is recommended to use verified commits but this is not required
    • pull requests can again be squashed and merged making it much easier for contributors leading to unverified commits in the master branch
    • The possibility to sign the CLA via git can make it easier&faster for both parties if the contributor knows git. For other contributors the old procedure via sign&scan ("without git") will work and any contributor with write access can add "I agree to the CLA" for that user in the contributors file with a verified commit IF he received the scanned document before. As a result all contributors in the file will have this stated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions