Skip to content

Commit

Permalink
fix disk schema retreiver
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Oct 7, 2024
1 parent b24070f commit f833655
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backend/controller/admin/local_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package admin
import (
"context"
"fmt"
"path/filepath"

"github.com/alecthomas/types/either"
"github.com/alecthomas/types/optional"
Expand Down Expand Up @@ -68,12 +67,7 @@ func (s *diskSchemaRetriever) GetActiveSchema(ctx context.Context) (*schema.Sche
if err != nil {
moduleSchemas <- either.RightOf[*schema.Module](fmt.Errorf("could not validate module config for %s: %w", m.Module, err))
}
schemaPath := config.Schema()
if r, ok := s.deployRoot.Get(); ok {
schemaPath = filepath.Join(r, m.Module, m.DeployDir, config.Abs().Schema())
}

module, err := schema.ModuleFromProtoFile(schemaPath)
module, err := schema.ModuleFromProtoFile(config.Abs().Schema())
if err != nil {
moduleSchemas <- either.RightOf[*schema.Module](fmt.Errorf("could not load module schema: %w", err))
return
Expand Down

0 comments on commit f833655

Please sign in to comment.