Fix helm_import_repository canonical dict to avoid spurious DEBUG messages#520
Draft
agentydragon wants to merge 1 commit intodevelfrom
Draft
Fix helm_import_repository canonical dict to avoid spurious DEBUG messages#520agentydragon wants to merge 1 commit intodevelfrom
agentydragon wants to merge 1 commit intodevelfrom
Conversation
helm_import_repository returns chart_name/version derived from the url in its canonical return dict, but forbids setting those attrs alongside url. This causes Bazel to emit unfollowable canonicalization suggestions. Patch the return to only include attrs that were actually provided. https://claude.ai/code/session_01SEXMX7ncHpY2swVzggsYkd
cb3df7d to
2a0568e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Apply a patch to
rules_helmthat fixes thehelm_import_repositoryrule to return a canonical dict with only the relevant fields based on how the repository was configured, eliminating spurious DEBUG messages about unfollowable suggestions.Key Changes
third_party/rules_helm/canonical-return.patchthat modifies the return value of_helm_import_repository_implinhelm/private/import.bzlnameandsha256urlis provided: includesurlonlyurlis not provided: includeschart_name,repository, andversionthird_party/rules_helm/BUILD.bazelto export the patch fileMODULE.bazelto apply the patch torules_helmversion 0.21.0 viasingle_version_overrideImplementation Details
The fix addresses a bug where the rule was returning all fields in the canonical dict regardless of configuration, causing Bazel to suggest setting
chart_nameandversionattributes even when the repository was configured with a directurl. Since the rule forbids setting these attributes alongsideurl, the suggestions were impossible to follow. The patch makes the canonical dict reflect only the fields that are actually relevant to the repository's configuration.https://claude.ai/code/session_01SEXMX7ncHpY2swVzggsYkd