feat(metadata): Ignore service if the dependencies are not found (#2171)

* feat(metadata): Ignore service if the dependencies are not found

* chore: Use errors.Is instead of equal operator
pull/2179/head
Giovanny Gutiérrez 2 years ago committed by GitHub
parent 1ea4ef7412
commit 2209da5e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      api/metadata/server.go

@ -4,6 +4,7 @@ import (
"bytes"
"compress/gzip"
"context"
"errors"
"fmt"
"io"
"sync"
@ -76,6 +77,10 @@ func (s *Server) load() error {
}
fdps, e := allDependency(fdp)
if e != nil {
if errors.Is(e, protoregistry.NotFound) {
// Skip this service if one of its dependencies is not found.
continue
}
err = e
return false
}

Loading…
Cancel
Save