-
Notifications
You must be signed in to change notification settings - Fork 1.5k
202503 Apache NuttX RTOS Contributing Guidelines update. #15950
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
202503 Apache NuttX RTOS Contributing Guidelines update. #15950
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
CONTRIBUTING.md
Outdated
| For maintenance reasons, code and documentation should be split into | ||
| two separate commits in the same PR. This helps backporting and separates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cederom I suggest removing this requirement, as I have shown other project doesn't require it and even Linux that @jerpelea said requires it I looked the git history and them don't have this requirement.
@raiden00pl @xiaoxiang781216 @hartmannathan for awareness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All related change should come in one patch to avoiding the mismatch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will do as the majority decides
here is a Linux example
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/Documentation/bpf?h=v6.14-rc5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed rule reflects exactly what we've been doing for a while (same PR, separate commits). About adding it to the same (or to an individual commit), well, there is always that "gold" rule that each commit should aggregate the minimum buildable code necessary to it. That being said, this rule adheres to it: documentation is not mandatory to make the "code" buildable and should be split into different commits.
The same is valid for arch and board support: when a new feature is added, it might not be mandatory to have arch and board-code in the same commit (the arch code is buildable by itself). They can be split into different commits (in the same PR!). Documentation would be the third commit. Reverting it requires reverting all commits in the same PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference between adding something new to the documentation and updating the documentation according to changes made to the code. I don't see a problem with a separate commit for doc in the first case, but in the second case this seems strange. Documentation describes the code, if the code changes then the documentation should also be changed otherwise the doc doesn't describe the current code state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cederom I suggest removing this requirement, as I have shown other project doesn't require it and even Linux that @jerpelea said requires it I looked the git history and them don't have this requirement.
@raiden00pl @xiaoxiang781216 @hartmannathan for awareness
Thanks, @acassis. I am okay with either option. Code and Documentation in same commit is OK with me, for git bisect purposes. I'm also OK with separating the commits but same PR.
We should choose one and standardize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference between adding something new to the documentation and updating the documentation according to changes made to the code. I don't see a problem with a separate commit for doc in the first case, but in the second case this seems strange. Documentation describes the code, if the code changes then the documentation should also be changed otherwise the doc doesn't describe the current code state.
Exactly, it could happen very ofter: someone revert a commit and forgot the revert the other documentation commit, so the documentation will be out of sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is advised that the code and documentation should be split into two
separate commits in the same PR. This helps backporting and separates
possible code and documentation build errors. Squashing code together with
documentation into a single commit should be avoided, but is acceptable.
How about this one? We may prefer to have doc and code commits separate but accept code+doc commits too? :-)
The revert argument is valid, although we use PR revert over github, but code PR may be reverted on nuttx-apps and skipped on nuttx where documentation resides, true. This is why having good PR descriptions is so important.
I can also understand the backporting argument.. but when the code is backported along with the documentation it should be also okay?
I also updated these two points (added "in the same PR"):
If change presents new functionality documentation must be provided
in the same PR along with the code (not in the future).If change requires existing documentation update it must be contained
in the same PR along with the code change (not in the future).
tmedicci
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor suggestion. Thanks @cederom !
CONTRIBUTING.md
Outdated
| For maintenance reasons, code and documentation should be split into | ||
| two separate commits in the same PR. This helps backporting and separates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed rule reflects exactly what we've been doing for a while (same PR, separate commits). About adding it to the same (or to an individual commit), well, there is always that "gold" rule that each commit should aggregate the minimum buildable code necessary to it. That being said, this rule adheres to it: documentation is not mandatory to make the "code" buildable and should be split into different commits.
The same is valid for arch and board support: when a new feature is added, it might not be mandatory to have arch and board-code in the same commit (the arch code is buildable by itself). They can be split into different commits (in the same PR!). Documentation would be the third commit. Reverting it requires reverting all commits in the same PR.
hartmannathan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to everyone for your efforts!! Hope my review suggestions are helpful. Feel free to use them, modify them, or ignore them!!
CONTRIBUTING.md
Outdated
| ## Guidelines | ||
| If you haven't yet read | ||
| [The Inviolable Principles of NuttX]( https://github.com/apache/nuttx/blob/master/INVIOLABLES.md) | ||
| please do so right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| please do so right now. | |
| please do so first. |
CONTRIBUTING.md
Outdated
| To help us successfully review your contribution, it is very | ||
| important that you follow these guidelines. | ||
| Please note that NuttX supports over 15 different architectures, 360+ boards, | ||
| and 1600+ configurations, that are used in various project and products around |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| and 1600+ configurations, that are used in various project and products around | |
| and 1600+ configurations, that are used in various projects and products around |
CONTRIBUTING.md
Outdated
| Please note that NuttX supports over 15 different architectures, 360+ boards, | ||
| and 1600+ configurations, that are used in various project and products around | ||
| the world. Remember that any code change may affect different users and their | ||
| business. Please try to keep your contributions high quality and compatible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| business. Please try to keep your contributions high quality and compatible. | |
| businesses. Please try to keep your contributions high quality and compatible. |
CONTRIBUTING.md
Outdated
|
|
||
| If you need more information please read the [Full Contributing Documentation](https://nuttx.apache.org/docs/latest/contributing/index.html). | ||
| To help us smoothly process your contributions it is very important that you | ||
| follow the guidelines. These rules are based on daily experiences and helps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| follow the guidelines. These rules are based on daily experiences and helps | |
| follow the guidelines. These rules are based on daily experiences and help |
CONTRIBUTING.md
Outdated
| To help us smoothly process your contributions it is very important that you | ||
| follow the guidelines. These rules are based on daily experiences and helps | ||
| us preserve long term self-compatibility and maintenance of the project. | ||
| NuttX is maintained by a small team of volunteers from around the world. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good sentence, but I think it might need to move to elsewhere in the document, because it doesn't quite fit with the flow of this part of the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, i used top-bottom approach.. did small rearrangement.. what place would be better or what better text? :-)
CONTRIBUTING.md
Outdated
| This PR cannot be merged until all requests are resolved. | ||
| 2. PR is marked as "Draft" to avoid accidental merge. | ||
| 3. Detailed discussion should follow both in PR **and** dev@ Mailing List. | ||
| 4. Alternative non-breaking solution is researched along the community. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 4. Alternative non-breaking solution is researched along the community. | |
| 4. Alternative non-breaking solution is researched alongside the community. |
CONTRIBUTING.md
Outdated
| 5. Breaking change after discussion / updates is voted on the mailing | ||
| list, requires at least 4 +1 binding votes and single -1 binding vote | ||
| blocks the change (binding vote means PMC member). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 5. Breaking change after discussion / updates is voted on the mailing | |
| list, requires at least 4 +1 binding votes and single -1 binding vote | |
| blocks the change (binding vote means PMC member). | |
| 5. Breaking change after discussion / updates is voted on the mailing | |
| list and requires at least 4 +1 binding votes with no -1 binding votes. | |
| Any -1 binding vote is a [veto](https://apache.org/foundation/voting.html#Veto) and blocks the change. | |
| NuttX PMC members cast binding votes. See [Apache Voting Process](https://apache.org/foundation/voting.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for my suggested text not being line-wrapped properly. I am doing this from mobile device!
CONTRIBUTING.md
Outdated
| (i.e. `apps/ostest`) for **more than one** different architecture is | ||
| **mandatory**. Community support is welcome. | ||
|
|
||
| QEmu tests does not count here as in the past it did not catch problems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| QEmu tests does not count here as in the past it did not catch problems | |
| QEmu tests **do not count** here as in the past they did not catch problems |
(Also I'm unsure of QEmu; I have always seen it stylized as QEMU before.)
| 3. Merge of PRs with unresolved discussions and "change request" marks | ||
| is not allowed. | ||
| 3. Self committed code merge with or without review is not allowed. | ||
| 4. Direct push to master is not allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(We should setup nuttx and apps repos to block direct push to master. That is something we can do ourselves; INFRA does not need to be involved in that.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely :-) I am kinda new here but this is not allowed on most repos that I know, not sure why it was enabled, but there may be a reason? We will switch it after rules are applied for sure :-)
CONTRIBUTING.md
Outdated
| I confirm that changes are verified on local setup and works as intended: | ||
| * Build Host(s): OS (Linux,BSD,macOS,Windows,..), CPU(Intel,AMD,ARM), compiler(GCC,CLANG,version), etc. | ||
| * Target(s): arch(sim,RISC-V,ARM,..), board:config, etc. | ||
| * you can also provide steps on how to reproduce problem and verify the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * you can also provide steps on how to reproduce problem and verify the change. | |
| * you can also provide steps on how to reproduce the problem and verify the change. |
|
Just to make sure: this file is not rendered into the documentation at https://nuttx.apache.org/docs/latest/index.html, right? Still pending adding the same info at https://nuttx.apache.org/docs/latest/contributing/index.html (maybe creating a new page) |
2a59298 to
973b133
Compare
Yes, this is only the |
|
Thank you folks for all the remarks and grammar suggestions! The update is pushed, please comment :-) |
Just re-reviewed: we are fine here. Can you mark the PR as ready-to-review, @cederom please? |
973b133 to
8121b68
Compare
8121b68 to
bef1ceb
Compare
Done :-) Please add more comments or resolve remaining discussions if all is fine folks :-) Thanks!! :-) |
bef1ceb to
91e39a3
Compare
|
Question for old PR before this Guidelines update. |
Good question, probably we will ask for the PR/COMMIT description updates where necessary, but we will handle them as usual? If the PR is good right from start there is not much to be done except for code verification :-) All this is to help everyone in the review process, set standards, and improve quality of the process / project. There are lots of good PRs already and overall is improving. There are not many active reviewers and still outnumbered. I think that long term self-compatibility is the goal and reason behind this update :-) |
|
Hi @cederom I was referring to Post Always Be Closing...Pull Requests |
hartmannathan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only found a couple of typos but otherwise LGTM, thanks to everyone!
CONTRIBUTING.md
Outdated
|
|
||
| * Provide only **signed commits** (`git commit -s`) with valid author | ||
| and email fields. | ||
| The rules presented are here to ensure high qualiy code and documentation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The rules presented are here to ensure high qualiy code and documentation, | |
| The rules presented are here to ensure high quality code and documentation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you fixed! :-)
CONTRIBUTING.md
Outdated
| * Provide only **signed commits** (`git commit -s`) with valid author | ||
| and email fields. | ||
| The rules presented are here to ensure high qualiy code and documentation, | ||
| standardized pull requests processing, as well as long term self-compatibilty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| standardized pull requests processing, as well as long term self-compatibilty | |
| standardized pull requests processing, as well as long term self-compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you fixed! :-)
* This change comes from vast mailing list discussions on low PR/COMMIT quality, breaking changes, code quality, long term self-compatibility and maintenance, review problems, and how to improve things. * Contributing Guidelines updates vote history: 1. https://www.mail-archive.com/dev@nuttx.apache.org/msg12584.html 2. https://www.mail-archive.com/dev@nuttx.apache.org/msg12723.html Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
91e39a3 to
9c598e1
Compare
|
@acassis could you please review your remarks and close discussions if all is okay? :-) |
quality, breaking changes, code quality, long term self-compatibility
and maintenance, review problems, and how to improve things.