Skip to content

Commit

Permalink
fix errors and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Apr 22, 2024
1 parent 95f6017 commit 3e761c3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/controller/module_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func TestModuleContextProto(t *testing.T) {

strValue := "HelloWorld"
globalStrValue := "GlobalHelloWorld"
cm.Set(ctx, cf.Ref{Module: optional.Some(moduleName), Name: key}, strValue)
cm.Set(ctx, cf.Ref{Module: optional.None[string](), Name: key}, globalStrValue)
assert.NoError(t, cm.Set(ctx, cf.Ref{Module: optional.Some(moduleName), Name: key}, strValue))
assert.NoError(t, cm.Set(ctx, cf.Ref{Module: optional.None[string](), Name: key}, globalStrValue))
}

response, err := moduleContextToProto(ctx, moduleName, []*schema.Module{
Expand Down
2 changes: 1 addition & 1 deletion go-runtime/ftl/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"database/sql"
"fmt"

"github.com/TBD54566975/ftl/common/modulecontext"
"github.com/TBD54566975/ftl/go-runtime/modulecontext"

_ "github.com/jackc/pgx/v5/stdlib" // Register Postgres driver
)
Expand Down
3 changes: 2 additions & 1 deletion go-runtime/modulecontext/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
cf "github.com/TBD54566975/ftl/common/configuration"
"github.com/alecthomas/types/optional"
)

type dsnEntry struct {
Expand Down Expand Up @@ -92,7 +93,7 @@ func newInMemoryConfigManager[R cf.Role](ctx context.Context) (*cf.Manager[R], e

func buildConfigOrSecrets[R cf.Role](ctx context.Context, manager cf.Manager[R], valueMap map[string][]byte, moduleName string) error {
for name, data := range valueMap {
if err := manager.SetData(ctx, cf.Ref(cf.Ref{Name: name}), data); err != nil {
if err := manager.SetData(ctx, cf.Ref{Module: optional.Some(moduleName), Name: name}, data); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion go-runtime/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
"github.com/TBD54566975/ftl/common/modulecontext"
"github.com/TBD54566975/ftl/common/plugin"
"github.com/TBD54566975/ftl/go-runtime/encoding"
"github.com/TBD54566975/ftl/go-runtime/ftl"
"github.com/TBD54566975/ftl/go-runtime/modulecontext"
"github.com/TBD54566975/ftl/internal/log"
"github.com/TBD54566975/ftl/internal/maps"
"github.com/TBD54566975/ftl/internal/observability"
Expand Down

0 comments on commit 3e761c3

Please sign in to comment.