From 8078467e8acbf023c1b677ddb05be5c1b3f8db6c Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 11 Mar 2024 17:27:47 -0700 Subject: [PATCH] Add extra header to signed url (#4971) Signed-off-by: Kevin Su --- datacatalog/go.mod | 2 +- datacatalog/go.sum | 4 +- flyteadmin/dataproxy/service.go | 32 +- flyteadmin/go.mod | 2 +- flyteadmin/go.sum | 4 +- .../implementations/noop_remote_url_test.go | 4 + flytecopilot/go.mod | 2 +- flytecopilot/go.sum | 4 +- .../pb-es/flyteidl/service/dataproxy_pb.ts | 18 + .../pb-go/flyteidl/service/dataproxy.pb.go | 399 ++++++++++-------- .../flyteidl/service/dataproxy.swagger.json | 11 + flyteidl/gen/pb-js/flyteidl.d.ts | 12 + flyteidl/gen/pb-js/flyteidl.js | 48 ++- .../flyteidl/service/dataproxy_pb2.py | 48 ++- .../flyteidl/service/dataproxy_pb2.pyi | 19 +- flyteidl/gen/pb_rust/flyteidl.service.rs | 8 + flyteidl/go.mod | 2 +- flyteidl/go.sum | 4 +- .../protos/flyteidl/service/dataproxy.proto | 9 +- flyteplugins/go.mod | 2 +- flyteplugins/go.sum | 4 +- .../ioutils/remote_file_output_reader_test.go | 11 +- .../plugins/array/k8s/management_test.go | 13 +- flytepropeller/go.mod | 2 +- flytepropeller/go.sum | 4 +- .../nodes/dynamic/dynamic_workflow_test.go | 4 + .../pkg/controller/nodes/executor_test.go | 4 + flytestdlib/go.mod | 2 +- flytestdlib/go.sum | 4 +- flytestdlib/storage/mem_store.go | 11 +- flytestdlib/storage/storage.go | 9 +- flytestdlib/storage/stow_store.go | 42 +- flytestdlib/storage/stow_store_test.go | 4 +- go.mod | 2 +- go.sum | 4 +- 35 files changed, 484 insertions(+), 270 deletions(-) diff --git a/datacatalog/go.mod b/datacatalog/go.mod index 4116c4cc7f5..e8fafef6ab5 100644 --- a/datacatalog/go.mod +++ b/datacatalog/go.mod @@ -43,7 +43,7 @@ require ( github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/flyteorg/stow v0.3.8 // indirect + github.com/flyteorg/stow v0.3.9 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-gormigrate/gormigrate/v2 v2.1.1 // indirect diff --git a/datacatalog/go.sum b/datacatalog/go.sum index 786de45ede6..111ed2cb56d 100644 --- a/datacatalog/go.sum +++ b/datacatalog/go.sum @@ -113,8 +113,8 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/flyteadmin/dataproxy/service.go b/flyteadmin/dataproxy/service.go index 3d657c6958b..5bb7a16632e 100644 --- a/flyteadmin/dataproxy/service.go +++ b/flyteadmin/dataproxy/service.go @@ -49,11 +49,13 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp // If it doesn't exist, then proceed as normal. if len(req.Project) == 0 || len(req.Domain) == 0 { + logger.Infof(ctx, "project and domain are required parameters. Project [%v]. Domain [%v]", req.Project, req.Domain) return nil, errors.NewFlyteAdminErrorf(codes.InvalidArgument, "project and domain are required parameters") } // At least one of the hash or manually given prefix must be provided. if len(req.FilenameRoot) == 0 && len(req.ContentMd5) == 0 { + logger.Infof(ctx, "content_md5 or filename_root is a required parameter. FilenameRoot [%v], ContentMD5 [%v]", req.FilenameRoot, req.ContentMd5) return nil, errors.NewFlyteAdminErrorf(codes.InvalidArgument, "content_md5 or filename_root is a required parameter") } @@ -63,10 +65,12 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp knownLocation, err := createStorageLocation(ctx, s.dataStore, s.cfg.Upload, req.Project, req.Domain, req.FilenameRoot, req.Filename) if err != nil { + logger.Errorf(ctx, "failed to create storage location. Error %v", err) return nil, errors.NewFlyteAdminErrorf(codes.Internal, "failed to create storage location, Error: %v", err) } metadata, err := s.dataStore.Head(ctx, knownLocation) if err != nil { + logger.Errorf(ctx, "failed to check if file exists at location [%s], Error: %v", knownLocation.String(), err) return nil, errors.NewFlyteAdminErrorf(codes.Internal, "failed to check if file exists at location [%s], Error: %v", knownLocation.String(), err) } if metadata.Exists() { @@ -76,12 +80,18 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp if len(req.ContentMd5) == 0 { return nil, errors.NewFlyteAdminErrorf(codes.AlreadyExists, "file already exists at location [%v], specify a matching hash if you wish to rewrite", knownLocation) } - // Re-encode the hash 3-ways to support matching, hex, base32 and base64 - hexDigest := hex.EncodeToString(req.ContentMd5) - base32Digest := base32.StdEncoding.EncodeToString(req.ContentMd5) base64Digest := base64.StdEncoding.EncodeToString(req.ContentMd5) - if hexDigest != metadata.Etag() && base32Digest != metadata.Etag() && base64Digest != metadata.Etag() { - logger.Debugf(ctx, "File already exists at location [%v] but hashes do not match", knownLocation) + if len(metadata.ContentMD5()) == 0 { + // For backward compatibility, dataproxy assumes that the Etag exists if ContentMD5 is not in the metadata. + // Data proxy won't allow people to overwrite the file if both the Etag and the ContentMD5 do not exist. + hexDigest := hex.EncodeToString(req.ContentMd5) + base32Digest := base32.StdEncoding.EncodeToString(req.ContentMd5) + if hexDigest != metadata.Etag() && base32Digest != metadata.Etag() && base64Digest != metadata.Etag() { + logger.Errorf(ctx, "File already exists at location [%v] but hashes do not match", knownLocation) + return nil, errors.NewFlyteAdminErrorf(codes.AlreadyExists, "file already exists at location [%v], specify a matching hash if you wish to rewrite", knownLocation) + } + } else if base64Digest != metadata.ContentMD5() { + logger.Errorf(ctx, "File already exists at location [%v] but hashes do not match", knownLocation) return nil, errors.NewFlyteAdminErrorf(codes.AlreadyExists, "file already exists at location [%v], specify a matching hash if you wish to rewrite", knownLocation) } logger.Debugf(ctx, "File already exists at location [%v] but allowing rewrite", knownLocation) @@ -105,7 +115,7 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp req.Filename = rand.String(s.cfg.Upload.DefaultFileNameLength) } - md5 := base64.StdEncoding.EncodeToString(req.ContentMd5) + base64digestMD5 := base64.StdEncoding.EncodeToString(req.ContentMd5) var prefix string if len(req.FilenameRoot) > 0 { @@ -117,16 +127,19 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp storagePath, err := createStorageLocation(ctx, s.dataStore, s.cfg.Upload, req.Project, req.Domain, prefix, req.Filename) if err != nil { + logger.Errorf(ctx, "failed to create shardedStorageLocation. Error %v", err) return nil, errors.NewFlyteAdminErrorf(codes.Internal, "failed to create shardedStorageLocation, Error: %v", err) } resp, err := s.dataStore.CreateSignedURL(ctx, storagePath, storage.SignedURLProperties{ - Scope: stow.ClientMethodPut, - ExpiresIn: req.ExpiresIn.AsDuration(), - ContentMD5: md5, + Scope: stow.ClientMethodPut, + ExpiresIn: req.ExpiresIn.AsDuration(), + ContentMD5: base64digestMD5, + AddContentMD5Metadata: req.AddContentMd5Metadata, }) if err != nil { + logger.Errorf(ctx, "failed to create signed url. Error:", err) return nil, errors.NewFlyteAdminErrorf(codes.Internal, "failed to create a signed url. Error: %v", err) } @@ -134,6 +147,7 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp SignedUrl: resp.URL.String(), NativeUrl: storagePath.String(), ExpiresAt: timestamppb.New(time.Now().Add(req.ExpiresIn.AsDuration())), + Headers: resp.RequiredRequestHeaders, }, nil } diff --git a/flyteadmin/go.mod b/flyteadmin/go.mod index f1dbf895251..e80d2d28d2d 100644 --- a/flyteadmin/go.mod +++ b/flyteadmin/go.mod @@ -17,7 +17,7 @@ require ( github.com/flyteorg/flyte/flyteplugins v0.0.0-00010101000000-000000000000 github.com/flyteorg/flyte/flytepropeller v0.0.0-00010101000000-000000000000 github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000 - github.com/flyteorg/stow v0.3.8 + github.com/flyteorg/stow v0.3.9 github.com/ghodss/yaml v1.0.0 github.com/go-gormigrate/gormigrate/v2 v2.1.1 github.com/golang-jwt/jwt v3.2.2+incompatible diff --git a/flyteadmin/go.sum b/flyteadmin/go.sum index ca22700e391..23c3e5ac0b4 100644 --- a/flyteadmin/go.sum +++ b/flyteadmin/go.sum @@ -237,8 +237,8 @@ github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= diff --git a/flyteadmin/pkg/data/implementations/noop_remote_url_test.go b/flyteadmin/pkg/data/implementations/noop_remote_url_test.go index 0c05c2a3919..965dc9eeb20 100644 --- a/flyteadmin/pkg/data/implementations/noop_remote_url_test.go +++ b/flyteadmin/pkg/data/implementations/noop_remote_url_test.go @@ -14,6 +14,10 @@ const noopFileSize = int64(1256) type MockMetadata struct{} +func (m MockMetadata) ContentMD5() string { + return "" +} + func (m MockMetadata) Exists() bool { return true } diff --git a/flytecopilot/go.mod b/flytecopilot/go.mod index 254e636513a..52c7b25e796 100644 --- a/flytecopilot/go.mod +++ b/flytecopilot/go.mod @@ -39,7 +39,7 @@ require ( github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/flyteorg/stow v0.3.8 // indirect + github.com/flyteorg/stow v0.3.9 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect diff --git a/flytecopilot/go.sum b/flytecopilot/go.sum index 076bd774a82..b43c64842dc 100644 --- a/flytecopilot/go.sum +++ b/flytecopilot/go.sum @@ -103,8 +103,8 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/flyteidl/gen/pb-es/flyteidl/service/dataproxy_pb.ts b/flyteidl/gen/pb-es/flyteidl/service/dataproxy_pb.ts index 2b4cf829abb..8ce9d574351 100644 --- a/flyteidl/gen/pb-es/flyteidl/service/dataproxy_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/service/dataproxy_pb.ts @@ -60,6 +60,13 @@ export class CreateUploadLocationResponse extends Message headers = 4; + */ + headers: { [key: string]: string } = {}; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -71,6 +78,7 @@ export class CreateUploadLocationResponse extends Message): CreateUploadLocationResponse { @@ -152,6 +160,15 @@ export class CreateUploadLocationRequest extends Message) { super(); proto3.util.initPartial(data, this); @@ -166,6 +183,7 @@ export class CreateUploadLocationRequest extends Message): CreateUploadLocationRequest { diff --git a/flyteidl/gen/pb-go/flyteidl/service/dataproxy.pb.go b/flyteidl/gen/pb-go/flyteidl/service/dataproxy.pb.go index 3acf2559cf5..802d4080b44 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/dataproxy.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/dataproxy.pb.go @@ -86,6 +86,8 @@ type CreateUploadLocationResponse struct { NativeUrl string `protobuf:"bytes,2,opt,name=native_url,json=nativeUrl,proto3" json:"native_url,omitempty"` // ExpiresAt defines when will the signed URL expires. ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + // Data proxy generates these headers for client, and they have to add these headers to the request when uploading the file. + Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *CreateUploadLocationResponse) Reset() { @@ -141,6 +143,13 @@ func (x *CreateUploadLocationResponse) GetExpiresAt() *timestamppb.Timestamp { return nil } +func (x *CreateUploadLocationResponse) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + // CreateUploadLocationRequest specified request for the CreateUploadLocation API. // The implementation in data proxy service will create the s3 location with some server side configured prefixes, // and then: @@ -173,6 +182,10 @@ type CreateUploadLocationRequest struct { // in data proxy config. This option is useful when uploading multiple files. // +optional FilenameRoot string `protobuf:"bytes,6,opt,name=filename_root,json=filenameRoot,proto3" json:"filename_root,omitempty"` + // If true, the data proxy will add content_md5 to the metadata to the signed URL and + // it will force clients to add this metadata to the object. + // This make sure dataproxy is backward compatible with the old flytekit. + AddContentMd5Metadata bool `protobuf:"varint,7,opt,name=add_content_md5_metadata,json=addContentMd5Metadata,proto3" json:"add_content_md5_metadata,omitempty"` } func (x *CreateUploadLocationRequest) Reset() { @@ -249,6 +262,13 @@ func (x *CreateUploadLocationRequest) GetFilenameRoot() string { return "" } +func (x *CreateUploadLocationRequest) GetAddContentMd5Metadata() bool { + if x != nil { + return x.AddContentMd5Metadata + } + return false +} + // CreateDownloadLocationRequest specified request for the CreateDownloadLocation API. // // Deprecated: Marked as deprecated in flyteidl/service/dataproxy.proto. @@ -762,7 +782,7 @@ var file_flyteidl_service_dataproxy_proto_rawDesc = []byte{ 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, + 0x6f, 0x22, 0xaa, 0x02, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, @@ -771,163 +791,176 @@ var file_flyteidl_service_dataproxy_proto_rawDesc = []byte{ 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0xeb, 0x01, 0x0a, 0x1b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x49, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6d, - 0x64, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x4d, 0x64, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6c, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x7c, 0x0a, 0x1d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x49, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x7e, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x41, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xfa, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x66, + 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x55, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x61, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x73, 0x49, 0x6e, 0x12, 0x54, 0x0a, 0x11, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x3d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x50, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52, 0x4c, 0x73, 0x52, - 0x0d, 0x70, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x73, 0x22, 0x69, - 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52, 0x4c, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x39, - 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x2d, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x6c, 0x79, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0b, - 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0a, - 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x12, 0x49, 0x0a, 0x0f, 0x70, 0x72, - 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x55, 0x52, 0x4c, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x55, 0x72, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, 0x00, - 0x52, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x2a, 0x43, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, - 0x0a, 0x12, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x44, 0x45, 0x43, 0x4b, 0x10, 0x01, 0x32, 0x84, 0x07, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf0, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x79, 0x92, 0x41, 0x4d, 0x1a, 0x4b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x73, 0x20, 0x61, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x68, - 0x74, 0x74, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, - 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, - 0x66, 0x6f, 0x72, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6e, 0x12, 0xa9, - 0x02, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xab, 0x01, 0x92, - 0x41, 0x7f, 0x1a, 0x7d, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x20, - 0x50, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x20, 0x69, 0x6e, - 0x73, 0x74, 0x65, 0x61, 0x64, 0x2e, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, - 0x20, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa4, + 0x02, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x6d, 0x64, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x64, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x37, 0x0a, 0x18, + 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x64, 0x35, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x64, 0x35, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7c, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, + 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x3a, + 0x02, 0x18, 0x01, 0x22, 0x7e, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x55, 0x72, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x3a, + 0x02, 0x18, 0x01, 0x22, 0xfa, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, + 0x12, 0x54, 0x0a, 0x11, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0xc7, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, + 0x72, 0x6c, 0x12, 0x3d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, + 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x75, 0x72, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x72, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52, 0x4c, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x73, 0x22, 0x69, 0x0a, 0x0d, 0x50, 0x72, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52, 0x4c, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x2d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x55, 0x72, 0x6c, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x6c, 0x69, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x69, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x12, 0x49, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x52, 0x4c, 0x73, + 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, + 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x69, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x43, 0x0a, + 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, + 0x17, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x52, + 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x43, 0x4b, + 0x10, 0x01, 0x32, 0x84, 0x07, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf0, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x79, 0x92, 0x41, 0x4d, 0x1a, 0x4b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x64, 0x61, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6e, 0x88, 0x02, 0x01, 0x12, 0xea, 0x01, 0x0a, 0x12, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, - 0x6b, 0x12, 0x2b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, - 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, - 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x92, 0x41, - 0x4c, 0x1a, 0x4a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x61, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6e, 0x12, 0xa9, 0x02, 0x0a, 0x16, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xab, 0x01, 0x92, 0x41, 0x7f, 0x1a, 0x7d, + 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x20, 0x50, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, + 0x64, 0x2e, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x74, 0x20, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x64, 0x61, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x64, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, - 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x42, 0xc6, 0x01, - 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, 0x10, - 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0xca, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, + 0x75, 0x72, 0x6e, 0x88, 0x02, 0x01, 0x12, 0xea, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2b, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, + 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x92, 0x41, 0x4c, 0x1a, 0x4a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f, 0x6e, + 0x6c, 0x79, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x74, + 0x20, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, + 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x12, 0x64, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x42, 0xc6, 0x01, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, + 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, + 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -943,7 +976,7 @@ func file_flyteidl_service_dataproxy_proto_rawDescGZIP() []byte { } var file_flyteidl_service_dataproxy_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_flyteidl_service_dataproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_flyteidl_service_dataproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_flyteidl_service_dataproxy_proto_goTypes = []interface{}{ (ArtifactType)(0), // 0: flyteidl.service.ArtifactType (*CreateUploadLocationResponse)(nil), // 1: flyteidl.service.CreateUploadLocationResponse @@ -955,39 +988,41 @@ var file_flyteidl_service_dataproxy_proto_goTypes = []interface{}{ (*PreSignedURLs)(nil), // 7: flyteidl.service.PreSignedURLs (*GetDataRequest)(nil), // 8: flyteidl.service.GetDataRequest (*GetDataResponse)(nil), // 9: flyteidl.service.GetDataResponse - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 11: google.protobuf.Duration - (*core.NodeExecutionIdentifier)(nil), // 12: flyteidl.core.NodeExecutionIdentifier - (*core.LiteralMap)(nil), // 13: flyteidl.core.LiteralMap - (*core.Literal)(nil), // 14: flyteidl.core.Literal + nil, // 10: flyteidl.service.CreateUploadLocationResponse.HeadersEntry + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 12: google.protobuf.Duration + (*core.NodeExecutionIdentifier)(nil), // 13: flyteidl.core.NodeExecutionIdentifier + (*core.LiteralMap)(nil), // 14: flyteidl.core.LiteralMap + (*core.Literal)(nil), // 15: flyteidl.core.Literal } var file_flyteidl_service_dataproxy_proto_depIdxs = []int32{ - 10, // 0: flyteidl.service.CreateUploadLocationResponse.expires_at:type_name -> google.protobuf.Timestamp - 11, // 1: flyteidl.service.CreateUploadLocationRequest.expires_in:type_name -> google.protobuf.Duration - 11, // 2: flyteidl.service.CreateDownloadLocationRequest.expires_in:type_name -> google.protobuf.Duration - 10, // 3: flyteidl.service.CreateDownloadLocationResponse.expires_at:type_name -> google.protobuf.Timestamp - 0, // 4: flyteidl.service.CreateDownloadLinkRequest.artifact_type:type_name -> flyteidl.service.ArtifactType - 11, // 5: flyteidl.service.CreateDownloadLinkRequest.expires_in:type_name -> google.protobuf.Duration - 12, // 6: flyteidl.service.CreateDownloadLinkRequest.node_execution_id:type_name -> flyteidl.core.NodeExecutionIdentifier - 10, // 7: flyteidl.service.CreateDownloadLinkResponse.expires_at:type_name -> google.protobuf.Timestamp - 7, // 8: flyteidl.service.CreateDownloadLinkResponse.pre_signed_urls:type_name -> flyteidl.service.PreSignedURLs - 10, // 9: flyteidl.service.PreSignedURLs.expires_at:type_name -> google.protobuf.Timestamp - 13, // 10: flyteidl.service.GetDataResponse.literal_map:type_name -> flyteidl.core.LiteralMap - 7, // 11: flyteidl.service.GetDataResponse.pre_signed_urls:type_name -> flyteidl.service.PreSignedURLs - 14, // 12: flyteidl.service.GetDataResponse.literal:type_name -> flyteidl.core.Literal - 2, // 13: flyteidl.service.DataProxyService.CreateUploadLocation:input_type -> flyteidl.service.CreateUploadLocationRequest - 3, // 14: flyteidl.service.DataProxyService.CreateDownloadLocation:input_type -> flyteidl.service.CreateDownloadLocationRequest - 5, // 15: flyteidl.service.DataProxyService.CreateDownloadLink:input_type -> flyteidl.service.CreateDownloadLinkRequest - 8, // 16: flyteidl.service.DataProxyService.GetData:input_type -> flyteidl.service.GetDataRequest - 1, // 17: flyteidl.service.DataProxyService.CreateUploadLocation:output_type -> flyteidl.service.CreateUploadLocationResponse - 4, // 18: flyteidl.service.DataProxyService.CreateDownloadLocation:output_type -> flyteidl.service.CreateDownloadLocationResponse - 6, // 19: flyteidl.service.DataProxyService.CreateDownloadLink:output_type -> flyteidl.service.CreateDownloadLinkResponse - 9, // 20: flyteidl.service.DataProxyService.GetData:output_type -> flyteidl.service.GetDataResponse - 17, // [17:21] is the sub-list for method output_type - 13, // [13:17] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 11, // 0: flyteidl.service.CreateUploadLocationResponse.expires_at:type_name -> google.protobuf.Timestamp + 10, // 1: flyteidl.service.CreateUploadLocationResponse.headers:type_name -> flyteidl.service.CreateUploadLocationResponse.HeadersEntry + 12, // 2: flyteidl.service.CreateUploadLocationRequest.expires_in:type_name -> google.protobuf.Duration + 12, // 3: flyteidl.service.CreateDownloadLocationRequest.expires_in:type_name -> google.protobuf.Duration + 11, // 4: flyteidl.service.CreateDownloadLocationResponse.expires_at:type_name -> google.protobuf.Timestamp + 0, // 5: flyteidl.service.CreateDownloadLinkRequest.artifact_type:type_name -> flyteidl.service.ArtifactType + 12, // 6: flyteidl.service.CreateDownloadLinkRequest.expires_in:type_name -> google.protobuf.Duration + 13, // 7: flyteidl.service.CreateDownloadLinkRequest.node_execution_id:type_name -> flyteidl.core.NodeExecutionIdentifier + 11, // 8: flyteidl.service.CreateDownloadLinkResponse.expires_at:type_name -> google.protobuf.Timestamp + 7, // 9: flyteidl.service.CreateDownloadLinkResponse.pre_signed_urls:type_name -> flyteidl.service.PreSignedURLs + 11, // 10: flyteidl.service.PreSignedURLs.expires_at:type_name -> google.protobuf.Timestamp + 14, // 11: flyteidl.service.GetDataResponse.literal_map:type_name -> flyteidl.core.LiteralMap + 7, // 12: flyteidl.service.GetDataResponse.pre_signed_urls:type_name -> flyteidl.service.PreSignedURLs + 15, // 13: flyteidl.service.GetDataResponse.literal:type_name -> flyteidl.core.Literal + 2, // 14: flyteidl.service.DataProxyService.CreateUploadLocation:input_type -> flyteidl.service.CreateUploadLocationRequest + 3, // 15: flyteidl.service.DataProxyService.CreateDownloadLocation:input_type -> flyteidl.service.CreateDownloadLocationRequest + 5, // 16: flyteidl.service.DataProxyService.CreateDownloadLink:input_type -> flyteidl.service.CreateDownloadLinkRequest + 8, // 17: flyteidl.service.DataProxyService.GetData:input_type -> flyteidl.service.GetDataRequest + 1, // 18: flyteidl.service.DataProxyService.CreateUploadLocation:output_type -> flyteidl.service.CreateUploadLocationResponse + 4, // 19: flyteidl.service.DataProxyService.CreateDownloadLocation:output_type -> flyteidl.service.CreateDownloadLocationResponse + 6, // 20: flyteidl.service.DataProxyService.CreateDownloadLink:output_type -> flyteidl.service.CreateDownloadLinkResponse + 9, // 21: flyteidl.service.DataProxyService.GetData:output_type -> flyteidl.service.GetDataResponse + 18, // [18:22] is the sub-list for method output_type + 14, // [14:18] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_flyteidl_service_dataproxy_proto_init() } @@ -1119,7 +1154,7 @@ func file_flyteidl_service_dataproxy_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_service_dataproxy_proto_rawDesc, NumEnums: 1, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json index e23e22df706..b26138d8b72 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json @@ -748,6 +748,10 @@ "filename_root": { "type": "string", "title": "If present, data proxy will use this string in lieu of the md5 hash in the path. When the filename is also included\nthis makes the upload location deterministic. The native url will still be prefixed by the upload location prefix\nin data proxy config. This option is useful when uploading multiple files.\n+optional" + }, + "add_content_md5_metadata": { + "type": "boolean", + "description": "If true, the data proxy will add content_md5 to the metadata to the signed URL and\nit will force clients to add this metadata to the object.\nThis make sure dataproxy is backward compatible with the old flytekit." } }, "description": "CreateUploadLocationRequest specified request for the CreateUploadLocation API.\nThe implementation in data proxy service will create the s3 location with some server side configured prefixes,\nand then:\n - project/domain/(a deterministic str representation of the content_md5)/filename (if present); OR\n - project/domain/filename_root (if present)/filename (if present)." @@ -767,6 +771,13 @@ "type": "string", "format": "date-time", "description": "ExpiresAt defines when will the signed URL expires." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Data proxy generates these headers for client, and they have to add these headers to the request when uploading the file." } } }, diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 5cc6b36eeb1..8c01d5f2847 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -22747,6 +22747,9 @@ export namespace flyteidl { /** CreateUploadLocationResponse expiresAt */ expiresAt?: (google.protobuf.ITimestamp|null); + + /** CreateUploadLocationResponse headers */ + headers?: ({ [k: string]: string }|null); } /** Represents a CreateUploadLocationResponse. */ @@ -22767,6 +22770,9 @@ export namespace flyteidl { /** CreateUploadLocationResponse expiresAt. */ public expiresAt?: (google.protobuf.ITimestamp|null); + /** CreateUploadLocationResponse headers. */ + public headers: { [k: string]: string }; + /** * Creates a new CreateUploadLocationResponse instance using the specified properties. * @param [properties] Properties to set @@ -22820,6 +22826,9 @@ export namespace flyteidl { /** CreateUploadLocationRequest filenameRoot */ filenameRoot?: (string|null); + + /** CreateUploadLocationRequest addContentMd5Metadata */ + addContentMd5Metadata?: (boolean|null); } /** Represents a CreateUploadLocationRequest. */ @@ -22849,6 +22858,9 @@ export namespace flyteidl { /** CreateUploadLocationRequest filenameRoot. */ public filenameRoot: string; + /** CreateUploadLocationRequest addContentMd5Metadata. */ + public addContentMd5Metadata: boolean; + /** * Creates a new CreateUploadLocationRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 3400b971b3a..fffe3309026 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -53330,6 +53330,7 @@ * @property {string|null} [signedUrl] CreateUploadLocationResponse signedUrl * @property {string|null} [nativeUrl] CreateUploadLocationResponse nativeUrl * @property {google.protobuf.ITimestamp|null} [expiresAt] CreateUploadLocationResponse expiresAt + * @property {Object.|null} [headers] CreateUploadLocationResponse headers */ /** @@ -53341,6 +53342,7 @@ * @param {flyteidl.service.ICreateUploadLocationResponse=} [properties] Properties to set */ function CreateUploadLocationResponse(properties) { + this.headers = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53371,6 +53373,14 @@ */ CreateUploadLocationResponse.prototype.expiresAt = null; + /** + * CreateUploadLocationResponse headers. + * @member {Object.} headers + * @memberof flyteidl.service.CreateUploadLocationResponse + * @instance + */ + CreateUploadLocationResponse.prototype.headers = $util.emptyObject; + /** * Creates a new CreateUploadLocationResponse instance using the specified properties. * @function create @@ -53401,6 +53411,9 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nativeUrl); if (message.expiresAt != null && message.hasOwnProperty("expiresAt")) $root.google.protobuf.Timestamp.encode(message.expiresAt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.headers != null && message.hasOwnProperty("headers")) + for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); return writer; }; @@ -53418,7 +53431,7 @@ CreateUploadLocationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.service.CreateUploadLocationResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.service.CreateUploadLocationResponse(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -53431,6 +53444,14 @@ case 3: message.expiresAt = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; + case 4: + reader.skip().pos++; + if (message.headers === $util.emptyObject) + message.headers = {}; + key = reader.string(); + reader.pos++; + message.headers[key] = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -53461,6 +53482,14 @@ if (error) return "expiresAt." + error; } + if (message.headers != null && message.hasOwnProperty("headers")) { + if (!$util.isObject(message.headers)) + return "headers: object expected"; + var key = Object.keys(message.headers); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.headers[key[i]])) + return "headers: string{k:string} expected"; + } return null; }; @@ -53479,6 +53508,7 @@ * @property {google.protobuf.IDuration|null} [expiresIn] CreateUploadLocationRequest expiresIn * @property {Uint8Array|null} [contentMd5] CreateUploadLocationRequest contentMd5 * @property {string|null} [filenameRoot] CreateUploadLocationRequest filenameRoot + * @property {boolean|null} [addContentMd5Metadata] CreateUploadLocationRequest addContentMd5Metadata */ /** @@ -53544,6 +53574,14 @@ */ CreateUploadLocationRequest.prototype.filenameRoot = ""; + /** + * CreateUploadLocationRequest addContentMd5Metadata. + * @member {boolean} addContentMd5Metadata + * @memberof flyteidl.service.CreateUploadLocationRequest + * @instance + */ + CreateUploadLocationRequest.prototype.addContentMd5Metadata = false; + /** * Creates a new CreateUploadLocationRequest instance using the specified properties. * @function create @@ -53580,6 +53618,8 @@ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.contentMd5); if (message.filenameRoot != null && message.hasOwnProperty("filenameRoot")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.filenameRoot); + if (message.addContentMd5Metadata != null && message.hasOwnProperty("addContentMd5Metadata")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.addContentMd5Metadata); return writer; }; @@ -53619,6 +53659,9 @@ case 6: message.filenameRoot = reader.string(); break; + case 7: + message.addContentMd5Metadata = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -53658,6 +53701,9 @@ if (message.filenameRoot != null && message.hasOwnProperty("filenameRoot")) if (!$util.isString(message.filenameRoot)) return "filenameRoot: string expected"; + if (message.addContentMd5Metadata != null && message.hasOwnProperty("addContentMd5Metadata")) + if (typeof message.addContentMd5Metadata !== "boolean") + return "addContentMd5Metadata: boolean expected"; return null; }; diff --git a/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.py index feced8c21ec..f4c25e43ae4 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.py @@ -19,7 +19,7 @@ from flyteidl.core import literals_pb2 as flyteidl_dot_core_dot_literals__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n flyteidl/service/dataproxy.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1c\x66lyteidl/core/literals.proto\"\x97\x01\n\x1c\x43reateUploadLocationResponse\x12\x1d\n\nsigned_url\x18\x01 \x01(\tR\tsignedUrl\x12\x1d\n\nnative_url\x18\x02 \x01(\tR\tnativeUrl\x12\x39\n\nexpires_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\"\xeb\x01\n\x1b\x43reateUploadLocationRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x1a\n\x08\x66ilename\x18\x03 \x01(\tR\x08\x66ilename\x12\x38\n\nexpires_in\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\texpiresIn\x12\x1f\n\x0b\x63ontent_md5\x18\x05 \x01(\x0cR\ncontentMd5\x12#\n\rfilename_root\x18\x06 \x01(\tR\x0c\x66ilenameRoot\"|\n\x1d\x43reateDownloadLocationRequest\x12\x1d\n\nnative_url\x18\x01 \x01(\tR\tnativeUrl\x12\x38\n\nexpires_in\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\texpiresIn:\x02\x18\x01\"~\n\x1e\x43reateDownloadLocationResponse\x12\x1d\n\nsigned_url\x18\x01 \x01(\tR\tsignedUrl\x12\x39\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt:\x02\x18\x01\"\xfa\x01\n\x19\x43reateDownloadLinkRequest\x12\x43\n\rartifact_type\x18\x01 \x01(\x0e\x32\x1e.flyteidl.service.ArtifactTypeR\x0c\x61rtifactType\x12\x38\n\nexpires_in\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\texpiresIn\x12T\n\x11node_execution_id\x18\x03 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierH\x00R\x0fnodeExecutionIdB\x08\n\x06source\"\xc7\x01\n\x1a\x43reateDownloadLinkResponse\x12!\n\nsigned_url\x18\x01 \x03(\tB\x02\x18\x01R\tsignedUrl\x12=\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01R\texpiresAt\x12G\n\x0fpre_signed_urls\x18\x03 \x01(\x0b\x32\x1f.flyteidl.service.PreSignedURLsR\rpreSignedUrls\"i\n\rPreSignedURLs\x12\x1d\n\nsigned_url\x18\x01 \x03(\tR\tsignedUrl\x12\x39\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\"-\n\x0eGetDataRequest\x12\x1b\n\tflyte_url\x18\x01 \x01(\tR\x08\x66lyteUrl\"\xd6\x01\n\x0fGetDataResponse\x12<\n\x0bliteral_map\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\nliteralMap\x12I\n\x0fpre_signed_urls\x18\x02 \x01(\x0b\x32\x1f.flyteidl.service.PreSignedURLsH\x00R\rpreSignedUrls\x12\x32\n\x07literal\x18\x03 \x01(\x0b\x32\x16.flyteidl.core.LiteralH\x00R\x07literalB\x06\n\x04\x64\x61ta*C\n\x0c\x41rtifactType\x12\x1b\n\x17\x41RTIFACT_TYPE_UNDEFINED\x10\x00\x12\x16\n\x12\x41RTIFACT_TYPE_DECK\x10\x01\x32\x84\x07\n\x10\x44\x61taProxyService\x12\xf0\x01\n\x14\x43reateUploadLocation\x12-.flyteidl.service.CreateUploadLocationRequest\x1a..flyteidl.service.CreateUploadLocationResponse\"y\x92\x41M\x1aKCreates a write-only http location that is accessible for tasks at runtime.\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/api/v1/dataproxy/artifact_urn\x12\xa9\x02\n\x16\x43reateDownloadLocation\x12/.flyteidl.service.CreateDownloadLocationRequest\x1a\x30.flyteidl.service.CreateDownloadLocationResponse\"\xab\x01\x88\x02\x01\x92\x41\x7f\x1a}Deprecated: Please use CreateDownloadLink instead. Creates a read-only http location that is accessible for tasks at runtime.\x82\xd3\xe4\x93\x02 \x12\x1e/api/v1/dataproxy/artifact_urn\x12\xea\x01\n\x12\x43reateDownloadLink\x12+.flyteidl.service.CreateDownloadLinkRequest\x1a,.flyteidl.service.CreateDownloadLinkResponse\"y\x92\x41L\x1aJCreates a read-only http location that is accessible for tasks at runtime.\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/api/v1/dataproxy/artifact_link\x12\x64\n\x07GetData\x12 .flyteidl.service.GetDataRequest\x1a!.flyteidl.service.GetDataResponse\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\x0c/api/v1/dataB\xc6\x01\n\x14\x63om.flyteidl.serviceB\x0e\x44\x61taproxyProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n flyteidl/service/dataproxy.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1c\x66lyteidl/core/literals.proto\"\xaa\x02\n\x1c\x43reateUploadLocationResponse\x12\x1d\n\nsigned_url\x18\x01 \x01(\tR\tsignedUrl\x12\x1d\n\nnative_url\x18\x02 \x01(\tR\tnativeUrl\x12\x39\n\nexpires_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12U\n\x07headers\x18\x04 \x03(\x0b\x32;.flyteidl.service.CreateUploadLocationResponse.HeadersEntryR\x07headers\x1a:\n\x0cHeadersEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xa4\x02\n\x1b\x43reateUploadLocationRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x1a\n\x08\x66ilename\x18\x03 \x01(\tR\x08\x66ilename\x12\x38\n\nexpires_in\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\texpiresIn\x12\x1f\n\x0b\x63ontent_md5\x18\x05 \x01(\x0cR\ncontentMd5\x12#\n\rfilename_root\x18\x06 \x01(\tR\x0c\x66ilenameRoot\x12\x37\n\x18\x61\x64\x64_content_md5_metadata\x18\x07 \x01(\x08R\x15\x61\x64\x64\x43ontentMd5Metadata\"|\n\x1d\x43reateDownloadLocationRequest\x12\x1d\n\nnative_url\x18\x01 \x01(\tR\tnativeUrl\x12\x38\n\nexpires_in\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\texpiresIn:\x02\x18\x01\"~\n\x1e\x43reateDownloadLocationResponse\x12\x1d\n\nsigned_url\x18\x01 \x01(\tR\tsignedUrl\x12\x39\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt:\x02\x18\x01\"\xfa\x01\n\x19\x43reateDownloadLinkRequest\x12\x43\n\rartifact_type\x18\x01 \x01(\x0e\x32\x1e.flyteidl.service.ArtifactTypeR\x0c\x61rtifactType\x12\x38\n\nexpires_in\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\texpiresIn\x12T\n\x11node_execution_id\x18\x03 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierH\x00R\x0fnodeExecutionIdB\x08\n\x06source\"\xc7\x01\n\x1a\x43reateDownloadLinkResponse\x12!\n\nsigned_url\x18\x01 \x03(\tB\x02\x18\x01R\tsignedUrl\x12=\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01R\texpiresAt\x12G\n\x0fpre_signed_urls\x18\x03 \x01(\x0b\x32\x1f.flyteidl.service.PreSignedURLsR\rpreSignedUrls\"i\n\rPreSignedURLs\x12\x1d\n\nsigned_url\x18\x01 \x03(\tR\tsignedUrl\x12\x39\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\"-\n\x0eGetDataRequest\x12\x1b\n\tflyte_url\x18\x01 \x01(\tR\x08\x66lyteUrl\"\xd6\x01\n\x0fGetDataResponse\x12<\n\x0bliteral_map\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\nliteralMap\x12I\n\x0fpre_signed_urls\x18\x02 \x01(\x0b\x32\x1f.flyteidl.service.PreSignedURLsH\x00R\rpreSignedUrls\x12\x32\n\x07literal\x18\x03 \x01(\x0b\x32\x16.flyteidl.core.LiteralH\x00R\x07literalB\x06\n\x04\x64\x61ta*C\n\x0c\x41rtifactType\x12\x1b\n\x17\x41RTIFACT_TYPE_UNDEFINED\x10\x00\x12\x16\n\x12\x41RTIFACT_TYPE_DECK\x10\x01\x32\x84\x07\n\x10\x44\x61taProxyService\x12\xf0\x01\n\x14\x43reateUploadLocation\x12-.flyteidl.service.CreateUploadLocationRequest\x1a..flyteidl.service.CreateUploadLocationResponse\"y\x92\x41M\x1aKCreates a write-only http location that is accessible for tasks at runtime.\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/api/v1/dataproxy/artifact_urn\x12\xa9\x02\n\x16\x43reateDownloadLocation\x12/.flyteidl.service.CreateDownloadLocationRequest\x1a\x30.flyteidl.service.CreateDownloadLocationResponse\"\xab\x01\x88\x02\x01\x92\x41\x7f\x1a}Deprecated: Please use CreateDownloadLink instead. Creates a read-only http location that is accessible for tasks at runtime.\x82\xd3\xe4\x93\x02 \x12\x1e/api/v1/dataproxy/artifact_urn\x12\xea\x01\n\x12\x43reateDownloadLink\x12+.flyteidl.service.CreateDownloadLinkRequest\x1a,.flyteidl.service.CreateDownloadLinkResponse\"y\x92\x41L\x1aJCreates a read-only http location that is accessible for tasks at runtime.\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/api/v1/dataproxy/artifact_link\x12\x64\n\x07GetData\x12 .flyteidl.service.GetDataRequest\x1a!.flyteidl.service.GetDataResponse\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\x0c/api/v1/dataB\xc6\x01\n\x14\x63om.flyteidl.serviceB\x0e\x44\x61taproxyProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,6 +28,8 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.serviceB\016DataproxyProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\242\002\003FSX\252\002\020Flyteidl.Service\312\002\020Flyteidl\\Service\342\002\034Flyteidl\\Service\\GPBMetadata\352\002\021Flyteidl::Service' + _CREATEUPLOADLOCATIONRESPONSE_HEADERSENTRY._options = None + _CREATEUPLOADLOCATIONRESPONSE_HEADERSENTRY._serialized_options = b'8\001' _CREATEDOWNLOADLOCATIONREQUEST._options = None _CREATEDOWNLOADLOCATIONREQUEST._serialized_options = b'\030\001' _CREATEDOWNLOADLOCATIONRESPONSE._options = None @@ -44,26 +46,28 @@ _DATAPROXYSERVICE.methods_by_name['CreateDownloadLink']._serialized_options = b'\222AL\032JCreates a read-only http location that is accessible for tasks at runtime.\202\323\344\223\002$:\001*\"\037/api/v1/dataproxy/artifact_link' _DATAPROXYSERVICE.methods_by_name['GetData']._options = None _DATAPROXYSERVICE.methods_by_name['GetData']._serialized_options = b'\202\323\344\223\002\016\022\014/api/v1/data' - _globals['_ARTIFACTTYPE']._serialized_start=1731 - _globals['_ARTIFACTTYPE']._serialized_end=1798 + _globals['_ARTIFACTTYPE']._serialized_start=1935 + _globals['_ARTIFACTTYPE']._serialized_end=2002 _globals['_CREATEUPLOADLOCATIONRESPONSE']._serialized_start=260 - _globals['_CREATEUPLOADLOCATIONRESPONSE']._serialized_end=411 - _globals['_CREATEUPLOADLOCATIONREQUEST']._serialized_start=414 - _globals['_CREATEUPLOADLOCATIONREQUEST']._serialized_end=649 - _globals['_CREATEDOWNLOADLOCATIONREQUEST']._serialized_start=651 - _globals['_CREATEDOWNLOADLOCATIONREQUEST']._serialized_end=775 - _globals['_CREATEDOWNLOADLOCATIONRESPONSE']._serialized_start=777 - _globals['_CREATEDOWNLOADLOCATIONRESPONSE']._serialized_end=903 - _globals['_CREATEDOWNLOADLINKREQUEST']._serialized_start=906 - _globals['_CREATEDOWNLOADLINKREQUEST']._serialized_end=1156 - _globals['_CREATEDOWNLOADLINKRESPONSE']._serialized_start=1159 - _globals['_CREATEDOWNLOADLINKRESPONSE']._serialized_end=1358 - _globals['_PRESIGNEDURLS']._serialized_start=1360 - _globals['_PRESIGNEDURLS']._serialized_end=1465 - _globals['_GETDATAREQUEST']._serialized_start=1467 - _globals['_GETDATAREQUEST']._serialized_end=1512 - _globals['_GETDATARESPONSE']._serialized_start=1515 - _globals['_GETDATARESPONSE']._serialized_end=1729 - _globals['_DATAPROXYSERVICE']._serialized_start=1801 - _globals['_DATAPROXYSERVICE']._serialized_end=2701 + _globals['_CREATEUPLOADLOCATIONRESPONSE']._serialized_end=558 + _globals['_CREATEUPLOADLOCATIONRESPONSE_HEADERSENTRY']._serialized_start=500 + _globals['_CREATEUPLOADLOCATIONRESPONSE_HEADERSENTRY']._serialized_end=558 + _globals['_CREATEUPLOADLOCATIONREQUEST']._serialized_start=561 + _globals['_CREATEUPLOADLOCATIONREQUEST']._serialized_end=853 + _globals['_CREATEDOWNLOADLOCATIONREQUEST']._serialized_start=855 + _globals['_CREATEDOWNLOADLOCATIONREQUEST']._serialized_end=979 + _globals['_CREATEDOWNLOADLOCATIONRESPONSE']._serialized_start=981 + _globals['_CREATEDOWNLOADLOCATIONRESPONSE']._serialized_end=1107 + _globals['_CREATEDOWNLOADLINKREQUEST']._serialized_start=1110 + _globals['_CREATEDOWNLOADLINKREQUEST']._serialized_end=1360 + _globals['_CREATEDOWNLOADLINKRESPONSE']._serialized_start=1363 + _globals['_CREATEDOWNLOADLINKRESPONSE']._serialized_end=1562 + _globals['_PRESIGNEDURLS']._serialized_start=1564 + _globals['_PRESIGNEDURLS']._serialized_end=1669 + _globals['_GETDATAREQUEST']._serialized_start=1671 + _globals['_GETDATAREQUEST']._serialized_end=1716 + _globals['_GETDATARESPONSE']._serialized_start=1719 + _globals['_GETDATARESPONSE']._serialized_end=1933 + _globals['_DATAPROXYSERVICE']._serialized_start=2005 + _globals['_DATAPROXYSERVICE']._serialized_end=2905 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.pyi index 40245087ab4..50c2bf3c5ed 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/service/dataproxy_pb2.pyi @@ -20,30 +20,41 @@ ARTIFACT_TYPE_UNDEFINED: ArtifactType ARTIFACT_TYPE_DECK: ArtifactType class CreateUploadLocationResponse(_message.Message): - __slots__ = ["signed_url", "native_url", "expires_at"] + __slots__ = ["signed_url", "native_url", "expires_at", "headers"] + class HeadersEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... SIGNED_URL_FIELD_NUMBER: _ClassVar[int] NATIVE_URL_FIELD_NUMBER: _ClassVar[int] EXPIRES_AT_FIELD_NUMBER: _ClassVar[int] + HEADERS_FIELD_NUMBER: _ClassVar[int] signed_url: str native_url: str expires_at: _timestamp_pb2.Timestamp - def __init__(self, signed_url: _Optional[str] = ..., native_url: _Optional[str] = ..., expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + headers: _containers.ScalarMap[str, str] + def __init__(self, signed_url: _Optional[str] = ..., native_url: _Optional[str] = ..., expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., headers: _Optional[_Mapping[str, str]] = ...) -> None: ... class CreateUploadLocationRequest(_message.Message): - __slots__ = ["project", "domain", "filename", "expires_in", "content_md5", "filename_root"] + __slots__ = ["project", "domain", "filename", "expires_in", "content_md5", "filename_root", "add_content_md5_metadata"] PROJECT_FIELD_NUMBER: _ClassVar[int] DOMAIN_FIELD_NUMBER: _ClassVar[int] FILENAME_FIELD_NUMBER: _ClassVar[int] EXPIRES_IN_FIELD_NUMBER: _ClassVar[int] CONTENT_MD5_FIELD_NUMBER: _ClassVar[int] FILENAME_ROOT_FIELD_NUMBER: _ClassVar[int] + ADD_CONTENT_MD5_METADATA_FIELD_NUMBER: _ClassVar[int] project: str domain: str filename: str expires_in: _duration_pb2.Duration content_md5: bytes filename_root: str - def __init__(self, project: _Optional[str] = ..., domain: _Optional[str] = ..., filename: _Optional[str] = ..., expires_in: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., content_md5: _Optional[bytes] = ..., filename_root: _Optional[str] = ...) -> None: ... + add_content_md5_metadata: bool + def __init__(self, project: _Optional[str] = ..., domain: _Optional[str] = ..., filename: _Optional[str] = ..., expires_in: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., content_md5: _Optional[bytes] = ..., filename_root: _Optional[str] = ..., add_content_md5_metadata: bool = ...) -> None: ... class CreateDownloadLocationRequest(_message.Message): __slots__ = ["native_url", "expires_in"] diff --git a/flyteidl/gen/pb_rust/flyteidl.service.rs b/flyteidl/gen/pb_rust/flyteidl.service.rs index c4271703330..e53abba678d 100644 --- a/flyteidl/gen/pb_rust/flyteidl.service.rs +++ b/flyteidl/gen/pb_rust/flyteidl.service.rs @@ -85,6 +85,9 @@ pub struct CreateUploadLocationResponse { /// ExpiresAt defines when will the signed URL expires. #[prost(message, optional, tag="3")] pub expires_at: ::core::option::Option<::prost_types::Timestamp>, + /// Data proxy generates these headers for client, and they have to add these headers to the request when uploading the file. + #[prost(map="string, string", tag="4")] + pub headers: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } /// CreateUploadLocationRequest specified request for the CreateUploadLocation API. /// The implementation in data proxy service will create the s3 location with some server side configured prefixes, @@ -122,6 +125,11 @@ pub struct CreateUploadLocationRequest { /// +optional #[prost(string, tag="6")] pub filename_root: ::prost::alloc::string::String, + /// If true, the data proxy will add content_md5 to the metadata to the signed URL and + /// it will force clients to add this metadata to the object. + /// This make sure dataproxy is backward compatible with the old flytekit. + #[prost(bool, tag="7")] + pub add_content_md5_metadata: bool, } /// CreateDownloadLocationRequest specified request for the CreateDownloadLocation API. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/flyteidl/go.mod b/flyteidl/go.mod index dcc6b2ccaf0..29ec7f91646 100644 --- a/flyteidl/go.mod +++ b/flyteidl/go.mod @@ -45,7 +45,7 @@ require ( github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/flyteorg/stow v0.3.8 // indirect + github.com/flyteorg/stow v0.3.9 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/flyteidl/go.sum b/flyteidl/go.sum index 0fa41c00049..0b4fde0b1df 100644 --- a/flyteidl/go.sum +++ b/flyteidl/go.sum @@ -105,8 +105,8 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/flyteidl/protos/flyteidl/service/dataproxy.proto b/flyteidl/protos/flyteidl/service/dataproxy.proto index 622910f6450..b24c794cc88 100644 --- a/flyteidl/protos/flyteidl/service/dataproxy.proto +++ b/flyteidl/protos/flyteidl/service/dataproxy.proto @@ -20,6 +20,9 @@ message CreateUploadLocationResponse { // ExpiresAt defines when will the signed URL expires. google.protobuf.Timestamp expires_at = 3; + + // Data proxy generates these headers for client, and they have to add these headers to the request when uploading the file. + map headers = 4; } // CreateUploadLocationRequest specified request for the CreateUploadLocation API. @@ -55,6 +58,11 @@ message CreateUploadLocationRequest { // in data proxy config. This option is useful when uploading multiple files. // +optional string filename_root = 6; + + // If true, the data proxy will add content_md5 to the metadata to the signed URL and + // it will force clients to add this metadata to the object. + // This make sure dataproxy is backward compatible with the old flytekit. + bool add_content_md5_metadata = 7; } // CreateDownloadLocationRequest specified request for the CreateDownloadLocation API. @@ -67,7 +75,6 @@ message CreateDownloadLocationRequest { // exceeds the platform allowed max. // +optional. The default value comes from a global config. google.protobuf.Duration expires_in = 2; - } message CreateDownloadLocationResponse { diff --git a/flyteplugins/go.mod b/flyteplugins/go.mod index 4b9e7d5f474..db98207f715 100644 --- a/flyteplugins/go.mod +++ b/flyteplugins/go.mod @@ -64,7 +64,7 @@ require ( github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/flyteorg/stow v0.3.8 // indirect + github.com/flyteorg/stow v0.3.9 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logr/logr v1.2.4 // indirect diff --git a/flyteplugins/go.sum b/flyteplugins/go.sum index 89e2a0ee49c..46164324415 100644 --- a/flyteplugins/go.sum +++ b/flyteplugins/go.sum @@ -138,8 +138,8 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/flyteplugins/go/tasks/pluginmachinery/ioutils/remote_file_output_reader_test.go b/flyteplugins/go/tasks/pluginmachinery/ioutils/remote_file_output_reader_test.go index 0e7ae179d92..251a3adc55e 100644 --- a/flyteplugins/go/tasks/pluginmachinery/ioutils/remote_file_output_reader_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/ioutils/remote_file_output_reader_test.go @@ -14,9 +14,14 @@ import ( ) type MemoryMetadata struct { - exists bool - size int64 - etag string + exists bool + size int64 + etag string + contentMD5 string +} + +func (m MemoryMetadata) ContentMD5() string { + return m.contentMD5 } func (m MemoryMetadata) Size() int64 { diff --git a/flyteplugins/go/tasks/plugins/array/k8s/management_test.go b/flyteplugins/go/tasks/plugins/array/k8s/management_test.go index 0eaed654672..c5d52efda71 100644 --- a/flyteplugins/go/tasks/plugins/array/k8s/management_test.go +++ b/flyteplugins/go/tasks/plugins/array/k8s/management_test.go @@ -27,9 +27,10 @@ import ( ) type metadata struct { - exists bool - size int64 - etag string + exists bool + size int64 + etag string + contentMD5 string } func (m metadata) Exists() bool { @@ -44,6 +45,10 @@ func (m metadata) Etag() string { return m.etag } +func (m metadata) ContentMD5() string { + return m.contentMD5 +} + func createSampleContainerTask() *core2.Container { return &core2.Container{ Command: []string{"cmd"}, @@ -127,7 +132,7 @@ func getMockTaskExecutionContext(ctx context.Context, parallelism int) *mocks.Ta matchedBy := mock.MatchedBy(func(s storage.DataReference) bool { return true }) - composedProtobufStore.On("Head", mock.Anything, matchedBy).Return(metadata{true, 0, ""}, nil) + composedProtobufStore.On("Head", mock.Anything, matchedBy).Return(metadata{true, 0, "", ""}, nil) dataStore := &storage.DataStore{ ComposedProtobufStore: composedProtobufStore, ReferenceConstructor: &storage.URLPathConstructor{}, diff --git a/flytepropeller/go.mod b/flytepropeller/go.mod index a3be11827c5..f42e61897e4 100644 --- a/flytepropeller/go.mod +++ b/flytepropeller/go.mod @@ -72,7 +72,7 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/flyteorg/stow v0.3.8 // indirect + github.com/flyteorg/stow v0.3.9 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/flytepropeller/go.sum b/flytepropeller/go.sum index 04f1dc08f37..93880b2b314 100644 --- a/flytepropeller/go.sum +++ b/flytepropeller/go.sum @@ -144,8 +144,8 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go b/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go index 3c016fe6bf9..4011ffb9564 100644 --- a/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go +++ b/flytepropeller/pkg/controller/nodes/dynamic/dynamic_workflow_test.go @@ -584,6 +584,10 @@ func Test_dynamicNodeHandler_buildContextualDynamicWorkflow_withLaunchPlans(t *t type existsMetadata struct{} +func (e existsMetadata) ContentMD5() string { + return "" +} + func (e existsMetadata) Exists() bool { return false } diff --git a/flytepropeller/pkg/controller/nodes/executor_test.go b/flytepropeller/pkg/controller/nodes/executor_test.go index 2bc552bab03..237928a937c 100644 --- a/flytepropeller/pkg/controller/nodes/executor_test.go +++ b/flytepropeller/pkg/controller/nodes/executor_test.go @@ -2541,6 +2541,10 @@ func init() { type existsMetadata struct{} +func (e existsMetadata) ContentMD5() string { + return "" +} + func (e existsMetadata) Exists() bool { return false } diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index 947fbe4b5c7..314e9ad0505 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -9,7 +9,7 @@ require ( github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.13.0 github.com/fatih/structtag v1.2.0 - github.com/flyteorg/stow v0.3.8 + github.com/flyteorg/stow v0.3.9 github.com/fsnotify/fsnotify v1.6.0 github.com/ghodss/yaml v1.0.0 github.com/go-gormigrate/gormigrate/v2 v2.1.1 diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index baacaca1e51..6d6cb155671 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -115,8 +115,8 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= diff --git a/flytestdlib/storage/mem_store.go b/flytestdlib/storage/mem_store.go index abe4de12cd4..a95a0a49ca2 100644 --- a/flytestdlib/storage/mem_store.go +++ b/flytestdlib/storage/mem_store.go @@ -19,9 +19,10 @@ type InMemoryStore struct { } type MemoryMetadata struct { - exists bool - size int64 - etag string + exists bool + size int64 + etag string + contentMD5 string } func (m MemoryMetadata) Size() int64 { @@ -36,6 +37,10 @@ func (m MemoryMetadata) Etag() string { return m.etag } +func (m MemoryMetadata) ContentMD5() string { + return m.contentMD5 +} + func (s *InMemoryStore) Head(ctx context.Context, reference DataReference) (Metadata, error) { data, found := s.cache[reference] var hash [md5.Size]byte diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index a022ce3e624..3e84cb7acb3 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -34,6 +34,10 @@ type Metadata interface { Exists() bool Size() int64 Etag() string + // ContentMD5 retrieves the value of a special metadata tag added by the system that + // contains the MD5 of the uploaded file. If there is no metadata attached + // or that `FlyteContentMD5` key isn't set, ContentMD5 will return empty. + ContentMD5() string } // DataStore is a simplified interface for accessing and storing data in one of the Cloud stores. @@ -52,10 +56,13 @@ type SignedURLProperties struct { ExpiresIn time.Duration // ContentMD5 defines the expected hash of the generated file. It's strongly recommended setting it. ContentMD5 string + // AddContentMD5Metadata Add ContentMD5 to the metadata of signed URL if true. + AddContentMD5Metadata bool } type SignedURLResponse struct { - URL url.URL + URL url.URL + RequiredRequestHeaders map[string]string } //go:generate mockery -name RawStore -case=underscore diff --git a/flytestdlib/storage/stow_store.go b/flytestdlib/storage/stow_store.go index 701604d4370..092ac1bbed7 100644 --- a/flytestdlib/storage/stow_store.go +++ b/flytestdlib/storage/stow_store.go @@ -6,6 +6,7 @@ import ( "io" "net/url" "strconv" + "strings" "sync" "time" @@ -27,9 +28,8 @@ import ( "github.com/flyteorg/stow/swift" ) -const ( - FailureTypeLabel contextutils.Key = "failure_type" -) +const FailureTypeLabel contextutils.Key = "failure_type" +const FlyteContentMD5 = "flyteContentMD5" var fQNFn = map[string]func(string) DataReference{ s3.Kind: func(bucket string) DataReference { @@ -104,9 +104,10 @@ type stowMetrics struct { // StowMetadata that will be returned type StowMetadata struct { - exists bool - size int64 - etag string + exists bool + size int64 + etag string + contentMD5 string } func (s StowMetadata) Size() int64 { @@ -121,6 +122,10 @@ func (s StowMetadata) Etag() string { return s.etag } +func (s StowMetadata) ContentMD5() string { + return s.contentMD5 +} + // Implements DataStore to talk to stow location store. type StowStore struct { copyImpl @@ -221,12 +226,19 @@ func (s *StowStore) Head(ctx context.Context, reference DataReference) (Metadata // Err will be caught below } else if etag, err := item.ETag(); err != nil { // Err will be caught below + } else if metadata, err := item.Metadata(); err != nil { + // Err will be caught below } else { t.Stop() + contentMD5, ok := metadata[strings.ToLower(FlyteContentMD5)].(string) + if !ok { + logger.Warningf(ctx, "Failed to cast contentMD5 [%v] to string", contentMD5) + } return StowMetadata{ - exists: true, - size: size, - etag: etag, + exists: true, + size: size, + etag: etag, + contentMD5: contentMD5, }, nil } } @@ -345,22 +357,24 @@ func (s *StowStore) CreateSignedURL(ctx context.Context, reference DataReference return SignedURLResponse{}, err } - urlStr, err := c.PreSignRequest(ctx, properties.Scope, key, stow.PresignRequestParams{ - ExpiresIn: properties.ExpiresIn, - ContentMD5: properties.ContentMD5, + res, err := c.PreSignRequest(ctx, properties.Scope, key, stow.PresignRequestParams{ + ExpiresIn: properties.ExpiresIn, + ContentMD5: properties.ContentMD5, + AddContentMD5Metadata: properties.AddContentMD5Metadata, }) if err != nil { return SignedURLResponse{}, err } - urlVal, err := url.Parse(urlStr) + urlVal, err := url.Parse(res.Url) if err != nil { return SignedURLResponse{}, err } return SignedURLResponse{ - URL: *urlVal, + URL: *urlVal, + RequiredRequestHeaders: res.RequiredRequestHeaders, }, nil } diff --git a/flytestdlib/storage/stow_store_test.go b/flytestdlib/storage/stow_store_test.go index d888977c577..99678eb8adc 100644 --- a/flytestdlib/storage/stow_store_test.go +++ b/flytestdlib/storage/stow_store_test.go @@ -53,8 +53,8 @@ type mockStowContainer struct { // CreateSignedURL creates a signed url with the provided properties. func (m mockStowContainer) PreSignRequest(_ context.Context, _ stow.ClientMethod, s string, - _ stow.PresignRequestParams) (url string, err error) { - return s, nil + _ stow.PresignRequestParams) (response stow.PresignResponse, err error) { + return stow.PresignResponse{Url: s}, nil } func (m mockStowContainer) ID() string { diff --git a/go.mod b/go.mod index 0280ec305c7..85bd1e0bd8f 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/felixge/httpsnoop v1.0.3 // indirect github.com/flyteorg/flyte/flyteidl v0.0.0-00010101000000-000000000000 // indirect github.com/flyteorg/flyte/flyteplugins v0.0.0-00010101000000-000000000000 // indirect - github.com/flyteorg/stow v0.3.8 // indirect + github.com/flyteorg/stow v0.3.9 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-gormigrate/gormigrate/v2 v2.1.1 // indirect diff --git a/go.sum b/go.sum index d3fdd20bd81..cb808f26dad 100644 --- a/go.sum +++ b/go.sum @@ -261,8 +261,8 @@ github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flyteorg/stow v0.3.8 h1:4a6BtfgDR86fUwa48DkkZTcp6WK4oQXSfewPd/kN0Z4= -github.com/flyteorg/stow v0.3.8/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= +github.com/flyteorg/stow v0.3.9 h1:oA9tKMSvdCBnTnVpx8vncwrjRf8h/w8Ks9c4VGm2Img= +github.com/flyteorg/stow v0.3.9/go.mod h1:fArjMpsYJNWkp/hyDKKdbcv07gxbuLmKFcb7YT1aSOM= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=