Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Missed PR Comments (#381)
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
  • Loading branch information
EngHabu committed Mar 29, 2022
1 parent b7b20e4 commit f01a822
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions 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 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 f01a822

Please sign in to comment.