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

Add DCO description to the contribution guidelines. #4743

Merged
merged 4 commits into from
Jun 30, 2024
Merged

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Jun 23, 2024

Now that we are part of the Linux foundation we will switch away from the ONF CLA to DCO for Github pull requests and contributions. DCO is the main mode of license management for LF projects. The nice part is that, compared to the ONF CLA, it does not require manager approval for company contributions. This should greatly simplify the contribution process.

We will selectively enable DCO on some repositories to test it. Nothing much should change for contributors. The only thing that is necessary is to sign your commits on PRs with Signed-off-by: .

https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md

Provides good tips on how to manage contributing to a DCO repository. Commit hooks are the easiest mechanism to automate signoff.

@fruffy fruffy added the infrastructure Topics related to code style and build and test infrastructure. label Jun 23, 2024
Copy link
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

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

LGTM

@jafingerhut
Copy link
Contributor

Might want to add an example command line git commit --signoff that shows one easy way to add the line required by Github to approve DCO?

Also, your commit does not have DCO :-)

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 23, 2024

Might want to add an example command line git commit --signoff that shows one easy way to add the line required by Github to approve DCO?

Currently looking into ways to make this more convenient. Unfortunately, it looks like the inconvenience is by design. There is no git configuration that allows you to sign your commits automatically. Fwiw the failing CI test contains instructions on how to fix the commit, too.

Also, your commit does not have DCO :-)

Yes, intentionally! I am trying a configuration option that lets you sign a PR retroactively.

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 23, 2024

It looks like there is currently no way around signing every commit. At the same time you can not automate your local git config to always add -s. The reason is that signing off commits must be ✨intentional✨. This is quite tedious.

@jafingerhut
Copy link
Contributor

You could recommend people use a Bash alias like alias gc='git commit --signoff', or equivalent one-line script, if this is by design.

@jafingerhut
Copy link
Contributor

I have not tried this, but if it works, perhaps you would consider it less onerous?

https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md#sign-off-option-2-repository-based-hooks

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 23, 2024

I have not tried this, but if it works, perhaps you would consider it less onerous?

https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md#sign-off-option-2-repository-based-hooks

This would be a local git hook every user has to set up for their repository. But this document seems quite useful in general, maybe we can copy it.

@vlstill
Copy link
Contributor

vlstill commented Jun 27, 2024

Is this an alternative to CLA, or is this in addition to it? What is the reason behind the change? I could have easily missed something as I did not pay attention lately, but I thing the PR itself should describe what is going on as this could have significant impact on downstream development, especially where the CLA is handled by Corporations' legal department.

@AdarshRawat1
Copy link
Member

Is this an alternative to CLA, or is this in addition to it?

DCO will be replacing CLA, and we will migrate slowly.

What is the reason behind the change?

To simplify the contribution process by eliminating the need for manager approval for company contributions.
Context - We are now part of the Linux Foundation and DCO, is the standard for Linux Foundation projects.

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 27, 2024

Is this an alternative to CLA, or is this in addition to it? What is the reason behind the change? I could have easily missed something as I did not pay attention lately, but I thing the PR itself should describe what is going on as this could have significant impact on downstream development, especially where the CLA is handled by Corporations' legal department.

Basically what Adarsh said. It replaces the CLA. I made a little writeup here but we will broadcast on the mailing lists too once it is rolled out on every repository:
https://p4lang.zulipchat.com/#narrow/stream/438567-general/topic/Switching.20to.20DCO.20for.20Github.20Contributions/near/445599416

Still trying to figure out how to make signed commits convenient...

Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy
Copy link
Collaborator Author

fruffy commented Jun 29, 2024

Adding a commit hook like this appears to be the most convenient option for DCO:
https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md#sign-off-option-2-repository-based-hooks

@fruffy fruffy added this pull request to the merge queue Jun 30, 2024
@fruffy fruffy removed this pull request from the merge queue due to a manual request Jun 30, 2024
@fruffy fruffy added this pull request to the merge queue Jun 30, 2024
Merged via the queue into main with commit b27702f Jun 30, 2024
17 checks passed
@fruffy fruffy deleted the fruffy/dco_test branch June 30, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Topics related to code style and build and test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants