X Tutup
Skip to content

fix(helm): Remove validation check for helm chart name#7873

Merged
olblak merged 2 commits intoupdatecli:mainfrom
varad-kadam:fix-helm-name
Mar 10, 2026
Merged

fix(helm): Remove validation check for helm chart name#7873
olblak merged 2 commits intoupdatecli:mainfrom
varad-kadam:fix-helm-name

Conversation

@varad-kadam
Copy link
Contributor

Fix #5953

Removed validation check for name.

As per my understanding, in:
updatecli/pkg/plugins/resources/helm/target.go

The filepath is constructed as:

yamlSpec := yaml.Spec{
		File: filepath.Join(c.spec.Name, c.spec.File),
		Key:  c.spec.Key,
	}

If the Chart.yaml is at the root of the directory, there should be no issue, since both paths resolve to the same file.

Test

To test this pull request, you can run the following commands:

go test -v ./pkg/plugins/resources/helm -run TestValidateTarget
go test -v ./pkg/plugins/resources/helm

@olblak olblak added the bug Something isn't working label Mar 9, 2026
@olblak
Copy link
Member

olblak commented Mar 10, 2026

Thanks for the pull request. After a quick test, it seems to be working well.
If someone forgot to specify the chart name, then the error message should be obvious, for example

source: default
---------------

✗ Something went wrong:
	helm chart "" not found from Helm Chart repository "https://charts.jenkins.io"

@olblak olblak requested a review from Copilot March 10, 2026 07:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the “chart name required” validation for Helm target configuration so charts located at the repository root can be used without forcing a name.

Changes:

  • Dropped spec.Name non-empty validation in ValidateTarget.
  • Updated ValidateTarget unit test expectations to no longer require an error when name is empty.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/plugins/resources/helm/validate.go Removes name required validation logic in target validation.
pkg/plugins/resources/helm/validate_test.go Adjusts tests to align with name no longer being mandatory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@olblak olblak enabled auto-merge (squash) March 10, 2026 09:10
@olblak olblak merged commit db8ab94 into updatecli:main Mar 10, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helmchart target parameter name causes an error

3 participants

X Tutup