From 39183d5ba37aa4a4d3b7ce850de2f52e54e7177d Mon Sep 17 00:00:00 2001 From: Anas Khan Date: Thu, 23 Jul 2026 04:59:41 +0530 Subject: [PATCH] Fix(addon): correct metadata.yaml filename in addon validation errors (#7224) The addon package validator reported the required manifest as `matadata.yaml` in two of its error messages, telling addon authors to fix a file that does not exist. The correct filename is `metadata.yaml` (see the MetadataFileName constant and the sibling error on the missing-manifest branch, which already spell it right). Correct the two misspelled literals in validateAddonPackage and update the matching assertions in TestCheckAddonPackageValid, which already exercises the empty-name and empty-version branches. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- pkg/addon/utils.go | 4 ++-- pkg/addon/utils_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/addon/utils.go b/pkg/addon/utils.go index 1ed123f5e..f32633564 100644 --- a/pkg/addon/utils.go +++ b/pkg/addon/utils.go @@ -531,10 +531,10 @@ func validateAddonPackage(addonPkg *InstallPackage) error { return fmt.Errorf("the addon package doesn't have `metadata.yaml`") } if addonPkg.Name == "" { - return fmt.Errorf("`matadata.yaml` must define the name of addon") + return fmt.Errorf("`metadata.yaml` must define the name of addon") } if addonPkg.Version == "" { - return fmt.Errorf("`matadata.yaml` must define the version of addon") + return fmt.Errorf("`metadata.yaml` must define the version of addon") } return nil } diff --git a/pkg/addon/utils_test.go b/pkg/addon/utils_test.go index 07fec6c93..d2f0d8a1d 100644 --- a/pkg/addon/utils_test.go +++ b/pkg/addon/utils_test.go @@ -468,10 +468,10 @@ func TestCheckAddonPackageValid(t *testing.T) { err: fmt.Errorf("the addon package doesn't have `metadata.yaml`"), }, { testCase: Meta{Version: "v1.4.0"}, - err: fmt.Errorf("`matadata.yaml` must define the name of addon"), + err: fmt.Errorf("`metadata.yaml` must define the name of addon"), }, { testCase: Meta{Name: "test-addon"}, - err: fmt.Errorf("`matadata.yaml` must define the version of addon"), + err: fmt.Errorf("`metadata.yaml` must define the version of addon"), }, { testCase: Meta{Name: "test-addon", Version: "1.4.5"}, err: nil,