goharbor/harbor · error
failed to walk manifest: %w
Error message
failed to walk manifest: %w
What it means
Error "failed to walk manifest: %w" thrown in goharbor/harbor.
Source
Thrown at src/controller/artifact/processor/cnai/parser/files.go:57
*base
}
type FileList struct {
Name string `json:"name"`
Type string `json:"type"`
Size int64 `json:"size,omitempty"`
Children []FileList `json:"children,omitempty"`
}
// Parse parses the files list.
func (f *files) Parse(_ context.Context, _ *artifact.Artifact, manifest *ocispec.Manifest) (string, []byte, error) {
if manifest == nil {
return "", nil, fmt.Errorf("manifest cannot be nil")
}
rootNode, err := walkManifest(*manifest)
if err != nil {
return "", nil, fmt.Errorf("failed to walk manifest: %w", err)
}
fileLists := traverseFileNode(rootNode)
data, err := json.Marshal(fileLists)
if err != nil {
return "", nil, err
}
return contentTypeJSON, data, nil
}
// walkManifest walks the manifest and returns the root file node.
func walkManifest(manifest ocispec.Manifest) (*FileNode, error) {
root := NewDirectory("/")
for _, layer := range manifest.Layers {
if layer.Annotations != nil && layer.Annotations[modelspec.AnnotationFilepath] != "" {
filepath := layer.Annotations[modelspec.AnnotationFilepath]
// mark it to directory if the file path ends with "/".View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/controller/artifact/processor/cnai/parser/files.go:57 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/630bef4c3687c2cc.
Report an issue: GitHub.