-
Notifications
You must be signed in to change notification settings - Fork 743
Expand project guidelines #8314
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
Conversation
|
Skipping CI for Draft Pull Request. |
CONTRIBUTING.md
Outdated
| * ... passes PR gating tests, or failing tests are waived by means of explaining the reason. | ||
| * ... adheres to the [coding style](docs/manual/developer/04_style_guide.md#complianceascode-style-guide). | ||
| * ... has been tested. There are following options that allow for testing various aspects of the project: | ||
| * [SSG Test Suite](tests/README.md) for rule tests that ensures that test OVAL checks and that test the ability of remediations to satisfty those checks. |
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.
| * [SSG Test Suite](tests/README.md) for rule tests that ensures that test OVAL checks and that test the ability of remediations to satisfty those checks. | |
| * [SSG Test Suite](tests/README.md) for rule tests that ensures that test OVAL checks and that test the ability of remediations to satisfy those checks. |
Add measures that will help to keep the code maintenance costs under control and that will make code reviews a smoother experience.
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.
Overall, I really like this. I have few suggestions for improving some wording.
Co-authored-by: Matthew Burket <m@tthewburket.com>
|
@matejak: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
My 2c but I think it looks fairly good and makes sense.
CONTRIBUTING.md
Outdated
| * ... has been approved by an SME of the area that the PR addresses, which indicates that it is generally a step in a right direction. | ||
| * ... passes PR gating tests, or failing tests are waived in a comment by the reviewer explaining the reasoning. | ||
| * ... adheres to the [coding style](docs/manual/developer/04_style_guide.md#complianceascode-style-guide). | ||
| * ... has been tested. The following options that allow for testing various aspects of the project: |
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.
nit: remove that
| * [Unit tests](tests/unit) that test components of the build system as well as components of the SSG Test Suite. | ||
| * Ad-hoc tests that are integrated into the `ctest` chain directly, i.e. the shellcheck test. | ||
| * ... updates READMEs, man pages or other documentation when changes of described behavior are introduced. | ||
| * ... doesn't contain merge commits - those can be removed by rebasing. |
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.
Might be helpful to link to a rebasing/git guide if we have one.
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 don't, please somebody suggest something that is both to the point and isn't located on some obscure blog that may go offline in a couple of years.
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.
@matejak , this might be useful: https://github.com/marcusburghardt/ansible-role-openscap/blob/master/files/STARTGUIDE.md
It is included in the ansible-role-openscap.
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.
So for the time being, I would proceed with merging this PR as it is, because your guide doesn't contain all the info that one could be after, and supplying that would take some time. I see no issue with referencing it, or even with putting it here and referencing it from the roles project.
I think that following issues should be covered there:
- merge commits, how to recognize them
- what rebase does, and what can be accomplished by interactive rebase (reordering, merge of commits)
- a few words about conflict resolution - when to expect them and generally how to handle them
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 can also turn on a setting in the project that forbids merge commits to help automate this requirement.
CONTRIBUTING.md
Outdated
| * Ad-hoc tests that are integrated into the `ctest` chain directly, i.e. the shellcheck test. | ||
| * ... updates READMEs, man pages or other documentation when changes of described behavior are introduced. | ||
| * ... doesn't contain merge commits - those can be removed by rebasing. | ||
| * ... is rebased against recent-enough branch that executes the whole range of expected integrated gating tests. |
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.
nit: Maybe relevant versus expected? The expected behavior, IMO, would be for GitHub to auto-rebase the present target branch state and the proposed PR changes and then run CI on top of that, but sadly it doesn't and instead takes the base branch as-is. :-) Saying relevant would allow for some variation in main branch, but suggest that any tests which impact the proposed changes should be pulled in first. Thoughts?
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.
fair enough :-)
CONTRIBUTING.md
Outdated
| * ... doesn't contain merge commits - those can be removed by rebasing. | ||
| * ... is rebased against recent-enough branch that executes the whole range of expected integrated gating tests. | ||
| * ... doesn't increase maintenance costs, and if it does, there is a substantial counterbalance. | ||
| * ... doesn't impact the build time in a significant way. |
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.
Maybe negatively impact? :-) If we improve the build time significantly, that might be good to merge :D
| * Include tests for your contribution. | ||
| * Write comments if and only if there is no chance for the code to explain itself. | ||
| * Don't put authorship information into the code, Git tracks authorship for you. | ||
| Use [SPDX IDs](https://spdx.dev/ids/) for license-related boilerplate in newly written code. |
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.
Are we suggesting SPDX IDs for all new (code) files or are we saying if a file needs it, we should add it? If the former, should we go back and apply it retroactively? A quick scan of some files in ssg and build-scripts says they're presently lacking, and IMO, I think the LICENSE in the root of the project applies fine enough to avoid SPDX-ing the project.
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.
Good point, the suggestion's intention was towards "don't copy-paste the whole license".
|
@Xeicker @dodys @anivan-suse any input on this? I tagged you because you did latest contributions for different products. |
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.
lgtm, just curious on the SPDX question from Alex
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.
Just my idea to help clean up the testing requirements.
| * Write comments if and only if there is no chance for the code to explain itself. | ||
| * Don't put authorship information into the code, Git tracks authorship for you. | ||
| Don't copy-paste license text into source files -- use [SPDX IDs](https://spdx.dev/ids/) for that purpose. | ||
| * Don't take part in making files longer - files longer than 400 lines should be an exception. |
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.
| * Don't take part in making files longer - files longer than 400 lines should be an exception. | |
| * Don't take part in making files longer - files longer than 250 lines should be an exception. |
Currently, Code Climate is set to a 250 LOC limit, we can change that to 400 if you think that is a better limit.
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.
So I would converge gradually, so let's set the limit to 400, and then restrict it further when there is a lower amount of findings.
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.
Sounds good; I will get a PR up with the code climate config.
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.
See #8785
Co-authored-by: Matthew Burket <m@tthewburket.com>
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 to everyone who participated in this PR. Comments have been processed and these updates are in good shape. Improvements are always welcome through other PRs.
Add measures that will help to keep the code maintenance costs under control and that will make code reviews a smoother experience.