Skip to content

Commit

Permalink
rename sandbox_utils without underscore
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor committed Nov 15, 2023
1 parent d876227 commit 34e1b84
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions flyteadmin/pkg/async/cloudevent/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
runtimeInterfaces "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces"
"github.com/flyteorg/flyte/flytestdlib/logger"
"github.com/flyteorg/flyte/flytestdlib/promutils"
"github.com/flyteorg/flyte/flytestdlib/sandbox_utils"
"github.com/flyteorg/flyte/flytestdlib/sandboxutils"
"github.com/flyteorg/flyte/flytestdlib/storage"
)

Expand Down Expand Up @@ -92,7 +92,7 @@ func NewCloudEventsPublisher(ctx context.Context, db repositoryInterfaces.Reposi

case common.Sandbox:
var publisher pubsub.Publisher
publisher = sandbox_utils.NewCloudEventsPublisher()
publisher = sandboxutils.NewCloudEventsPublisher()
sender = &cloudEventImplementations.PubSubSender{
Pub: publisher,
}
Expand Down
8 changes: 4 additions & 4 deletions flyteartifacts/pkg/server/processor/channel_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"github.com/cloudevents/sdk-go/v2/event"
flyteEvents "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/event"
"github.com/flyteorg/flyte/flytestdlib/logger"
"github.com/flyteorg/flyte/flytestdlib/sandbox_utils"
"github.com/flyteorg/flyte/flytestdlib/sandboxutils"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"time"
)

type SandboxCloudEventsReceiver struct {
subChan <-chan sandbox_utils.SandboxMessage
subChan <-chan sandboxutils.SandboxMessage
Handler EventsHandlerInterface
}

Expand All @@ -33,7 +33,7 @@ func (p *SandboxCloudEventsReceiver) StartProcessing(ctx context.Context) {
logger.Warning(context.Background(), "Sandbox cloud event processor has stopped because context cancelled")
}

func (p *SandboxCloudEventsReceiver) handleMessage(ctx context.Context, sandboxMsg sandbox_utils.SandboxMessage) error {
func (p *SandboxCloudEventsReceiver) handleMessage(ctx context.Context, sandboxMsg sandboxutils.SandboxMessage) error {
ce := &event.Event{}
err := pbcloudevents.Protobuf.Unmarshal(sandboxMsg.Raw, ce)
if err != nil {
Expand Down Expand Up @@ -112,6 +112,6 @@ func (p *SandboxCloudEventsReceiver) StopProcessing() error {
func NewSandboxCloudEventProcessor(eventsHandler EventsHandlerInterface) *SandboxCloudEventsReceiver {
return &SandboxCloudEventsReceiver{
Handler: eventsHandler,
subChan: sandbox_utils.MsgChan,
subChan: sandboxutils.MsgChan,
}
}
3 changes: 2 additions & 1 deletion flytestdlib/database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"fmt"

"github.com/flyteorg/flyte/flytestdlib/logger"
"github.com/go-gormigrate/gormigrate/v2"
"gorm.io/driver/sqlite"
"gorm.io/gorm"

"github.com/flyteorg/flyte/flytestdlib/logger"
)

// GetDB uses the dbConfig to create gorm DB object. If the db doesn't exist for the dbConfig then a new one is created
Expand Down
3 changes: 2 additions & 1 deletion flytestdlib/database/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
"os"
"strings"

"github.com/flyteorg/flyte/flytestdlib/logger"
oldPgConn "github.com/jackc/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"gorm.io/driver/postgres"
"gorm.io/gorm"

"github.com/flyteorg/flyte/flytestdlib/logger"
)

const pqInvalidDBCode = "3D000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package sandbox_utils
package sandboxutils

import (
"context"
"fmt"
"github.com/flyteorg/flyte/flytestdlib/logger"
"github.com/golang/protobuf/proto"
"sync"
"time"

"github.com/golang/protobuf/proto"

"github.com/flyteorg/flyte/flytestdlib/logger"
)

var MsgChan chan SandboxMessage
Expand Down

0 comments on commit 34e1b84

Please sign in to comment.