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

docs: check updates for the Helm reference #17613

Merged
merged 2 commits into from Oct 22, 2021

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented Oct 14, 2021

Cilium's documentation has a reference for the Helm values supported in its Charts. The reference is auto-generated, and is supposed to be updated each time the Charts are modified. To help keep the reference up-to-date, Cilium's CI should warn when developers forgot to regenerate and commit the document.

Because the CI reported missing updates in the past, we thought that this was covered. But it turns out that the CI would only complain when it fails to update the Helm reference - typically when some words need to be added to the spelling list. If the update goes fine, there is no check in place to validate that the regenerated file is identical to the one currently in the repository. This has led to multiple PRs missing the update for the Helm reference in the past.

Address the issue by adding a check-helmvalues.sh script to validate that the current file is identical to the version in Git's HEAD. Run this script from the Makefile, as part of the check target.

We also create a update-helm-values target, which looks cleaner to add as a prerequisite for check instead of passing the name of a .rst file. We also introduce a FORCE phony target to explicitly mark that we want the file regenerated each time.

@qmonnet qmonnet added area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Oct 14, 2021
@qmonnet qmonnet requested a review from a team as a code owner October 14, 2021 17:02
@qmonnet qmonnet marked this pull request as draft October 14, 2021 17:09
@qmonnet qmonnet marked this pull request as ready for review October 14, 2021 17:34
@qmonnet qmonnet requested review from a team as code owners October 14, 2021 17:34
Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@qmonnet
Copy link
Member Author

qmonnet commented Oct 14, 2021

Travis error is related, it happens while we try to regenerate the Helm reference after building Cilium, as part of the postcheck target. Prior to this PR, we wouldn't update the Helm reference and check for differences. Now we do, and something goes wrong.

My understanding from the logs and error message is that the helm-docs Go binary that we try to launch from the Docker image doesn't work... on the arm64 architecture where the build is failing.

I'll update tomorrow, and probably disable the check if on arm64. I don't suppose it is worth building a second helm-docs image at the moment?

Cilium's documentation has a reference for the Helm values supported in
its Charts. The reference is auto-generated, and is supposed to be
updated each time the Charts are modified. To help keep the reference
up-to-date, Cilium's CI should warn when developers forgot to regenerate
and commit the document.

Because the CI reported missing updates in the past, we thought that
this was covered. But it turns out that the CI would only complain when
it _fails_ to update the Helm reference - typically when some words need
to be added to the spelling list. If the update goes fine, there is no
check in place to validate that the regenerated file is identical to the
one currently in the repository. This has led to multiple PRs missing
the update for the Helm reference in the past.

Address the issue by adding a check-helmvalues.sh script to validate
that the current file is identical to the version in Git's HEAD. Run
this script from the Makefile, as part of the "check" target.

We also create a "update-helm-values" target, which looks cleaner to add
as a prerequisite for "check" instead of passing the name of a .rst
file. We also introduce a "FORCE" phony target to explicitly mark that
we want the file regenerated each time.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Update the reference for Helm values as a follow-up to a recent change
in the Charts.

Fixes: cilium#17509
Fixes: 105e1ab ("Allowed to set labels to ServiceMonitors")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

🎉

@qmonnet
Copy link
Member Author

qmonnet commented Oct 15, 2021

Travis build for arm64 went fine and it has the message about the skipped action 👍

Copy link
Contributor

@bmcustodio bmcustodio left a comment

Choose a reason for hiding this comment

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

Thank you for fixing it! 🎉

@qmonnet qmonnet added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 21, 2021
@kkourt kkourt merged commit fe56288 into cilium:master Oct 22, 2021
@qmonnet qmonnet deleted the pr/helm-values-check branch October 22, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants