Fix nil pointer crash when updating OCI chart dependencies - #1746
Closed
schnell3526 wants to merge 15 commits into
Closed
Fix nil pointer crash when updating OCI chart dependencies#1746schnell3526 wants to merge 15 commits into
schnell3526 wants to merge 15 commits into
Conversation
Remove workflows that are specific to HashiCorp's internal tooling: - build.yml (replaced by GoReleaser) - changelog-checker.yml - hc-copywrite.yml - issue-comment-created.yml - issue-opened.yml - jira-issues.yml - jira-pr.yml - website.yaml Also remove .release/ directory (HashiCorp CRT config).
This workflow requires HashiCorp's self-hosted runner (custom-linux-medium) which is not available in this fork.
feat: Add GoReleaser configuration and update module paths to schnell…
Fix issues in acceptance tests added by upstream PR hashicorp#1734: 1. TestAccResourceRelease_updateExistingFailed: - Fix expected revision from "3" to "4" since each failed upgrade (Step 2 and Step 3) increments the Helm revision 2. TestAccResourceRelease_statePreservedDuringRefresh: - Remove Config from RefreshState step as terraform-plugin-testing does not allow Config and RefreshState in the same TestStep 3. TestAccResourceRelease_refreshPreservesFailedState: - Same fix: Remove Config from RefreshState step
The status attribute returns lowercase "failed", not uppercase "FAILED". Use the Helm SDK constant for consistency with other tests.
fix(helm_release): Preserve Terraform state on failed Helm operations
- Add explanation of why this fork exists - Add installation instructions with schnell3526/helm source - List changes from upstream (state deletion bug fix) - Add roadmap with Helm v4 support planned - Update badges to point to this repository
docs: Update README for community fork
When dependency_update is enabled and chart dependencies use OCI registries, the downloader.Manager was created without the RegistryClient field set. This caused a nil pointer dereference when the downloader tried to resolve version constraints (like ~1.0.0) that require listing tags from the registry. The fix adds RegistryClient to the Manager initialization in both: - resource_helm_release.go (helm_release resource) - data_helm_template.go (helm_template data source) This allows the downloader to properly authenticate and communicate with OCI registries when fetching chart dependencies. Fixes: panic: runtime error: invalid memory address or nil pointer dereference in helm.sh/helm/v3/pkg/registry.(*Client).Tags
Release notes will be managed manually in CHANGELOG.md
- Add simple migration steps from hashicorp/helm - Add OCI dependency update fix to changes list
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
Backport fix for nil pointer dereference crash when
dependency_updateis enabled with OCI registry charts.Upstream Reference
Problem
When
dependency_updateis enabled and chart dependencies use OCI registries, thedownloader.Managerwas created without theRegistryClientfield set. This causes a nil pointer dereference when the downloader tries to resolve version constraints.Changes
helm/resource_helm_release.go: AddRegistryClientto downloader.Managerhelm/data_helm_template.go: AddRegistryClientto downloader.ManagerREADME.md: Add migration guide and update changes listCloses #5