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

tools: Add a pull request template. #394

Merged
merged 1 commit into from
May 13, 2022
Merged

Conversation

shahzadlone
Copy link
Member

@shahzadlone shahzadlone commented May 3, 2022

RELEVANT ISSUE(S)

Resolves: #393

DESCRIPTION

Adds the following PR template:

## RELEVANT ISSUE(S)

Resolves #

## DESCRIPTION

Please include a summary of the change and which issue is fixed. If there isn't an issue, then please create one.
Please also include relevant motivation and context. List any dependencies that are required for this change.

### HOW HAS THIS BEEN TESTED?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

### CHECKLIST:

- [ ] I have commented the code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the repo-held documentation.
- [ ] I have made sure that the PR title adheres to the conventional commit style (subset of the ones we use can be found under: [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)

### ENVIRONMENT / OS THIS WAS TESTED ON?

Please specify which of the following was this tested on (remove or add your own):
- [ ] Arch Linux
- [ ] Debian Linux
- [ ] MacOS
- [ ] Windows

@shahzadlone shahzadlone added the action/no-benchmark Skips the action that runs the benchmark. label May 3, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone May 3, 2022
@shahzadlone shahzadlone self-assigned this May 3, 2022
Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

Looks good no me. We can always amend in the future if we find that we need to. I assume this will also be available in the documentation?

Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Got a few comments sorry :P I'm very glad you have taken the time to get this up and running, but have a handful of talking points on some of the specifics. Overall structure is very nice

- [ ] My code follows the style guidelines of this project.
- [ ] My changes generate no new warnings.
- [ ] I have made sure to add label `action/no-benchmark` if benchmarking isn't needed.
- [ ] I have made sure to add label `action/full-benchmark` if full benchmarking is needed.
Copy link
Contributor

@AndrewSisley AndrewSisley May 5, 2022

Choose a reason for hiding this comment

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

suggestion: having tick boxes for the benchmark labels seems like wasteful bureaucracy as it really doesnt matter if I don't add the no-benchmark label if the benches are not needed. Suggest removal of these two lines

- [ ] New and existing unit tests pass locally with my changes.
- [ ] My tests cover the newly added code quite reasonably.
- [ ] My code follows the style guidelines of this project.
- [ ] My changes generate no new warnings.
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: If this is part of the template, then we should have no warnings - just build failures. We should convert any existing warnings to errors and remove this line


- [ ] New and existing unit tests pass locally with my changes.
- [ ] My tests cover the newly added code quite reasonably.
- [ ] My code follows the style guidelines of this project.
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: I think this is meaningless - if the build passes, it passes the guidelines (ignoring offensive lang etc). Please remove


## Checklist:

- [ ] New and existing unit tests pass locally with my changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: I think this is meaningless, if the build passes on our CI then it should pass locally. If it doesnt our CI is broken or they are deving on an unsupported environment (in which case this line is still meaningess)

## Checklist:

- [ ] New and existing unit tests pass locally with my changes.
- [ ] My tests cover the newly added code quite reasonably.
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: I think reasonably is far too subjective to use here and will not contribute to code quality or PR discussions. If we dont have concrete code-coverage requirements (which if we want, the build should fail and this line should be removed), then it is on the author and reviewers to debate this (code-cov is published to PR, and the tests are under review). Suggest removal

- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have ran the linter locally and resolved all the linter errors.
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: similar to "New and existing unit tests pass locally with my changes." - this doesnt matter and the build should fail in this case - suggest removal


Please specify which of the following was this tested on (remove or add your own):
- [ ] Manjaro (Linux)
- [ ] Ubuntu (Linux)
Copy link
Contributor

Choose a reason for hiding this comment

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

question: I guess I'll be using this a fair amount, and run Linux Mint which is not quite on the list. I'll happily tick the Ubuntu box though. Might suggest this is too specific though and we either just have Linux, or maybe Debian instead of Ubuntu?

Or maybe a better question: What value does this question/answer provide to author and reviewers? Should this be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would say this can be valuable to trace if we have discrepancy where something works on the developer's end and not the reviewer or vice versa.

- [ ] MacOS
- [ ] Windows

Additional details about the environment:
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Similar to the OS comment from me - what value does this provide?

Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration if relevant.
Examples:
- [ ] Added unit test a_test.go
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: I think this is a poor example, as it should be very visible in the PR already and noting it up here is a waste of time and space. Noting any manual testing could be alright, but tbh any changes should be fully covered with automated tests, especially if put forward by external developers (thus making manual tests a bit unnecessary) - I know we have gaps here (e.g. gql intelisense related stuff), but they are very much the exception atm.

@@ -0,0 +1,53 @@
## Relavent Issue(s)

Resolves #{INSERT-ISSUE-NUMBER}
Copy link
Contributor

Choose a reason for hiding this comment

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

question: I always use Closes #XYZ - does resolves also link/close the ticket?

Copy link
Contributor

@orpheuslummis orpheuslummis May 5, 2022

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

You are welcome to use whatever you like, it's a template / place holder of sorts.

@shahzadlone
Copy link
Member Author

@AndrewSisley Appreciate the comments!

I agree with most of your comments, however I feel like perhaps the template so far fails to differentiate between stuff that is just there for reminders and can be removed from the PR description (i.e. optional stuff, and reminders of common tasks that don't need to actually be documented) vs the stuff that is absolute requirement to have.

For example I often forget to add the label action/no-benchmark which then dumps the comparison benchmark reports many times (for many pushes). A reminder for that while PR is opened would be nice, which is what the checklist items are mostly for. Once the self reminders are done the checklist can be removed.

As for what the PR was tested on we can add more options in the PR (template options are editable), but of course nice to have pre-populated options so will add the Linux-mint.

Let me know if you have an idea on how I should differentiate between these optional self reminders vs the fixed template structure elements.

@shahzadlone
Copy link
Member Author

shahzadlone commented May 5, 2022

Looks good no me. We can always amend in the future if we find that we need to. I assume this will also be available in the documentation?

Yes for sure, just wanted to have something for now. We will have a more in depth CONTRIBUTION_GUIDELINES.md which I believe @orpheuslummis is working towards taking a crack at, that can be referenced for the reminder / optional items.

@AndrewSisley
Copy link
Contributor

Let me know if you have an idea on how I should differentiate between these optional self reminders vs the fixed template structure elements.

If they are optional self-reminders I dont think they should be in the organisation's PR template. I don't want to have to bother deleting them (or incorrectly ticking them off) in my PRs, and I dont really want to have to skim past them in PRs from others - it is dead space to me diluting the information density of the description and adding to the cost of development. If everything in here is not mandatory/wanted-by-everyone it will either not be used, or corrupted with inaccuracies and dev-specific variations - similar to a poorly thought out coding standards document.

I also think it increases the odds of pedantic bickering in reviews when people start pointing at 'optional' tick boxes to justify their positions - especially on the boxes with more subjective wording.

That said, this is less problematic if it is optional, in a way that adds zero overhead to those who dont want to use it (I dont know what the UI-flow is for this is), but then that should be made super clear in the name (and could perhaps include your name in the doc/display name).

Ultimately I quite strongly believe that the build itself should take care of any mandatory 'stuff', plus a basic level of competence/professionalism from the author/reviewers RE stuff the build cant handle (like sufficient testing).

@shahzadlone
Copy link
Member Author

Let me know if you have an idea on how I should differentiate between these optional self reminders vs the fixed template structure elements.

If they are optional self-reminders I dont think they should be in the organisation's PR template. I don't want to have to bother deleting them (or incorrectly ticking them off) in my PRs, and I dont really want to have to skim past them in PRs from others - it is dead space to me diluting the information density of the description and adding to the cost of development. If everything in here is not mandatory/wanted-by-everyone it will either not be used, or corrupted with inaccuracies and dev-specific variations - similar to a poorly thought out coding standards document.

I also think it increases the odds of pedantic bickering in reviews when people start pointing at 'optional' tick boxes to justify their positions - especially on the boxes with more subjective wording.

That said, this is less problematic if it is optional, in a way that adds zero overhead to those who dont want to use it (I dont know what the UI-flow is for this is), but then that should be made super clear in the name (and could perhaps include your name in the doc/display name).

Ultimately I quite strongly believe that the build itself should take care of any mandatory 'stuff', plus a basic level of competence/professionalism from the author/reviewers RE stuff the build cant handle (like sufficient testing).

I have removed most of the things according to the suggestions, except the environment / OS section. LMK if there is anything else that seems redundant.

@AndrewSisley
Copy link
Contributor

I have removed most of the things according to the suggestions, except the environment / OS section. LMK if there is anything else that seems redundant.

😅 Was really hoping some of the others would chime in first, as I think I'm quite 'lean' with stuff like this and dont want to be the only other voice here. Would suggest other reviewers also read through the older commits when reviewing

## Checklist:

- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Which documentation? I often prefer to change documentation external to the repo after merge (code/behavior is not finalalized until it is merged) , and I can't tell if this line encompasses that too. 100% agree though if it refers to repo-held documentation such as readme/godocs/comments

Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: a more specification indication along these lines:

In light of these changes, I have updated documentation comments. If external documentation should be updated as well, a pull request or issue was created in the relevant repo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion, I was referring to repo-held documentation!

@fredcarle
Copy link
Collaborator

I have removed most of the things according to the suggestions, except the environment / OS section. LMK if there is anything else that seems redundant.

😅 Was really hoping some of the others would chime in first, as I think I'm quite 'lean' with stuff like this and dont want to be the only other voice here. Would suggest other reviewers also read through the older commits when reviewing

I was happy with the first version and I'm happy with this one. I think I'll have more comments after we start using it. Nothing better than experience for these kinds of things.

@shahzadlone
Copy link
Member Author

I was happy with the first version and I'm happy with this one. I think I'll have more comments after we start using it. Nothing better than experience for these kinds of things.

Totes, easier to change in future if we wan to add more stuff. Happy to have a lean one for now and see how it goes.

.github/pull_request_template.md Outdated Show resolved Hide resolved

## Checklist:

- [ ] I have commented my code, particularly in hard-to-understand areas.
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: 'the code' has less of a connotation of ownership than 'my code'

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Will fix.

- [ ] I have made corresponding changes to the documentation.
- [ ] I have made sure that the PR title adheres to the conventional commit style (subset of the ones we use can be found under: [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)

## Environment / OS this was tested on?
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: maybe we can avoid this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would like to do a test run with this in and see how it goes. Can be easily removed if we collectively feel it's irrelevant.

## Checklist:

- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: a more specification indication along these lines:

In light of these changes, I have updated documentation comments. If external documentation should be updated as well, a pull request or issue was created in the relevant repo.

@@ -0,0 +1,27 @@
## Relavent Issue(s)
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: we can perhaps even remove the title of the section and just start with the "Resolves" ...

Copy link
Member Author

Choose a reason for hiding this comment

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

How about a dry run, if it seems extra then happy to remove later. Seems like We have gotten quite lean already haha

Copy link
Contributor

Choose a reason for hiding this comment

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

Whilst I agree with Orpheus here, it does look like if he/I continue to review this there will be nothing left to try out 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's becoming quite clear that the preferred PR template is no PR template at all 🤣. In all seriousness though, a PR template is a necessary evil of large open source projects. Let just start with something and adapt as we go.

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #394 (2146b11) into develop (593214a) will increase coverage by 0.66%.
The diff coverage is n/a.

❗ Current head 2146b11 differs from pull request most recent head a8dd792. Consider uploading reports for the commit a8dd792 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #394      +/-   ##
===========================================
+ Coverage    64.53%   65.20%   +0.66%     
===========================================
  Files           86       80       -6     
  Lines         9866     9251     -615     
===========================================
- Hits          6367     6032     -335     
+ Misses        2867     2599     -268     
+ Partials       632      620      -12     
Impacted Files Coverage Δ
query/graphql/schema/generate.go 80.72% <0.00%> (-0.94%) ⬇️
logging/logger.go 81.63% <0.00%> (-0.73%) ⬇️
query/graphql/planner/sum.go 77.70% <0.00%> (-0.69%) ⬇️
db/collection_update.go 42.92% <0.00%> (-0.20%) ⬇️
db/collection.go 56.07% <0.00%> (ø)
datastore/blockstore.go 45.65% <0.00%> (ø)
query/graphql/parser/query.go 75.20% <0.00%> (ø)
api/http/server.go
core/cid.go
api/http/logger.go
... and 11 more

@shahzadlone shahzadlone merged commit aa3a7ef into develop May 13, 2022
@shahzadlone shahzadlone deleted the lone/tools/add-pr-template branch May 13, 2022 00:17
shahzadlone added a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
- RELEVANT ISSUE(S)

Resolves: sourcenetwork#393

- DESCRIPTION

Adds the following PR template:

```
## RELEVANT ISSUE(S)

Resolves #

## DESCRIPTION

Please include a summary of the change and which issue is fixed. If there isn't an issue, then please create one.
Please also include relevant motivation and context. List any dependencies that are required for this change.

### HOW HAS THIS BEEN TESTED?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

### CHECKLIST:

- [ ] I have commented the code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the repo-held documentation.
- [ ] I have made sure that the PR title adheres to the conventional commit style (subset of the ones we use can be found under: [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)

### ENVIRONMENT / OS THIS WAS TESTED ON?

Please specify which of the following was this tested on (remove or add your own):
- [ ] Arch Linux
- [ ] Debian Linux
- [ ] MacOS
- [ ] Windows
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PR template for Pull Requests on Defra
4 participants