Bump reva

This commit is contained in:
André Duffeck
2024-01-24 10:49:45 +01:00
parent 9b87682f4e
commit b5ed06dad6
9 changed files with 24 additions and 11 deletions

View File

@@ -2,5 +2,6 @@ Enhancement: Update reva to latest edge version
We update reva to the latest edge version to get the latest fixes and features.
https://github.com/owncloud/ocis/pull/8278
https://github.com/owncloud/ocis/pull/8264
https://github.com/owncloud/ocis/pull/8100

2
go.mod
View File

@@ -13,7 +13,7 @@ require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.9.0
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781
github.com/cs3org/reva/v2 v2.18.1-0.20240123151850-049234cc31e0
github.com/cs3org/reva/v2 v2.18.1-0.20240124094635-6eec406c0be7
github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25
github.com/disintegration/imaging v1.6.2
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e

4
go.sum
View File

@@ -1018,8 +1018,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY=
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.18.1-0.20240123151850-049234cc31e0 h1:btY1QRE5X4bvp7V+PUkQptFFBkB9QoJTObDNrX9G3EU=
github.com/cs3org/reva/v2 v2.18.1-0.20240123151850-049234cc31e0/go.mod h1:GCN3g6uYE0Nvd31dGlhaGGyUviUfbG2NkecPRv5oSc4=
github.com/cs3org/reva/v2 v2.18.1-0.20240124094635-6eec406c0be7 h1:g7vQAbo64ziFqqhKcim3JCjDW1zqHy9imAm2HZmmK8w=
github.com/cs3org/reva/v2 v2.18.1-0.20240124094635-6eec406c0be7/go.mod h1:GCN3g6uYE0Nvd31dGlhaGGyUviUfbG2NkecPRv5oSc4=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=

View File

@@ -321,7 +321,7 @@ func (s *service) GetPath(ctx context.Context, req *provider.GetPathRequest) (*p
return &provider.GetPathResponse{
Status: status.NewOK(ctx),
Path: receivedShare.MountPoint.Path,
Path: filepath.Clean("/" + receivedShare.MountPoint.Path),
}, nil
}

View File

@@ -303,6 +303,7 @@ func (s *svc) executePathCopy(ctx context.Context, selector pool.Selectable[gate
return err
}
httpUploadReq.Header.Set(datagateway.TokenTransportHeader, uploadToken)
httpUploadReq.ContentLength = int64(cp.sourceInfo.GetSize())
httpUploadRes, err := s.client.Do(httpUploadReq)
if err != nil {
@@ -521,6 +522,7 @@ func (s *svc) executeSpacesCopy(ctx context.Context, w http.ResponseWriter, sele
return err
}
httpUploadReq.Header.Set(datagateway.TokenTransportHeader, uploadToken)
httpUploadReq.ContentLength = int64(cp.sourceInfo.GetSize())
httpUploadRes, err := s.client.Do(httpUploadReq)
if err != nil {

View File

@@ -307,6 +307,7 @@ func (s *svc) handlePut(ctx context.Context, w http.ResponseWriter, r *http.Requ
}
Propagator.Inject(ctx, propagation.HeaderCarrier(httpReq.Header))
httpReq.Header.Set(datagateway.TokenTransportHeader, token)
httpReq.ContentLength = length
httpRes, err := s.client.Do(httpReq)
if err != nil {

View File

@@ -72,13 +72,21 @@ func (fs *Decomposedfs) Upload(ctx context.Context, req storage.UploadRequest, u
defer fd.Close()
defer os.RemoveAll(assembledFile)
req.Body = fd
}
size, err := session.WriteChunk(ctx, 0, req.Body)
if err != nil {
return provider.ResourceInfo{}, errors.Wrap(err, "Decomposedfs: error writing to binary file")
size, err := session.WriteChunk(ctx, 0, req.Body)
if err != nil {
return provider.ResourceInfo{}, errors.Wrap(err, "Decomposedfs: error writing to binary file")
}
session.SetSize(size)
} else {
size, err := session.WriteChunk(ctx, 0, req.Body)
if err != nil {
return provider.ResourceInfo{}, errors.Wrap(err, "Decomposedfs: error writing to binary file")
}
if size != req.Length {
return provider.ResourceInfo{}, errtypes.PartialContent("Decomposedfs: unexpected end of stream")
}
}
session.SetSize(size)
if err := session.FinishUpload(ctx); err != nil {
return provider.ResourceInfo{}, err

View File

@@ -96,7 +96,8 @@ func (store OcisStore) List(ctx context.Context) ([]*OcisSession, error) {
}
for _, info := range infoFiles {
progress, err := store.Get(ctx, info)
id := strings.TrimSuffix(filepath.Base(info), filepath.Ext(info))
progress, err := store.Get(ctx, id)
if err != nil {
appctx.GetLogger(ctx).Error().Interface("path", info).Msg("Decomposedfs: could not getUploadSession")
continue

2
vendor/modules.txt vendored
View File

@@ -362,7 +362,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
# github.com/cs3org/reva/v2 v2.18.1-0.20240123151850-049234cc31e0
# github.com/cs3org/reva/v2 v2.18.1-0.20240124094635-6eec406c0be7
## explicit; go 1.21
github.com/cs3org/reva/v2/cmd/revad/internal/grace
github.com/cs3org/reva/v2/cmd/revad/runtime