Skip to content

Commit 9d63ce1

Browse files
authored
fix: Fix error messages returned by HelmChartGetter (#598)
**What problem does this PR solve?**: Puts the namespace and name in the right order in a log message, and includes these in the corresponding error message, instead of a data value that's not human-readable. **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent 4e8ab02 commit 9d63ce1

File tree

1 file changed

+4
-4
lines changed
  • pkg/handlers/generic/lifecycle/config

1 file changed

+4
-4
lines changed

pkg/handlers/generic/lifecycle/config/cm.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ func (h *HelmChartGetter) For(
7676
name Component,
7777
) (*HelmChart, error) {
7878
log.Info(
79-
fmt.Sprintf("Fetching HelmChart info for %s from configmap %s/%s",
79+
fmt.Sprintf("Fetching HelmChart info for %q from configmap %s/%s",
8080
string(name),
81-
h.cmName,
82-
h.cmNamespace),
81+
h.cmNamespace,
82+
h.cmName),
8383
)
8484
cm, err := h.get(ctx)
8585
if err != nil {
8686
return nil, err
8787
}
8888
d, ok := cm.Data[string(name)]
8989
if !ok {
90-
return nil, fmt.Errorf("did not find key %s in %v", name, cm.Data)
90+
return nil, fmt.Errorf("did not find key %q in configmap %s/%s", name, h.cmNamespace, h.cmName)
9191
}
9292
var settings HelmChart
9393
err = yaml.Unmarshal([]byte(d), &settings)

0 commit comments

Comments
 (0)