Skip to content

Conversation

@rmainwork
Copy link
Collaborator

@rmainwork rmainwork commented Nov 14, 2025

Changes proposed in this PR

How I've tested this PR

I've run go test in the hack/helm-reference directory to ensure that the tests still pass

How I expect reviewers to test this PR

run make gen-helm-docs and follow the instructions in the README to build helm docs.

Checklist


@rmainwork rmainwork requested a review from a team as a code owner November 14, 2025 16:57
@rmainwork rmainwork added pr/no-backport signals that a PR will not contain a backport label and removed pr/no-backport signals that a PR will not contain a backport label labels Nov 14, 2025
versionMap map[string][]ProductVersion
latestVersion string
)
if len(versionMetadataBytes) > 0 {
Copy link

@RubenSandwich RubenSandwich Nov 14, 2025

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:

  1. versionMetadataBytes is empty
  2. versionMetadataBytes fails to parse
  3. latestVersion is not set

This would clean up a lot of this nesting.

boruszak
boruszak previously approved these changes Nov 14, 2025
Copy link
Contributor

@boruszak boruszak left a 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
@rmainwork
Copy link
Collaborator Author

rmainwork commented Nov 14, 2025

@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

Copy link

@RubenSandwich RubenSandwich left a comment

Choose a reason for hiding this comment

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

Looks good now. 👍🏻

Copy link
Contributor

@boruszak boruszak left a comment

Choose a reason for hiding this comment

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

LGTM!

@boruszak boruszak added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport signals that a PR will not contain a backport label labels Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-backport signals that a PR will not contain a backport label pr/no-changelog PR does not need a corresponding .changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants