Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/elastic/package-spec/v3/code/go/pkg/specerrors"
)

const packageRegistryCategoriesURL = "https://raw.githubusercontent.com/elastic/package-registry/v1.38.0/categories/categories.yml"
const packageRegistryCategoriesURL = "https://raw.githubusercontent.com/elastic/package-registry/v1.39.0/categories/categories.yml"

type registryCategories struct {
Categories map[string]struct {
Expand Down Expand Up @@ -102,7 +102,8 @@ func ValidateDatastreamPackageCategories(fsys fspath.FS) specerrors.ValidationEr
pkgType, pkgCategories, err := readPackageManifestTypeAndCategories(fsys)
if err != nil {
return specerrors.ValidationErrors{
specerrors.NewStructuredErrorf("file \"%s\" is invalid: %w", fsys.Path(manifestPath), err)}
specerrors.NewStructuredErrorf("file \"%s\" is invalid: %w", fsys.Path(manifestPath), err),
}
}

if pkgType != integrationPackageType {
Expand All @@ -112,7 +113,8 @@ func ValidateDatastreamPackageCategories(fsys fspath.FS) specerrors.ValidationEr
dsCategories, err := readDataStreamManifestCategories(fsys)
if err != nil {
return specerrors.ValidationErrors{
specerrors.NewStructuredErrorf("file \"%s\" is invalid: %w", fsys.Path(manifestPath), err)}
specerrors.NewStructuredErrorf("file \"%s\" is invalid: %w", fsys.Path(manifestPath), err),
}
}

if len(dsCategories) == 0 {
Expand All @@ -122,7 +124,8 @@ func ValidateDatastreamPackageCategories(fsys fspath.FS) specerrors.ValidationEr
categoryToParent, err := fetchRegistryCategoryToParentMap()
if err != nil {
return specerrors.ValidationErrors{
specerrors.NewStructuredErrorf("file \"%s\" is invalid: failed to load registry categories: %w", fsys.Path(manifestPath), err)}
specerrors.NewStructuredErrorf("file \"%s\" is invalid: failed to load registry categories: %w", fsys.Path(manifestPath), err),
}
}

var errs specerrors.ValidationErrors
Expand Down
5 changes: 5 additions & 0 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
- description: Remove the search type from by-reference validation checks.
type: bugfix
link: https://github.com/elastic/package-spec/pull/1196
- version: 3.6.7-next
changes:
- description: Update EPR categories reference URL to v1.39.0.
type: bugfix
link: https://github.com/elastic/package-spec/pull/1215
- version: 3.6.6-next
changes:
- description: Add support for saved search assets in content packages.
Expand Down