-
Notifications
You must be signed in to change notification settings - Fork 330
Publish documentation to UDR instead of the Consul repo #4953
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ruben Nic <[email protected]>
hack/helm-reference-gen/main.go
Outdated
| versionMap map[string][]ProductVersion | ||
| latestVersion string | ||
| ) | ||
| if len(versionMetadataBytes) > 0 { |
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.
Let's rewrite this to follow a "fail early style", and exit if:
- versionMetadataBytes is empty
- versionMetadataBytes fails to parse
- latestVersion is not set
This would clean up a lot of this nesting.
boruszak
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.
I checked out your branch and ran the instructions as given. The file generated and I was able to open a PR: https://github.com/hashicorp/web-unified-docs/pull/1307/files
The PR adds outdated Helm fields though - I'm guessing your consul-k8s fork is behind the main repo. I suggest merging this PR, and then I can sort out these issues on my end.
Thanks so much!
Fail early if any of the following are true: - versionMetadata is empty - versionMetadata fails to parse - latestVersion is not set
|
@RubenSandwich I restructured the code a little to fail early in 7421aef. Let me know if that's more in line with what you had in mind? @boruszak Just noticed that adding a new commit dismissed your review, sorry if it needs to be re-approved or messed something up |
RubenSandwich
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.
Looks good now. 👍🏻
boruszak
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.
LGTM!
Changes proposed in this PR
consul-k8sto publish documentation to UDR instead of the Consul repo, following the Consul migration to UDRHow I've tested this PR
I've run
go testin thehack/helm-referencedirectory to ensure that the tests still passHow I expect reviewers to test this PR
run
make gen-helm-docsand follow the instructions in the README to build helm docs.Checklist