Merge pull request #10916 from 2403905/issue-10846
[full-ci] Fix the ocm gateway connection pool
This commit is contained in:
6 files changed
+31
-12
No files matched your search
@@ -0,0 +1,8 @@
|
||||
Bugfix: Fix the ocm gateway connection pool
|
||||
|
||||
Fix the ocm gateway connection pool.
|
||||
Fix ocis dependency in the reva go.mod file. Bump the ocis version accordingly to the major version.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10916
|
||||
https://github.com/owncloud/ocis/issues/10846
|
||||
https://github.com/owncloud/ocis/issues/10878
|
||||
@@ -17,7 +17,7 @@ require (
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.11.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1
|
||||
github.com/cs3org/reva/v2 v2.27.2
|
||||
github.com/cs3org/reva/v2 v2.27.3-0.20250122154042-f9cde85df09a
|
||||
github.com/davidbyttow/govips/v2 v2.15.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
|
||||
@@ -251,8 +251,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-20241105092511-3ad35d174fc1 h1:RU6LT6mkD16xZs011+8foU7T3LrPvTTSWeTQ9OgfhkA=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
|
||||
github.com/cs3org/reva/v2 v2.27.2 h1:/4U0MMoJE/HV07iHmfesba7uSj3I1kZRSNmLo63qR/4=
|
||||
github.com/cs3org/reva/v2 v2.27.2/go.mod h1:OrCNgIFkp3ROHiEjNCj8eZHACmYCD4owtFRuYFlYZkU=
|
||||
github.com/cs3org/reva/v2 v2.27.3-0.20250122154042-f9cde85df09a h1:OUpU5d/BkFSj2tjfDnG5cB+Y20ekfRMDX2EdLPJFLgs=
|
||||
github.com/cs3org/reva/v2 v2.27.3-0.20250122154042-f9cde85df09a/go.mod h1:8yvuebW1eCKzRfzNXy+RSYYEESmMp5mCuM6MQ47zJow=
|
||||
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=
|
||||
|
||||
+13
-6
@@ -59,7 +59,7 @@ func init() {
|
||||
|
||||
type driver struct {
|
||||
c *config
|
||||
gateway gateway.GatewayAPIClient
|
||||
gateway *pool.Selector[gateway.GatewayAPIClient]
|
||||
}
|
||||
|
||||
type config struct {
|
||||
@@ -107,7 +107,7 @@ func New(m map[string]interface{}, _ events.Stream, _ *zerolog.Logger) (storage.
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gateway, err := pool.GetGatewayServiceClient(c.GatewaySVC)
|
||||
gateway, err := pool.GatewaySelector(c.GatewaySVC)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -155,7 +155,11 @@ func (d *driver) getWebDAVFromShare(ctx context.Context, forUser *userpb.UserId,
|
||||
if forUser != nil {
|
||||
req.Opaque = utils.AppendJSONToOpaque(nil, "userid", forUser)
|
||||
}
|
||||
res, err := d.gateway.GetReceivedOCMShare(ctx, req)
|
||||
gwc, err := d.gateway.Next()
|
||||
if err != nil {
|
||||
return nil, "", "", err
|
||||
}
|
||||
res, err := gwc.GetReceivedOCMShare(ctx, req)
|
||||
if err != nil {
|
||||
return nil, "", "", err
|
||||
}
|
||||
@@ -531,15 +535,18 @@ func (d *driver) ListStorageSpaces(ctx context.Context, filters []*provider.List
|
||||
spaceTypes[spaceType] = exists
|
||||
}
|
||||
}
|
||||
|
||||
lrsRes, err := d.gateway.ListReceivedOCMShares(ctx, &ocmpb.ListReceivedOCMSharesRequest{})
|
||||
gwc, err := d.gateway.Next()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lrsRes, err := gwc.ListReceivedOCMShares(ctx, &ocmpb.ListReceivedOCMSharesRequest{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// FIXME This might have to be ListOCMShares
|
||||
// these are grants
|
||||
|
||||
lsRes, err := d.gateway.ListOCMShares(ctx, &ocmpb.ListOCMSharesRequest{})
|
||||
lsRes, err := gwc.ListOCMShares(ctx, &ocmpb.ListOCMSharesRequest{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
+5
-1
@@ -328,7 +328,11 @@ func (u *upload) FinishUpload(ctx context.Context) error {
|
||||
// shareID, rel := shareInfoFromReference(u.Info.MetaData["ref"])
|
||||
// p := getPathFromShareIDAndRelPath(shareID, rel)
|
||||
|
||||
serviceUserCtx, err := utils.GetServiceUserContext(u.d.c.ServiceAccountID, u.d.gateway, u.d.c.ServiceAccountSecret)
|
||||
gwc, err := u.d.gateway.Next()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
serviceUserCtx, err := utils.GetServiceUserContext(u.d.c.ServiceAccountID, gwc, u.d.c.ServiceAccountSecret)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -367,8 +367,8 @@ 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.27.2
|
||||
## explicit; go 1.22.0
|
||||
# github.com/cs3org/reva/v2 v2.27.3-0.20250122154042-f9cde85df09a
|
||||
## explicit; go 1.22.7
|
||||
github.com/cs3org/reva/v2/cmd/revad/internal/grace
|
||||
github.com/cs3org/reva/v2/cmd/revad/runtime
|
||||
github.com/cs3org/reva/v2/internal/grpc/interceptors/appctx
|
||||
|
||||
Reference in new issue
Block a user