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

Add documentation to the controller code and main.go #67

Closed
wants to merge 10 commits into from

Conversation

courtneypacheco
Copy link
Contributor

Adding documentation to the controller code and main.go so that contributors and users have an easy time understanding the purpose of the functions, variables, structs, etc. in the codebase.

Adding documentation to the code in 'main.go' so that contributors
and developers can understand the purpose of each function, variable,
etc..
…ller.go

Adding documentation to various functions and variables within the
nodefeaturediscovery_controller.go file so that users and contributors
can have a deeper understanding of how the reconciliation process
works with the NFD Operator.
Adding documentation to describe what each of the vars and funcs in
the NFD controls file does, when to use them, and why they're
important.
Adding documentation describing the funcs, vars, etc. in the NFD
controller resources file so that users and contributors can
understand how they all work.
…erator)

Adding documentation to the NFD state functions related to NFD itself
so that users and contributors can understand how NFD works with the NFD
operator, especially if they are looking at another file that references
these functions and the NFD struct.
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 14, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @courtneypacheco. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot
Copy link
Contributor

Welcome @courtneypacheco!

It looks like this is your first PR to kubernetes-sigs/node-feature-discovery-operator 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/node-feature-discovery-operator has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 14, 2021
@ArangoGutierrez
Copy link
Contributor

/uncc @zvonkok
/cc @marquiz
/assign marquiz

@k8s-ci-robot k8s-ci-robot requested review from marquiz and removed request for zvonkok May 14, 2021 20:19
@ArangoGutierrez
Copy link
Contributor

/retest

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: courtneypacheco
To complete the pull request process, please ask for approval from marquiz after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Courtney Pacheco <cpacheco@redhat.com>
@ArangoGutierrez
Copy link
Contributor

CLA has been signed, it should be updated soon

@ArangoGutierrez
Copy link
Contributor

hey @mrbobbytables !!! @courtneypacheco has signed the CLA, could you help us with the flag :) thanks, you are awesome Bob!!!

@mrbobbytables
Copy link
Member

/check-cla

4 similar comments
@ArangoGutierrez
Copy link
Contributor

/check-cla

@ArangoGutierrez
Copy link
Contributor

/check-cla

@ArangoGutierrez
Copy link
Contributor

/check-cla

@ArangoGutierrez
Copy link
Contributor

/check-cla

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Welcome @courtneypacheco and thanks for the patchset! Improving the readability and documentation of the code through code comments is great. It's good to have the code thoroughly commented. However, I feel that we might slip to a bit excessive side here and might want to trim the comments a bit 😅 I think there's a fine line (and personal preferences) when there are too much code comments as they need to be maintained, too. They can become a sort of a maintenance burden, and, get out-of-sync with the actual source code. Of course, the ideal would be that all code is so well written that it documents itself and is easy to read without any comments (except for API documentation as "docstrings" before exported symbols). Of course, that's not the case in real world and well-placed, concise comments aid in the readability and document non-obvious/atypical characteristics.

I didn't have the time to go thoroughly through the whole PR, yet. Thus, I just left a few random-ish review comments.

Also, I took a quick look at the commit messages. Looks good, overall 👍 Just few small nits (I know I should be more consistent with commit messages of all PRs but the Github interface does not support that much) 😎 The K8s commit message guidelines is a good read. From there:

  • Try to keep the subject line under 72 chars. I know this is often hard but could drop the part in parentheses from the second-last commit, for example
  • Use imperative mood: Add documentation instead of Adding documentation
  • The first word should be capitalized: Fix gofmt formatting instead of fix gofmt formatting

I'll take a deeper look later 😸

main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
The documentation in the controller and main.go files was
unnecessarily long and could pose problems in the future if a
maintainer or contributor wants to modify a feature that has a lot
of existing documentation. Ideally, documentation should be concise.

Signed-off-by: Courtney Pacheco <cpacheco@redhat.com>
@courtneypacheco
Copy link
Contributor Author

I signed it

@courtneypacheco
Copy link
Contributor Author

/check-cla

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 9, 2021
@ArangoGutierrez
Copy link
Contributor

CLA is check now, we are ready for another round @marquiz

@ArangoGutierrez
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 11, 2021
@marquiz
Copy link
Contributor

marquiz commented Aug 11, 2021

CLA is check now, we are ready for another round @marquiz

👍

Apologies for being inactive on this one. I'll continue the review shortly, probably in smaller chunks, whenever I find adequate time.

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Another batch of comments. A lot of detailed nitting 🙄 Don't take it too hard @courtneypacheco. You're doing a good job here 😄 I just act as an editor, trying to streamline the comments a bit

controllers/nodefeaturediscovery_state.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_state.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_state.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_state.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_state.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_resources.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_resources.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_resources.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_resources.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_resources.go Outdated Show resolved Hide resolved
@ArangoGutierrez
Copy link
Contributor

Release v0.9.0 on NFD is being cooked, so we need to start preparing for Operator V0.3.0, and I want this PR in, how are we here?

@marquiz
Copy link
Contributor

marquiz commented Aug 19, 2021

Release v0.9.0 on NFD is being cooked, so we need to start preparing for Operator V0.3.0, and I want this PR in, how are we here?

@courtneypacheco how is it?

I still need to review the two remaining files, though. Try to do it asap

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Everything reviewed, now

controllers/nodefeaturediscovery_controller.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controller.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controller.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controller.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controller.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controls.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controls.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controls.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controls.go Outdated Show resolved Hide resolved
controllers/nodefeaturediscovery_controls.go Outdated Show resolved Hide resolved
Update the NFD documentation based on feedback in the PR. Will
squash commits before merging.
@courtneypacheco
Copy link
Contributor Author

@marquiz Sorry for the delay. I updated the documentation. I will squash the commits once everything looks good. WDYT?

Btw, thank you very much for the feedback! It was really helpful!

@marquiz
Copy link
Contributor

marquiz commented Aug 25, 2021

@marquiz Sorry for the delay. I updated the documentation.

No problem, thanks for the update. I'll check it shortly

I will squash the commits once everything looks good. WDYT?

Yes, that would be good

Btw, thank you very much for the feedback! It was really helpful!

Good to hear, glad to help. And, as I said, I hope you don't take it too hard despite all the nitting 😆

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2021
@k8s-ci-robot
Copy link
Contributor

@courtneypacheco: PR needs rebase.

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.

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Thanks @courtneypacheco for your efforts 😎 Looks good to me now 👍

Please rebase and squash and then we can merge this (unless @ArangoGutierrez has some feedback)

@ArangoGutierrez
Copy link
Contributor

Thanks @courtneypacheco for your efforts sunglasses Looks good to me now +1

Please rebase and squash and then we can merge this (unless @ArangoGutierrez has some feedback)

@courtneypacheco we are good to go, let's squash -> Rebase and we will be good to merge

@marquiz
Copy link
Contributor

marquiz commented Sep 17, 2021

ping @courtneypacheco

@ArangoGutierrez
Copy link
Contributor

Superseed by #87

@marquiz Courtney is no longer working on this project, I am taking over her PR's to get them in

@ArangoGutierrez
Copy link
Contributor

/close

@k8s-ci-robot
Copy link
Contributor

@ArangoGutierrez: Closed this PR.

In response to this:

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants