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

CASSANDRA-17837 Add pull request template and update readme #1799

Closed

Conversation

Claudenw
Copy link
Contributor

@Claudenw Claudenw commented Aug 19, 2022

Pull request Description: Adds pull request template that looks like this form. This should be applied to all released and official development branches.

Issue resolved: CASSANDRA-17837

or

  • this is a trivial documentation change. (e.g. fixes a typo)

  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (CASSANDRA-xxxx)

if not a trivial change:

  • Jira ticket contains a description of: what is fixed, why it is needed, and what branches to apply it to.
  • Tests are included.
  • Documentation changes and/or updates are included.
  • By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.

References:

Copy link
Member

@michaelsembwever michaelsembwever left a comment

Choose a reason for hiding this comment

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

take away all check boxes please.

@jmckenzie-dev
Copy link
Contributor

Key commit messages start with the issue number (CASSANDRA-xxxx)

I think this should instead read something like:

Commit message is in the format of:

[What the patch does]

Patch by <author>; reviewed by <reviewer[s]> for CASSANDRA-xxxx

Co-authored-by: author1 <author1@domain.com>
Co-authored-by: author2 <author2@domain.com>

Detailed commit paragraph of why and how the change was made and relevant context in a paragraph here

@jmckenzie-dev
Copy link
Contributor

take away all check boxes please.

Say more? Preference thing, or functional thing, or something else?

@michaelsembwever
Copy link
Member

michaelsembwever commented Aug 19, 2022

Say more? Preference thing, or functional thing, or something else?

Multiple requests on the dev thread was to remove it. We don't want "actions" required in the template, only useful info.

@michaelsembwever
Copy link
Member

michaelsembwever commented Aug 19, 2022

Commit message is in the format of:

@josh-mckenzie , the project's precedence today (as far as I have observed) is any additional descriptive paragraph goes in the middle, like

What the patch does

Detailed commit paragraph of why and how the change was made and relevant context in a paragraph here.

 patch by <author[s]>; reviewed by <reviewer[s]> for CASSANDRA-xxxx

Co-authored-by: author1 <author1@domain.com>
Co-authored-by: author2 <author2@domain.com>

@jmckenzie-dev
Copy link
Contributor

any additional descriptive paragraph goes in the middle

... I... well yes. Of course it does. I need to stay off github until I've had my morning ☕
Sorry about that!

@Claudenw
Copy link
Contributor Author

Text changed to read:


Asscociated Issue

Replace this text with the Jira issue resolved (e.g. CASSANDRA-####) text specifying why this is a trivial patch.

Author(s) and Reviewers

Patch by ; reviewed by <reviewer[s]>

Co-authored-by: author1 author1@domain.com, author2 author2@domain.com, ..., authorN authorN@domain.com

What the patch does

Replace this text with a detailed commit paragraph of why and how the change was made and relevant context in a paragraph here

Recommendations:

  • Commits should be squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (CASSANDRA-xxxx)
  • if not a trivial change:
    • Jira ticket contains a description of: what is fixed, why it is needed, and what branches to apply it to.
    • Tests are included.
    • Documentation changes and/or updates are included.

Notice

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.

###References:

@jmckenzie-dev
Copy link
Contributor

Replace this text with the Jira issue resolved (e.g. CASSANDRA-####) text specifying why this is a trivial patch. <- think there's some missing text here. What if it's not a trivial patch / PR?

@jmckenzie-dev
Copy link
Contributor

Co-authored syntax is:

Co-authored-by: First Last <email@domain.com>
Co-authored-by: First2 Last2 <email2@domain2.com>
...

@jmckenzie-dev
Copy link
Contributor

Replace this text with a detailed commit paragraph of why and how the change was made and relevant context in a paragraph here <- nit: redundant "in a paragraph here" or initial "commit paragraph"

@jmckenzie-dev
Copy link
Contributor

Commits should be squashed to remove intermediate development commit messages. <- I think we should make it clear we recommend squash before merge, not earlier on in the process. That way reviewers can assess interim commits that address specific things on their own merits if so desired.

@jmckenzie-dev
Copy link
Contributor

Key commit messages start with the issue number (CASSANDRA-xxxx) <- this is incorrect w/our current mechanism. Currently we have the format:

<What the patch does>

Patch by First Last; reviewed by <reviewers> for CASSANDRA-XXXX


- Commits should be squashed to remove intermediate development commit messages.
- Key commit messages start with the issue number (CASSANDRA-xxxx)
- if not a trivial change:
Copy link
Contributor

Choose a reason for hiding this comment

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

personally I would prefer we don't have this line and leave figuring out if trivial to the committers, so keep line 20 to 22, and remove the indent. What is trivial for one may not be for another, so defaulting to best practice with committers being able to allow special cases for trivial work.

Copy link
Contributor

@driftx driftx Aug 22, 2022

Choose a reason for hiding this comment

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

+1 to removing this. What is and what is not trivial is up the committer ultimately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While committer is the ultimate authority, the author is making a request. If the author believes it to be trivial the author should state why. If committer agrees then it is trivial. This is the opportunity for the author to make the case that the change is trivial. If the change is trivial then there may not be a JRIA ticket, there should not be documentation changes (unless it is a documentation typo) and there should not be additional testing required. If any of those exist then the change is probably not trivial.

See now that the squash comment and the commit messages start with are not appropriate and will remove them.

@Claudenw
Copy link
Contributor Author

Updated:

Replace this text with the Jira issue resolved (e.g. CASSANDRA-####) text specifying why this is a trivial patch. <- think there's some missing text here. What if it's not a trivial patch / PR?

Added the missing word "or".

Reformatted Co-authored lines
Removed recommendations that are not targeted toward authors


Asscociated Issue

Replace this text with the Jira issue resolved (e.g. CASSANDRA-####) or text specifying why this is a trivial patch.

Author(s) and Reviewers

Patch by <author>; reviewed by <reviewer[s]>

Co-authored-by: First Last author1@domain.com

Co-authored-by: First2 Last2 author2@domain.com

What the patch does

Replace this text with a detailed commit paragraph of why and how the change was made and relevant context.

Recommendations:

if not a trivial change:

  • Jira ticket contains a description of: what is fixed, why it is needed, and what branches to apply it to.
  • Tests are included.
  • Documentation changes and/or updates are included.

Notice

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.

###References:


## Author(s) and Reviewers

Patch by &lt;author>; reviewed by <reviewer[s]>
Copy link
Member

Choose a reason for hiding this comment

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

needs to be correct to match that found in https://cassandra.apache.org/_/development/how_to_commit.html

Copy link
Contributor Author

@Claudenw Claudenw Aug 23, 2022

Choose a reason for hiding this comment

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

So this should literally read:


<One sentence description, usually Jira title or CHANGES.txt summary>
<Optional lengthier description>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>


@michaelsembwever What if there is no Jira ticket? What do we put in for a trivial pull?


## What the patch does

Replace this text with a detailed commit paragraph of why and how the change was made and relevant context.
Copy link
Member

Choose a reason for hiding this comment

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

i say remove. it's in the commit message already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not in the commit if the pull request is not a patch. (like this one)

Copy link
Member

Choose a reason for hiding this comment

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

i don't understand. how do you create a pull request without a commit?



## Notice
By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.
Copy link
Member

Choose a reason for hiding this comment

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

i say remove this. it is not required.


###References:
* The [Apache Cassandra "Contributing to Cassandra" guide](https://cassandra.apache.org/_/development/index.html)
* The [Apache Cassandra "Working on Documentation" guide](https://cassandra.apache.org/_/development/documentation.html)
Copy link
Member

Choose a reason for hiding this comment

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

remove this, it's already part of the previous link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we need to look at this as a possible first point of contact. A new person grabs a ticket, clones the repository, makes a change, submits a pull request. This is the first place the project has an opportunity to introduce the new person to the project standard practices. Providing reference links is a way to do this. Providing deeper links (like the documentation link) is a way to promote contributions in those spaces.

For these reasons I think that these 2 links should stay.

Copy link
Member

Choose a reason for hiding this comment

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

Disagree, it's duplicating information. The documentation page is embedded in the first link.

Copy link
Contributor

Choose a reason for hiding this comment

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

duplicating information <- duplication isn't always bad. The goal here is to provide context and framing for folks to get situated, and so long as we don't literally have redundancy on the front-facing store of information here, I think we should keep it.

Copy link
Member

Choose a reason for hiding this comment

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

but why the documentation, instead of duplicating any of the other parts of that page? (i would have thought code style was far more valuable to the newcomer).

the very first thing on the index.html page is the list of sections, documentation being one of them.

###References:
* The [Apache Cassandra "Contributing to Cassandra" guide](https://cassandra.apache.org/_/development/index.html)
* The [Apache Cassandra "Working on Documentation" guide](https://cassandra.apache.org/_/development/documentation.html)
* The [Apache Contributor's Agreement](https://www.apache.org/licenses/contributor-agreements.html).
Copy link
Member

Choose a reason for hiding this comment

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

i say remove this. it is not required and will only scare people off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure about scaring people off but, after checking on the legal stance, it seems that the person merging the pull request is required to have the ICLA and be responsible for the merge. So I am happy to remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I disagree about this scaring people off. The second paragraph in the referenced page is:

These agreements help us achieve our goal of providing reliable and long-lived software products through collaborative, open-source software development. In all cases, contributors retain full rights to use their original contributions for any other purpose outside of Apache, while providing the ASF and its projects the right to distribute and build upon their work.

Which seems completely inclusive and reasonable to me.

Copy link
Member

Choose a reason for hiding this comment

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

it's out of scope for the PR. we won't actually be asking the contributor for an ICLA. creates unnecessary confusion.

speaking from experience, i don't contribute simple one-liners PRs to other projects if i'm confronted with such a barrage of information. but that's just me.

@jmckenzie-dev
Copy link
Contributor

jmckenzie-dev commented Aug 23, 2022

Here's a crack at a wholesale revision of the line above Claude rather than a point by point poking of holes. 😁

Commit Message

Replace this text with a one-line summary of what the patch does

Commit Details

Replace this text with a paragraph detailing why the patch is necessary and any context around it to help understand it and get situated reviewing or maintaining it

Author(s) and Reviewers

Patch by ; reviewed by <reviewer[s]> [for CASSANDRA-XXXX]

Co-author(s)

Co-authored-by: First Last author@domain.com
Co-authored-by: First2 Last2 author2@domain2.com

Checklist:

  • If necessary, JIRA ticket contains a description of what is fixed, why it is needed, and what branches to apply it to.
  • New tests are included if necessary
  • CI is run and linked from either JIRA or this PR
  • Documentation changes and/or updates are included.

References:

@michaelsembwever
Copy link
Member

michaelsembwever commented Aug 23, 2022

For help on contributing pease read our "Contributing to Cassandra" guide

Unless trivial we require a JIRA ticket that contains a description of what is fixed, why it is needed, and what branches this is to apply to.

Commit messages are expected in the format

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description>

 patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

@smiklosovic
Copy link
Contributor

smiklosovic commented Aug 23, 2022

The more verbose version holds people by hand and walks them through a park, Mick's version assumes they are all adults who take an umbrella when they see cloudy sky. No offence meant to anybody who crafted the more verbose version, I just find it important to express how this might be looked at. That is my opinion when I see both versions side by side.

@jmckenzie-dev
Copy link
Contributor

jmckenzie-dev commented Aug 23, 2022

The more verbose version holds people by hand and walks them through a par

Inclusivity often feels that way. It's definitely "not for me", but I also wouldn't find it off-putting if I came upon a project that erred on the side of smoothing out on-ramps for the developer UX.

@smiklosovic
Copy link
Contributor

smiklosovic commented Aug 23, 2022

Yeah I can see that. Up to us to decide what is better. But when I see "Replace this text with a one-line summary of what the patch does" ... I mean, do we have to be this specific?

Anyway my 0.02 :)

@michaelsembwever
Copy link
Member

Warm and inclusive are important to me. I'm thinking the contributing guide is the better place to be verbose.
I'm not a fan of action lists, or language that imposes action onto the user (that's not warm or inclusive). Treat them as an adult instead (focus on the contributing docs instead). Legalities should also be avoided (whenever possible).

@smiklosovic
Copy link
Contributor

smiklosovic commented Aug 23, 2022

What about looking what Kafka, Spark and other few top projects have it like? And just copy the same format / approach / verbosity.

@smiklosovic
Copy link
Contributor

smiklosovic commented Aug 23, 2022

Spark has no checklist and seems to be the most reasonable to me.

Kafka, Pulsar and Beam have some kind of mix of checklists and questions. Checklists seems to be quite popular but I would not go with them in Cassandra. For example, for Kafka, they have checklist there for committers. I do not think we need any checklists for ourselves.

this is quite verbose to me but the formulation is quite nice, it is not about "change this line here" but "clarify and explain please", I think that is better.

https://github.com/apache/spark/blob/master/.github/PULL_REQUEST_TEMPLATE

@jmckenzie-dev
Copy link
Contributor

I'm not a fan of action lists, or language that imposes action onto the user (that's not warm or inclusive)

Fair point; I use them to work around some personal workflow failings so I view them quite differently. 😁

What do you guys think about adding in a reference to the confluence wiki? We're relying on it for more things and it's got some discoverability problems. I'm viewing PR's as also serving the purpose of "if this is someone's first contact with the project other than the cloned code-base, how can we help them get oriented?"


Commit Message:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

References:

@jmckenzie-dev
Copy link
Contributor

language that imposes action onto the user

Thinking about this a bit more; summarizing the requirements to contribute here helps orient folks rather than deferring those asks to a very long "How to contribute" page (see: https://cassandra.apache.org/_/development/index.html). We're imposing actions on users to integrate with our project culture and agreed upon requirements, whether we do it here or on a longer page we link to from here. Also, I'm all for us having long-form documentation that takes 60+ hits of page down to get through, but we also want to encourage folks to "scratch their own itch" and get correctly oriented here without the steep ask of them reading through the entire "how to contribute" page.

If we assumed that people might want to have a minimal interaction w/the project as their first set of interactions that looks something like:

  1. cloning the codebase
  2. making a change
  3. opening a PR

I think it's valuable to have a minimal checklist to let them know that "hey, there's more to this than just opening a PR; maybe check the links in the references section to about running CI".

@michaelsembwever
Copy link
Member

"hey, there's more to this than just opening a PR; maybe check the links in the references section to about running CI".

yes, as that does not impose actions. The same as my wording "Commit messages are expected in the format". It doesn't tell someone to do something, but it is informative to how we work. I know it's a nuance, but I find it creates a more pleasant tone.

@Claudenw
Copy link
Contributor Author

I made changes as per @josh-mckenzie and @smiklosovic it now reads


Thanks for sending a pull request! Here are some tips for you:

If this is your first time please

  • Ensure you have added or run the appropriate tests for your PR
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Apache Contributor's Agreement

@jmckenzie-dev
Copy link
Contributor

One last thought: we should probably include a link to the Jira in there somewhere?

Speaking of, we should probably have a link to it in our README.md as well.

@Claudenw
Copy link
Contributor Author

I added a link to the jira:


Thanks for sending a pull request! Here are some tips for you:

If this is your first time please

  • Ensure you have added or run the appropriate tests for your PR
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

The Apache Contributor's Agreement


And a similar link in the readme.

@michaelsembwever
Copy link
Member

michaelsembwever commented Aug 29, 2022

I'm still in favour of removing altogether that bottom line: The Apache Contributor's Agreement.

And to nit-pick, I think

Thanks for sending a pull request! Here are some tips for you:

If this is your first time please

could be shorten to

Thanks for sending a pull request! Some tips if you're new here…

@Claudenw
Copy link
Contributor Author

Simplified the first line to

Thanks for sending a pull request! Here are some tips if you're new here:

as @michaelsembwever suggested.

@Claudenw Claudenw changed the title CASSANDRA-17837 Added pull request template CASSANDRA-17837 Add pull request template and update readme Aug 30, 2022
@michaelsembwever
Copy link
Member

I'm still in favour of removing altogether that bottom line: The Apache Contributor's Agreement.

@Claudenw
Copy link
Contributor Author

How do we resolve the issue of the last line in the template? There is at least one person that wants it and at least one that does not.

@driftx
Copy link
Contributor

driftx commented Aug 31, 2022

I think it should be removed as well.

@michaelsembwever
Copy link
Member

How do we resolve the issue of the last line in the template?

You need patience and to talk it through and get acceptance from everyone that initially raised any objections/concerns. Or move ahead with it removed (as no one voiced concern about this patch being unacceptable/invalid without it).

@jmckenzie-dev
Copy link
Contributor

I'm still in favour of removing altogether that bottom line: The Apache Contributor's Agreement.

Say more here? (Not that I'm re-opening this can of worms, I'm fine either way. Want to learn here).

Is the concern that it'll signal some larger commitment that'll be off-putting for new contributors and we'd rather defer it to later in their contribution process? Or is the ICLA only needed when one becomes a committer on a project and the assignment of copyright and legal usage is implicit with a PR someone opens?

@driftx
Copy link
Contributor

driftx commented Sep 2, 2022

Or is the ICLA only needed when one becomes a committer

That is how it went for me. I think that it's best to avoid mentioning legally binding documents unless required.

@michaelsembwever
Copy link
Member

michaelsembwever commented Sep 2, 2022

Say more here? (Not that I'm re-opening this can of worms, I'm fine either way. Want to learn here).

Is the concern that it'll signal some larger commitment that'll be off-putting for new contributors and we'd rather defer it to later in their contribution process? Or is the ICLA only needed when one becomes a committer on a project …

It's only required by large contributions (and when becoming a committer). It does not apply to the reader we are primarily targeting here. The onus is on the committer reviewing to catch any such need.

the assignment of copyright and legal usage is implicit with a PR someone opens?

Correct. Our license states it.

Significant contributions that add new files, we want to ask the contributor to ensure they have added the license header to the files themselves (which creates the implicit acknowledgement). This is one of the reasons we have the rat check in the build/test process.

We probably need to be better at ensuring the committers when reviewing know this. But this PR template text is not the place for that, IMHO. (And nothing on the ICLA page goes into such detail anyway.)

@Claudenw
Copy link
Contributor Author

Claudenw commented Sep 5, 2022

This pull request appears to have reached consensus and been approved. Who can merge it?

@michaelsembwever
Copy link
Member

@Claudenw , agree. Can you squash and write the commit message please. I will merge once that is done.

@Claudenw Claudenw force-pushed the CASSANDRA-17837_pull_request_template branch from c3c0065 to 5b239dc Compare September 5, 2022 13:30
@Claudenw
Copy link
Contributor Author

Claudenw commented Sep 5, 2022

@Claudenw , agree. Can you squash and write the commit message please. I will merge once that is done.

@michaelsembwever Done.

@michaelsembwever
Copy link
Member

michaelsembwever commented Sep 5, 2022

@Claudenw , agree. Can you squash and write the commit message please. I will merge once that is done.

@michaelsembwever Done.

umm, in the format as the template documents :)

@Claudenw Claudenw force-pushed the CASSANDRA-17837_pull_request_template branch from 5b239dc to 6b65034 Compare September 6, 2022 06:03
README.asc Outdated
@@ -9,6 +9,8 @@ https://cwiki.apache.org/confluence/display/CASSANDRA2/DataModel[Row store] mean

For more information, see http://cassandra.apache.org/[the Apache Cassandra web site].

Issues should be reported on The https://issues.apache.org/jira/projects/CASSANDRA/issues/[The Cassandra Jira].
Copy link
Contributor

Choose a reason for hiding this comment

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

@Claudenw there is double "The", one after "on" and one in the link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,25 @@
Thanks for sending a pull request! Here are some tips if you're new here:

* Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR
Copy link
Contributor

Choose a reason for hiding this comment

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

Add dot at the end please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@smiklosovic
Copy link
Contributor

I left two last comments otherwise LGTM.

@Claudenw Claudenw force-pushed the CASSANDRA-17837_pull_request_template branch from 6b65034 to dfb45fd Compare September 18, 2022 07:10
patch by claudenw; reviewed by dritfx, dcapwell, josh-mckenzie, michaelsembwever for CASSANDRA-17837
@Claudenw Claudenw force-pushed the CASSANDRA-17837_pull_request_template branch from dfb45fd to 57d491c Compare September 18, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants