diff --git a/backend/builds/service/service.go b/backend/builds/service/service.go index 9bdc70421c..70008f0d25 100644 --- a/backend/builds/service/service.go +++ b/backend/builds/service/service.go @@ -27,16 +27,12 @@ func New(ghClient *ghactions.Client, inventory inventoryv1.InventoryClient) buil func (s *service) ListBuilds(ctx context.Context, req *buildsv1.ListBuildsRequest) (*buildsv1.ListBuildsReply, error) { uri := req.GetEntityUri() - kind, id, err := s.parseEntityURI(uri) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "Invalid build URI '%s', %s", uri, err) - } owner := "spotify" repo := "backstage" ownerReq, err := s.inventory.GetFact(ctx, &inventoryv1.GetFactRequest{ - EntityUri: fmt.Sprintf("boss://%s/%s", kind, id), + EntityUri: uri, Name: "githubOwner", }) if err != nil { @@ -49,7 +45,7 @@ func (s *service) ListBuilds(ctx context.Context, req *buildsv1.ListBuildsReques } repotReq, err := s.inventory.GetFact(ctx, &inventoryv1.GetFactRequest{ - EntityUri: fmt.Sprintf("boss://%s/%s", kind, id), + EntityUri: uri, Name: "githubRepo", }) if err != nil { diff --git a/backend/scaffolder/app/server.go b/backend/scaffolder/app/server.go index bdb164f58a..55fb404716 100644 --- a/backend/scaffolder/app/server.go +++ b/backend/scaffolder/app/server.go @@ -104,7 +104,7 @@ func (s *Server) Create(ctx context.Context, req *pb.CreateRequest) (*pb.CreateR // notify the inventory service _, err = s.inventory.CreateEntity(ctx, &inventory.CreateEntityRequest{ Entity: &inventory.Entity{ - Uri: fmt.Sprintf("boss://service/%s", req.ComponentId), + Uri: fmt.Sprintf("entity:service:%s", req.ComponentId), Facts: []*inventory.Fact{ { Name: "githubOwner", diff --git a/docker-compose.yaml b/docker-compose.yaml index bc9e80b2bd..06d0ccd1ce 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -28,6 +28,8 @@ services: args: service: inventory restart: unless-stopped + volumes: + - ./backend/inventory/inventory.db:/app/inventory.db builds: container_name: boss-builds