Skip to content

Commit

Permalink
Merge pull request #3300 from pachyderm/fix_18_export
Browse files Browse the repository at this point in the history
Convert forgotten Op1_7 to Op1_8
  • Loading branch information
msteffen committed Dec 18, 2018
2 parents 814a3e6 + b7cfa2d commit 0c2dfdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/client/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func (c APIClient) ExtractPipeline(pipelineName string) (*pps.CreatePipelineRequ
if err != nil {
return nil, grpcutil.ScrubGRPC(err)
}
if op.Op1_7 == nil || op.Op1_7.Pipeline == nil {
if op.Op1_8 == nil || op.Op1_8.Pipeline == nil {
return nil, fmt.Errorf("malformed response is missing pipeline")
}
return op.Op1_7.Pipeline, nil
return op.Op1_8.Pipeline, nil
}

// Restore cluster state from an extract series of operations.
Expand Down
8 changes: 4 additions & 4 deletions src/server/admin/server/api_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func (w extractObjectWriter) Write(p []byte) (int, error) {
if len(value) > chunkSize {
value = value[:chunkSize]
}
if err := w(&admin.Op{Op1_7: &admin.Op1_7{Object: &pfs.PutObjectRequest{Value: value}}}); err != nil {
if err := w(&admin.Op{Op1_8: &admin.Op1_8{Object: &pfs.PutObjectRequest{Value: value}}}); err != nil {
return n, err
}
n += len(value)
Expand All @@ -416,11 +416,11 @@ func (r *extractObjectReader) Read(p []byte) (int, error) {
return 0, grpcutil.ScrubGRPC(err)
}
op := request.Op
if op.Op1_7.Object == nil {
if op.Op1_8.Object == nil {
return 0, fmt.Errorf("expected an object, but got: %v", op)
}
r.buf.Write(op.Op1_7.Object.Value)
if len(op.Op1_7.Object.Value) == 0 {
r.buf.Write(op.Op1_8.Object.Value)
if len(op.Op1_8.Object.Value) == 0 {
r.eof = true
}
}
Expand Down

0 comments on commit 0c2dfdf

Please sign in to comment.