Skip to content

Commit

Permalink
Missed PR Comments (flyteorg#381)
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <[email protected]>
  • Loading branch information
EngHabu authored Mar 29, 2022
1 parent c182d66 commit 8b448a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions flyteadmin/dataproxy/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (

type Service struct {
service.DataProxyServer
*service.UnimplementedDataProxyServer

cfg config.DataProxyConfig
dataStore *storage.DataStore
Expand Down Expand Up @@ -77,6 +76,8 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp
}, nil
}

// createShardedStorageLocation creates a location in storage destination to maximize read/write performance in most
// block stores. The final location should look something like: s3://<my bucket>/<shard length>/<file name>
func createShardedStorageLocation(ctx context.Context, req *service.CreateUploadLocationRequest,
shardSelector ioutils.ShardSelector, store *storage.DataStore, cfg config.DataProxyUploadConfig) (storage.DataReference, error) {
keySuffixArr := make([]string, 0, 4)
Expand All @@ -90,10 +91,8 @@ func createShardedStorageLocation(ctx context.Context, req *service.CreateUpload
return "", err
}

keySuffixArr = append([]string{prefix}, keySuffixArr...)

storagePath, err := store.ConstructReference(ctx, store.GetBaseContainerFQN(ctx),
keySuffixArr...)
append([]string{prefix}, keySuffixArr...)...)
if err != nil {
return "", fmt.Errorf("failed to construct datastore reference. Error: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions flyteadmin/pkg/rpc/adminservice/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/flyteorg/flyteadmin/plugins"

interfaces2 "github.com/flyteorg/flyteadmin/pkg/runtime/interfaces"
runtimeIfaces "github.com/flyteorg/flyteadmin/pkg/runtime/interfaces"

"github.com/flyteorg/flyteadmin/pkg/repositories/errors"

Expand Down Expand Up @@ -59,7 +59,7 @@ func (m *AdminService) interceptPanic(ctx context.Context, request proto.Message

const defaultRetries = 3

func NewAdminServer(ctx context.Context, pluginRegistry *plugins.Registry, configuration interfaces2.Configuration,
func NewAdminServer(ctx context.Context, pluginRegistry *plugins.Registry, configuration runtimeIfaces.Configuration,
kubeConfig, master string, dataStorageClient *storage.DataStore, adminScope promutils.Scope) *AdminService {
applicationConfiguration := configuration.ApplicationConfiguration().GetTopLevelConfig()

Expand Down

0 comments on commit 8b448a8

Please sign in to comment.