Skip to content

Commit bb683fc

Browse files
committed
fix: Remove bundled AWS SDK
1 parent be02e17 commit bb683fc

File tree

587 files changed

+268
-145815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+268
-145815
lines changed

core/backend_adlv1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"syscall"
2929
"time"
3030

31-
uuid "github.com/satori/go.uuid"
31+
uuid "github.com/gofrs/uuid"
3232
"github.com/sirupsen/logrus"
3333

3434
adl "github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem"

core/backend_azblob.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func (b *AZBlob) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error) {
432432
}
433433

434434
blob := c.NewBlobURL(param.Key)
435-
resp, err := blob.GetProperties(context.TODO(), azblob.BlobAccessConditions{})
435+
resp, err := blob.GetProperties(context.TODO(), azblob.BlobAccessConditions{}, azblob.ClientProvidedKeyOptions{})
436436
if err != nil {
437437
return nil, mapAZBError(err)
438438
}
@@ -481,7 +481,7 @@ func (b *AZBlob) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) {
481481
prefixes := make([]BlobPrefixOutput, 0)
482482
items := make([]BlobItemOutput, 0)
483483

484-
var blobItems []azblob.BlobItem
484+
var blobItems []azblob.BlobItemInternal
485485
var nextMarker *string
486486

487487
options := azblob.ListBlobsSegmentOptions{
@@ -704,18 +704,18 @@ func (b *AZBlob) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error) {
704704
src := c.NewBlobURL(param.Source)
705705
dest := c.NewBlobURL(param.Destination)
706706
resp, err := dest.StartCopyFromURL(context.TODO(), src.URL(), nilMetadata(param.Metadata),
707-
azblob.ModifiedAccessConditions{}, azblob.BlobAccessConditions{})
707+
azblob.ModifiedAccessConditions{}, azblob.BlobAccessConditions{}, azblob.AccessTierNone, azblob.BlobTagsMap{})
708708
if err != nil {
709709
return nil, mapAZBError(err)
710710
}
711711

712712
if resp.CopyStatus() == azblob.CopyStatusPending {
713713
time.Sleep(50 * time.Millisecond)
714714

715-
var copy *azblob.BlobGetPropertiesResponse
716-
for copy, err = dest.GetProperties(context.TODO(), azblob.BlobAccessConditions{}); err == nil; copy, err = dest.GetProperties(context.TODO(), azblob.BlobAccessConditions{}) {
715+
var cp *azblob.BlobGetPropertiesResponse
716+
for cp, err = dest.GetProperties(context.TODO(), azblob.BlobAccessConditions{}, azblob.ClientProvidedKeyOptions{}); err == nil; cp, err = dest.GetProperties(context.TODO(), azblob.BlobAccessConditions{}, azblob.ClientProvidedKeyOptions{}) {
717717
// if there's a new copy, we can only assume the last one was done
718-
if copy.CopyStatus() != azblob.CopyStatusPending || copy.CopyID() != resp.CopyID() {
718+
if cp.CopyStatus() != azblob.CopyStatusPending || cp.CopyID() != resp.CopyID() {
719719
break
720720
}
721721
}
@@ -745,7 +745,7 @@ func (b *AZBlob) GetBlob(param *GetBlobInput) (*GetBlobOutput, error) {
745745
ModifiedAccessConditions: azblob.ModifiedAccessConditions{
746746
IfMatch: ifMatch,
747747
},
748-
}, false)
748+
}, false, azblob.ClientProvidedKeyOptions{})
749749
if err != nil {
750750
return nil, mapAZBError(err)
751751
}
@@ -798,7 +798,8 @@ func (b *AZBlob) PutBlob(param *PutBlobInput) (*PutBlobOutput, error) {
798798
azblob.BlobHTTPHeaders{
799799
ContentType: NilStr(param.ContentType),
800800
},
801-
nilMetadata(param.Metadata), azblob.BlobAccessConditions{})
801+
nilMetadata(param.Metadata), azblob.BlobAccessConditions{},
802+
azblob.AccessTierNone, azblob.BlobTagsMap{}, azblob.ClientProvidedKeyOptions{}, azblob.ImmutabilityPolicyOptions{})
802803
if err != nil {
803804
return nil, mapAZBError(err)
804805
}
@@ -837,7 +838,7 @@ func (b *AZBlob) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobA
837838
base64BlockId := base64.StdEncoding.EncodeToString([]byte(blockId))
838839

839840
_, err = blob.StageBlock(context.TODO(), base64BlockId, param.Body,
840-
azblob.LeaseAccessConditions{}, nil)
841+
azblob.LeaseAccessConditions{}, nil, azblob.ClientProvidedKeyOptions{})
841842
if err != nil {
842843
return nil, mapAZBError(err)
843844
}
@@ -880,7 +881,7 @@ func (b *AZBlob) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlo
880881

881882
_, err = blob.StageBlockFromURL(context.TODO(), base64BlockId,
882883
srcBlobURL, int64(param.Offset), int64(param.Size),
883-
azblob.LeaseAccessConditions{}, azblob.ModifiedAccessConditions{})
884+
azblob.LeaseAccessConditions{}, azblob.ModifiedAccessConditions{}, azblob.ClientProvidedKeyOptions{}, nil)
884885
if err != nil {
885886
return nil, mapAZBError(err)
886887
}
@@ -910,7 +911,7 @@ func (b *AZBlob) MultipartBlobCommit(param *MultipartBlobCommitInput) (*Multipar
910911

911912
resp, err := blob.CommitBlockList(context.TODO(), parts,
912913
azblob.BlobHTTPHeaders{}, nilMetadata(param.Metadata),
913-
azblob.BlobAccessConditions{})
914+
azblob.BlobAccessConditions{}, azblob.AccessTierNone, azblob.BlobTagsMap{}, azblob.ClientProvidedKeyOptions{}, azblob.ImmutabilityPolicyOptions{})
914915
if err != nil {
915916
return nil, mapAZBError(err)
916917
}

core/backend_s3.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func NewS3(bucket string, flags *cfg.FlagStorage, config *cfg.S3Config) (*S3Back
8989
awsConfig.LogLevel = aws.LogLevel(aws.LogDebug | aws.LogDebugWithRequestErrors)
9090
}
9191
if config.UseIAM {
92-
s.TryIAM()
92+
_ = s.TryIAM()
9393
}
9494

9595
if config.UseKMS {
@@ -444,6 +444,7 @@ func withHeader(req *request.Request, key, value string) {
444444
}
445445

446446
func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, string, error) {
447+
/*
447448
if s.config.ListV1Ext {
448449
in := s3.ListObjectsV1ExtInput(*params)
449450
req, resp := s.S3.ListObjectsV1ExtRequest(&in)
@@ -469,7 +470,9 @@ func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObject
469470
}
470471
}
471472
return &out, s.getRequestId(req), nil
472-
} else if s.config.ListV2 {
473+
} else
474+
*/
475+
if s.config.ListV2 {
473476
req, resp := s.S3.ListObjectsV2Request(params)
474477
if s.flags.TigrisPrefetch {
475478
withHeader(req, "X-Tigris-Prefetch", "true")
@@ -603,7 +606,7 @@ func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) {
603606
LastModified: i.LastModified,
604607
Size: uint64(*i.Size),
605608
StorageClass: i.StorageClass,
606-
Metadata: i.UserMetadata,
609+
// Metadata: i.UserMetadata,
607610
})
608611
}
609612

@@ -690,13 +693,13 @@ func (s *S3Backend) mpuCopyPart(from string, to string, mpuId string, bytes stri
690693

691694
func (s *S3Backend) partsRequired(partSizes []cfg.PartSizeConfig, size int64) int {
692695
var partsRequired int
693-
for _, cfg := range partSizes {
694-
totalSize := int64(cfg.PartCount * cfg.PartSize)
696+
for _, config := range partSizes {
697+
totalSize := int64(config.PartCount * config.PartSize)
695698
if totalSize >= size {
696-
partsRequired += int((size + int64(cfg.PartSize) - 1) / int64(cfg.PartSize))
699+
partsRequired += int((size + int64(config.PartSize) - 1) / int64(config.PartSize))
697700
break
698701
}
699-
partsRequired += int(cfg.PartCount)
702+
partsRequired += int(config.PartCount)
700703
size -= int64(totalSize)
701704
}
702705
return partsRequired
@@ -1023,6 +1026,8 @@ func (s *S3Backend) selectStorageClass(size *uint64) *string {
10231026
}
10241027

10251028
func (s *S3Backend) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error) {
1029+
return nil, fmt.Errorf("not implemented")
1030+
/*
10261031
patch := &s3.PatchObjectInput{
10271032
Bucket: &s.bucket,
10281033
Key: &param.Key,
@@ -1049,6 +1054,7 @@ func (s *S3Backend) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error) {
10491054
LastModified: resp.Object.LastModified,
10501055
RequestId: s.getRequestId(req),
10511056
}, nil
1057+
*/
10521058
}
10531059

10541060
func (s *S3Backend) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error) {

core/cfg/conf_azure.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func azureFindAccount(client azblob.AccountsClient, account string) (*azblob.End
269269
return nil, "", err
270270
}
271271

272-
for _, acc := range *accountsRes.Value {
272+
for _, acc := range accountsRes.Values() {
273273
if *acc.Name == account {
274274
// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/...
275275
parts := strings.SplitN(*acc.ID, "/", 6)
@@ -370,7 +370,7 @@ func AzureBlobConfig(endpoint string, location string, storageType string) (conf
370370

371371
if key == "" {
372372
var keysRes azblob.AccountListKeysResult
373-
keysRes, err = client.ListKeys(context.TODO(), resourceGroup, account)
373+
keysRes, err = client.ListKeys(context.TODO(), resourceGroup, account, "kerb")
374374
if err != nil || len(*keysRes.Keys) == 0 {
375375
err = fmt.Errorf("Missing key: configure via AZURE_STORAGE_KEY "+
376376
"or %v/config", configDir)

go.mod

Lines changed: 54 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,87 +3,95 @@ module github.com/yandex-cloud/geesefs
33
go 1.23
44

55
require (
6-
cloud.google.com/go/storage v1.43.0
7-
github.com/Azure/azure-pipeline-go v0.2.2
8-
github.com/Azure/azure-sdk-for-go v32.1.0+incompatible
9-
github.com/Azure/azure-storage-blob-go v0.7.1-0.20190724222048-33c102d4ffd2
10-
github.com/Azure/go-autorest/autorest v0.11.18
11-
github.com/Azure/go-autorest/autorest/adal v0.9.13
12-
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7
13-
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2
14-
github.com/aws/aws-sdk-go v1.38.7
6+
cloud.google.com/go/storage v1.50.0
7+
github.com/Azure/azure-pipeline-go v0.2.3
8+
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
9+
github.com/Azure/azure-storage-blob-go v0.15.0
10+
github.com/Azure/go-autorest/autorest v0.11.29
11+
github.com/Azure/go-autorest/autorest/adal v0.9.24
12+
github.com/Azure/go-autorest/autorest/azure/auth v0.5.13
13+
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6
14+
github.com/aws/aws-sdk-go v1.55.6
15+
github.com/gofrs/uuid v4.4.0+incompatible
1516
github.com/golang/protobuf v1.5.4
1617
github.com/google/uuid v1.6.0
17-
github.com/jacobsa/fuse v0.0.0-20230810134708-ab21db1af836
18+
github.com/jacobsa/fuse v0.0.0-20241025064006-8ccd61173b05
1819
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
1920
github.com/mitchellh/go-homedir v1.1.0
2021
github.com/pkg/xattr v0.4.9
21-
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
2222
github.com/sevlyar/go-daemon v0.1.6
23-
github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984
24-
github.com/sirupsen/logrus v1.8.1
23+
github.com/shirou/gopsutil v3.21.11+incompatible
24+
github.com/sirupsen/logrus v1.9.3
2525
github.com/tidwall/btree v1.7.0
26-
github.com/urfave/cli v1.21.1-0.20190807111034-521735b7608a
27-
github.com/winfsp/cgofuse v1.5.0
26+
github.com/urfave/cli v1.22.16
27+
github.com/winfsp/cgofuse v1.6.0
2828
golang.org/x/sync v0.10.0
2929
golang.org/x/sys v0.29.0
30-
google.golang.org/api v0.214.0
31-
google.golang.org/grpc v1.69.2
32-
google.golang.org/protobuf v1.36.2
30+
google.golang.org/api v0.217.0
31+
google.golang.org/grpc v1.69.4
32+
google.golang.org/protobuf v1.36.3
3333
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
34-
gopkg.in/ini.v1 v1.46.0
34+
gopkg.in/ini.v1 v1.67.0
3535
)
3636

3737
require (
38+
cel.dev/expr v0.19.1 // indirect
3839
cloud.google.com/go v0.118.0 // indirect
39-
cloud.google.com/go/auth v0.13.0 // indirect
40-
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
40+
cloud.google.com/go/auth v0.14.0 // indirect
41+
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
4142
cloud.google.com/go/compute/metadata v0.6.0 // indirect
4243
cloud.google.com/go/iam v1.3.1 // indirect
44+
cloud.google.com/go/monitoring v1.23.0 // indirect
4345
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
4446
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
4547
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
4648
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
4749
github.com/Azure/go-autorest/logger v0.2.1 // indirect
4850
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
49-
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
51+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect
52+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.49.0 // indirect
53+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.49.0 // indirect
54+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
55+
github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect
56+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
5057
github.com/dimchansky/utfbom v1.1.1 // indirect
58+
github.com/envoyproxy/go-control-plane/envoy v1.32.3 // indirect
59+
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
5160
github.com/felixge/httpsnoop v1.0.4 // indirect
52-
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
5361
github.com/go-logr/logr v1.4.2 // indirect
5462
github.com/go-logr/stdr v1.2.2 // indirect
55-
github.com/go-ole/go-ole v1.2.1 // indirect
56-
github.com/google/s2a-go v0.1.8 // indirect
63+
github.com/go-ole/go-ole v1.3.0 // indirect
64+
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
65+
github.com/google/s2a-go v0.1.9 // indirect
5766
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
58-
github.com/googleapis/gax-go/v2 v2.14.0 // indirect
59-
github.com/gopherjs/gopherjs v0.0.0-20210202160940-bed99a852dfe // indirect
67+
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
6068
github.com/jmespath/go-jmespath v0.4.0 // indirect
61-
github.com/jtolds/gls v4.2.0+incompatible // indirect
6269
github.com/kr/pretty v0.3.1 // indirect
6370
github.com/kr/text v0.2.0 // indirect
64-
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect
65-
github.com/pkg/errors v0.9.1 // indirect
66-
github.com/rogpeppe/go-internal v1.10.0 // indirect
67-
github.com/smartystreets/assertions v0.0.0-20160201214316-443d812296a8 // indirect
68-
github.com/smartystreets/goconvey v1.6.1-0.20160119221636-995f5b2e021c // indirect
69-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
70-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
71-
go.opentelemetry.io/otel v1.31.0 // indirect
72-
go.opentelemetry.io/otel/metric v1.31.0 // indirect
73-
go.opentelemetry.io/otel/trace v1.31.0 // indirect
71+
github.com/mattn/go-ieproxy v0.0.12 // indirect
72+
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
73+
github.com/rogpeppe/go-internal v1.13.1 // indirect
74+
github.com/russross/blackfriday/v2 v2.1.0 // indirect
75+
github.com/yusufpapurcu/wmi v1.2.4 // indirect
76+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
77+
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect
78+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
79+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
80+
go.opentelemetry.io/otel v1.34.0 // indirect
81+
go.opentelemetry.io/otel/metric v1.34.0 // indirect
82+
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
83+
go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
84+
go.opentelemetry.io/otel/trace v1.34.0 // indirect
7485
golang.org/x/crypto v0.32.0 // indirect
7586
golang.org/x/net v0.34.0 // indirect
76-
golang.org/x/oauth2 v0.24.0 // indirect
87+
golang.org/x/oauth2 v0.25.0 // indirect
7788
golang.org/x/text v0.21.0 // indirect
78-
golang.org/x/time v0.8.0 // indirect
79-
google.golang.org/genproto v0.0.0-20250106144421-5f5ef82da422 // indirect
80-
google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d // indirect
81-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect
82-
gopkg.in/yaml.v2 v2.4.0 // indirect
89+
golang.org/x/time v0.9.0 // indirect
90+
google.golang.org/genproto v0.0.0-20250115164207-1a7da9e5054f // indirect
91+
google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
92+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
8393
)
8494

85-
replace github.com/aws/aws-sdk-go => ./s3ext
86-
8795
replace github.com/winfsp/cgofuse => github.com/vitalif/cgofuse v0.0.0-20230609211427-22e8fa44f6b8
8896

8997
replace github.com/jacobsa/fuse => github.com/vitalif/fusego v0.0.0-20241023174951-7a12c251bb93

0 commit comments

Comments
 (0)