MDEV-39456: Describe the external contributions process in more details#5007
MDEV-39456: Describe the external contributions process in more details#5007
Conversation
bnestere
left a comment
There was a problem hiding this comment.
The process to address a reviewers comments might be good to include, though I don't know if we have a standard for that. I like each round of review having a single incremental commit, so it is easy to follow up and see if just the changes from that round of review are sufficient. Rather than either continually squashing everything into a single commit & having to re-review the whole patch and remember how it used to look; or a lot of very small commits together.
Thanks, I'll think about that. I guess we need to focus on the smaller contributions (90% of them). For these a single commit is just fine. Besides: github will display the changes for each subsequent commit even if it's a single commit. So I'd rather stick to the single commit situation. But it's be interesting to see what do others think. |
How? I know of the "compare" button which will |
grooverdan
left a comment
There was a problem hiding this comment.
Looking really good @gkodinov !
| * Assignee: Not relevant | ||
| * Label: not relevant | ||
| * Jira | ||
| * State: "Stalled" or "Open" |
| * contain a concise description of what the change is: this goes to the git commit log and is used for reference. | ||
| * should contain all the relevant attribution headers (co-authors, reviewers etc.) | ||
| * The pull request should contain at least a copy of the commit message. Ideally more can be added to it. | ||
| * The pull request should target the right branch. Rule of thumb: the lowest affected activelly supported version for bugs, main branch for features and refactorings. |
There was a problem hiding this comment.
actively
Link to https://mariadb.org/about/#maintenance-policy.
The fixVersion on a JIRA issue can be used as a guide, but limit to actively supported versions,but not rolling releases about to go EOL.
| * should contain all the relevant attribution headers (co-authors, reviewers etc.) | ||
| * The pull request should contain at least a copy of the commit message. Ideally more can be added to it. | ||
| * The pull request should target the right branch. Rule of thumb: the lowest affected activelly supported version for bugs, main branch for features and refactorings. | ||
| * All the relevant buildbot tests should be passing (or, if failing, the failures should be studied and justified as unrelated) |
There was a problem hiding this comment.
Maybe more detail:
Compare to the tests that succeed on the target branch ref: https://buildbot.mariadb.org/#/grid?branch=BRANCHNAME
Check test output if assessing that a test failure is identical.
| * All the relevant buildbot tests should be passing (or, if failing, the failures should be studied and justified as unrelated) | ||
| * The licensing of the pull request should be clear. Ideally the CLA buildbot should be green. If you can't do that mentioning a license in the pull request's description can be a workaround. | ||
|
|
||
| Questions and Answers |
There was a problem hiding this comment.
Move this to the end under its own heading?
- Who creates a Jira issue?es
- anyone can create a JIRA issue
- Can I get a design review of a Jira issue in advance of writing a PR?
- Yes, create a zulip topic and ask if no response within a few days.
- Does fixing a typo, documentation or code comments really require a Jira issue?
- If the issue/change isn't going to make it to a release notes, then a Jira isn't needed.
There was a problem hiding this comment.
I've added the first question. I think the 2nd drifts away a bit. There's a way to contact us in CONTRIBUTING.md already.
And I don't agree with the 3d question's answer. It was made very clear to me by the management that everything should get a jira.
| @@ -0,0 +1,196 @@ | |||
| # Community Contributions Process # | |||
|
|
|||
There was a problem hiding this comment.
I think a statement of how MariaDB values community contributions would be a good way to begin this document.
Every PR update has "compare" button, which gives exactly what you describe. It is also relatively easy to get this effect locally. It can be spoiled by rebase though. OTOH incremental commits in early review stages are probably alright. When it comes closer to merge they need to be squashed anyway. |
|
|
||
| The pull request is used to describe how the bug is fixed. Or how the feature is implemented in detail. | ||
|
|
||
| A pull request should contain a **signle commit**! And that commit should have a commit message that's compliant with the MariaDB coding standards. |
There was a problem hiding this comment.
We don't follow this rule ourselves. It's be odd if I were forced to use single commit e.g. in #4048.
Commit has to be self-contained isolated change, while PR spans such changes to form a solution.
I can imagine the intention was avoiding incremental commits, probably also unjustified commit splitting. In this case it should be stated clearly and distinguished from justified multi-commit PRs.
There was a problem hiding this comment.
well, that's the intent at least. There's always exceptions.
ea460ce to
7b60769
Compare
I believe they're quite readable. E.g. take #5011. The submitter has pushed an initial commit. Then they've updated it with --force. And the Compare link is pretty readable IMHO. |
|
|
||
| ### What should go into the jira ### | ||
|
|
||
| The [Jira](https://jira.mariadb.org) is used to describe the design of the |
There was a problem hiding this comment.
Contributors can save themselves time reworking code if they include implementation details for the bug or feature before they start coding. This provides an opportunity for early feedback that might impact the code solution.
There was a problem hiding this comment.
Added:
Tip
A lot of time an energy can be saved, especially on more complex tasks,
by communicating early with possible reviewers and writing down a design
specification into the Jira prior to implementation
| * Jira | ||
| * State: "Open", "In Progress", "Stalled" or "Needs feedback" | ||
| * Assignee: The preliminary reviewer | ||
| * Label: "Contribution" |
There was a problem hiding this comment.
Why do we have "Contribution" and "External Contribution" labels depending on the review stage? Isn't an external contribution an external contribution through all stages?
There was a problem hiding this comment.
It's the pull requests having the "External contributions" label. And Jiras having "contribution". These were pre-existing. Just quoting them here.
If a contributor only |
Added a new .md document describing the community contribution process. Added a reference to it from the CONTRIBUTING.md.
7b60769 to
bafe1a5
Compare
You can't win them all. We do not have to account for all the github bugs. |
| ## The two sides of a contribution | ||
|
|
||
| A contribution should have **BOTH** a design document | ||
| in[Jira](https://jira.mariadb.org) and a pull request |
| The pull request is used to describe the implementation. | ||
| E.g. how the bug is fixed. Or how the feature is implemented in detail. | ||
|
|
||
| The pull request should contain a **single commit**! |
There was a problem hiding this comment.
No, absolutely not. It often can (and should) do with a single commit. But it's not an absolute rule, it depends on the case. If a contributor puts unrelated changes in one commit we will ask him to split it.
Say, one commit = one logical change, add a link to a guideline, if needed (tons of them on the internet). But do not require wrong behavior here, it'll just be more work for contributors and reviewers.
| * Label: optionally "need feedback" and/or "External Contribution" | ||
| * Jira | ||
| * State: absent or in "Stalled"/"Open"/"Confirmed" | ||
| * Assignee: Not relevant. Keep it empty. |
There was a problem hiding this comment.
do they even can set an assignee?
| * Assignee: Not relevant, keep empty | ||
|
|
||
| Contributions in this state should be ready for review. This means: | ||
| * There should be a single commit in the pull request and this commit must |
| * The pull request should contain at least a copy of | ||
| the commit message. Ideally more can be added to it. | ||
| * The pull request should target the | ||
| [right branch]( https://mariadb.org/about/#maintenance-policy). |
There was a problem hiding this comment.
not a good link. [right branch] link should point to a document that explains how to select a right branch. We don't have it, so "right branch" should not be a link. Try
- The pull request should target the right branch. Rule of thumb: the lowest affected but not older than three years GA branch for bugs, main branch for features and refactorings.
| * "In review" means that somebody is assigned to review and they are | ||
| working on it | ||
| * "Stalled" means that they're waiting on something | ||
| * "In testing" means a QA engineer is assigned and they are working on |
| * "In testing" means a QA engineer is assigned and they are working on | ||
| testing this. | ||
| * "Needs feedback" means that the reviewer needs feedback to proceed | ||
| * "In progress" means that the reviewer waited for reply by |
There was a problem hiding this comment.
does it mean that In progress on you means the issue is back to the contributor? In progress is an active state, we have automation to kick inactive In-Progress back to Stalled.
|
|
||
| > [!NOTE] | ||
| > There's a requirement that certain contributions need to undergo | ||
| > a quality assurance review. This is usually done for the new features or |
There was a problem hiding this comment.
s/quality assurance review/separate testing step/
| > There's a requirement that certain contributions need to undergo | ||
| > a quality assurance review. This is usually done for the new features or | ||
| > for more complex and risky bug fixes. If that's the desired state, | ||
| > a QA engineer will be assigned as a final reviewer. |
| > The final reviewer is usually the maintainer. And a very busy person! | ||
| > Contributors should make sure to be quick to reply to their questions to | ||
| > keep the process rolling. And should be patient about their replies. | ||
| > They are doing their best to process it as fast as possible. |
There was a problem hiding this comment.
This doesn't sound nice to me. I'd replace the whole note with, like
Tip
The final reviewer is usually the core server developer. They often work in cycles, timed to match the release schedule, switching between bug fixing and new feature development. If a bug fix PR comes in the middle of the new feature development cycle or vice versa It might take up to a couple of months for a developer to do a review.
Added a new COMMUNITY_CONTRIBUTIONS.md document describing the community contribution process.
Added a reference to it from the CONTRIBUTING.md.