Skip to content

Commit

Permalink
Merge pull request #6044 from oasisprotocol/kostko/fix/bundle-load-ma…
Browse files Browse the repository at this point in the history
…nifest-skip

go/runtime/bundle: Don't abort when some manifests cannot be loaded
  • Loading branch information
kostko authored Feb 7, 2025
2 parents 22c7ad8 + bd3e4c8 commit fd4f48e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Empty file added .changelog/6044.trivial.md
Empty file.
12 changes: 10 additions & 2 deletions go/runtime/bundle/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,20 @@ func (m *Manager) loadManifests() ([]*ExplodedManifest, error) {

b, err := os.ReadFile(filepath.Join(dir, manifestName))
if err != nil {
return nil, fmt.Errorf("failed to read manifest: %w", err)
m.logger.Warn("skipping unreadable manifest",
"path", dir,
"err", err,
)
continue
}

var manifest Manifest
if err = json.Unmarshal(b, &manifest); err != nil {
return nil, fmt.Errorf("failed to parse manifest: %w", err)
m.logger.Warn("skipping malformed manifest",
"path", dir,
"err", err,
)
continue
}

m.logger.Info("manifest loaded",
Expand Down

0 comments on commit fd4f48e

Please sign in to comment.