-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Simplify docs-check workflow by extracting functionality #12816
Conversation
9be98b7
to
8865277
Compare
# This manifest contains a Kubernetes Job and supporting definitions for running Rook's Multus | ||
# This manifest contains a Kubernetes job and supporting definitions for running Rook's Multus |
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 intentional. Please revert.
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.
lgtm
3c8fb1d
to
ce83b64
Compare
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, you need to run helm-docs manually, and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts` | ||
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, you need to run helm-docs manually, and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts`. We have made running helm-docs very easy for you by creating a `make` target for it: you only need to run `make helm-docs`. an additional `make` target exists to help you check if there are uncommitted generated helm chart docs: just run `make check-helm-docs` |
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.
Rook has a new initiative to make docs more imperative (notably avoiding "we" and "you" in docs), so this is a good time to update this paragraph.
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, you need to run helm-docs manually, and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts` | |
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, you need to run helm-docs manually, and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts`. We have made running helm-docs very easy for you by creating a `make` target for it: you only need to run `make helm-docs`. an additional `make` target exists to help you check if there are uncommitted generated helm chart docs: just run `make check-helm-docs` | |
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, run `make helm-docs`, and check in the resulting autogenerated markdown files at the path `/Documentation/Helm-Charts`. |
After thinking about this, if I imagine myself to be a new contributor, I think I would be confused how running make helm-docs
is improved by also running make check-helm-docs
. I think it might end up being less confusing new contributors to have this target be something that is not officially documented.
Improvements for new contributors is certainly valuable, and reducing the barrier to entry is worthwhile. In service of that and in a related vein as this PR, something that I think would be most impactful and useful would be to have a make target that runs all auto-generation targets including docs, helm-docs, crds, and any I forgot. The only exception I would make would be make codegen
which takes too long to run.
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.
@BlaineEXE - do I get it right that you are requesting to remove the new mention of the new make target from this section altogether? I can also try to make the wording clearer and avoid using "we" and "you" ...
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.
@obnoxxx wrote:
@BlaineEXE - do I get it right that you are requesting to remove the new mention of the new make target from this section altogether?
Alternatively, I can also try to make the wording clearer and avoid using "we" and "you" ...
I have done that and updated the 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.
@BlaineEXE - do I get it right that you are requesting to remove the new mention of the new make target from this section altogether? I can also try to make the wording clearer and avoid using "we" and "you" ...
Yes. When I read this while imagining standing in the shoes of a new contributor, I think I would feel overwhelmed by the length of the text and confused about what make targets to run. Short and sweet is best, and I've especially noticed this to be true for users/contributors who are in Asia and don't have the same mastery of English.
ce83b64
to
640d6d7
Compare
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.
make docs
also makes the helm docs. How about if we just document make docs
and no need to document a separate make helm-docs
? This will keep the commands simpler. If make helm-docs
still exists, that's just an implementation detail that we don't need to document.
640d6d7
to
abcc79e
Compare
@travisn wrote:
done: updated accordingly. |
@@ -36,7 +36,7 @@ When previewing, now you can navigate your browser to [http://127.0.0.1:8000/](h | |||
Please make sure that your Python binary path is included in your `PATH`. | |||
|
|||
## Running helm-docs |
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.
Can we just change this whole section to only talk about running make docs
? I still think it's nice to keep the developer docs simple. Did you push the changes from when I asked about this previously? Maybe I'm missing the update.
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.
@travisn wrote:
Can we just change this whole section to only talk about running
make docs
? I still think it's nice to keep the developer docs simple.
I fully agree!
Did you push the changes from when I asked about this previously? Maybe I'm missing the update.
yes, I did that. here is the updated commit: abcc79e
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.
I'm suggesting to not even mention make helm-docs
. Something short like this?
## Making docs
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm
chart automatically. If there are changes in the helm chart, the developer needs to run `make docs`
and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts`.
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.
@travisn wrote:
I'm suggesting to not even mention
make helm-docs
. Something short like this?## Making docs [helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts`.
I just updated it with very similar wording, not mentioning make helm-docs
at all.
2f8b49f
to
80de65d
Compare
## Running helm-docs | ||
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, you need to run helm-docs manually, and check in the resulting autogenerated md files at the path `/Documentation/Helm-Charts` | ||
## making docs | ||
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` and check in the resulting autogenerated md files under the path `/Documentation/Helm-Charts`. |
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.
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` and check in the resulting autogenerated md files under the path `/Documentation/Helm-Charts`. | |
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` and check in the resulting autogenerated md files under the path `/Documentation/Helm-Charts`. |
## making docs | ||
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` and check in the resulting autogenerated md files under the path `/Documentation/Helm-Charts`. | ||
|
||
running `make docs` will do everything that is needed including invocation of helm-docs. |
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.
Do we need lines 41-43? They seem like details that only someone looking at makefiles needs to know. IMO the developer guide doesn't need these details for normal usage.
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.
@travisn wrote:
Do we need lines 41-43? They seem like details that only someone looking at makefiles needs to know. IMO the developer guide doesn't need these details for normal usage.
I fully agree. removed
07068d7
to
6e1b47a
Compare
## Making docs | ||
|
||
[helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` (to run helm-docs) and check in the resulting autogenerated md files under the path `/Documentation/Helm-Charts`. | ||
The CI will check on a PR if helm-docs modifies any checked-in file that the developer forgot to commit and complain in that case. To make it easy to check locally for uncommitted changes generated by helm-docs, an additional `make` target exists: just running `make check-helm-docs` will run `helm-docs` and complain if this results in uncommitted generated helm chart doc files. So it is a goog habit to run `make check-helm-docs` locally before creating or updating a 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.
Even this line 41 can be removed IMO
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.
@travisn wrote:
Even this line 41 can be removed IMO
I didn't remove it completely, but simplified it, removing the "CI" part ...
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.
Honestly, I don't understand the paragraph. There are some sentence formatting issues and partial sentences.
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.
@travisn wrote:
Honestly, I don't understand the paragraph. There are some sentence formatting issues and partial sentences.
I updated the PR once more to clarify the paragraph. I hope it is clearer now!
Additonally, I am wondering if we should mention that make docs
generates more than just helm chart docs
6e1b47a
to
3dcc485
Compare
@@ -214,6 +214,20 @@ helm-docs: $(HELM_DOCS) ## Use helm-docs to generate documentation from helm cha | |||
-t ../../../Documentation/Helm-Charts/ceph-cluster-chart.gotmpl.md \ | |||
-t ../../../Documentation/Helm-Charts/_templates.gotmpl | |||
|
|||
check-helm-docs: |
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.
Since make docs
also builds the helm docs, do we still need this separate check-helm-docs
? Seems like it's already tested by make check-docs
?
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.
@travisn wrote:
Since
make docs
also builds the helm docs, do we still need this separatecheck-helm-docs
? Seems like it's already tested bymake check-docs
?
good point. I thought about it but decided to keep the separate targets because the check-helm-docs
target has a more specific error message, pointing to a helm-docs specific section in the guide.
3dcc485
to
acc4bad
Compare
5c607ea
to
b28f659
Compare
This simplifies the docs-check workflow definition by extracting functionality directly coded into the workflow file into new make targets 'check-docs' and 'check-helm-docs' and replacing the code in the workflow file by the simple invocation of new make targets. As a side effect, it makes it easily possible for a developer to check locally if they forgot to commit any autogenerated docs. Signed-off-by: Michael Adam <obnox@samba.org>
…ing guide Signed-off-by: Michael Adam <obnox@samba.org> Co-authored-by: : Michael Adam <obnox@samba.org> signed-off-by: Travis Nielsen <tnielsen@redhat.com> Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
b28f659
to
c8c97bb
Compare
Simplify docs-check workflow by extracting functionality (backport #12816)
Description of your changes:
This simplifies the docs-check workflow by extracting hard-coded functionality into new make targets
check-docs
andcheck-helm-docs
that can be called locally by the developer to conveniently check if they forgot to commit some generated docs or the multus validation job manifest fileWhich issue is resolved by this Pull Request:
Checklist:
skip-ci
on the PR.