fix CI, replace deprecated S3 API
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
be2e24e63d
commit
909928e641
2 changed files with 4 additions and 14 deletions
2
.github/workflows/development.yml
vendored
2
.github/workflows/development.yml
vendored
|
@ -298,7 +298,7 @@ jobs:
|
||||||
MYSQL_USER: sftpgo
|
MYSQL_USER: sftpgo
|
||||||
MYSQL_PASSWORD: sftpgo
|
MYSQL_PASSWORD: sftpgo
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "mysqladmin status -h 127.0.0.1 -P 3306 -u root -p$MYSQL_ROOT_PASSWORD"
|
--health-cmd "mariadb-admin status -h 127.0.0.1 -P 3306 -u root -p$MYSQL_ROOT_PASSWORD"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 6
|
--health-retries 6
|
||||||
|
|
|
@ -115,19 +115,6 @@ func NewS3Fs(connectionID, localTempDir, mountPath string, s3Config S3FsConfig)
|
||||||
awsConfig.Credentials = aws.NewCredentialsCache(
|
awsConfig.Credentials = aws.NewCredentialsCache(
|
||||||
credentials.NewStaticCredentialsProvider(fs.config.AccessKey, fs.config.AccessSecret.GetPayload(), ""))
|
credentials.NewStaticCredentialsProvider(fs.config.AccessKey, fs.config.AccessSecret.GetPayload(), ""))
|
||||||
}
|
}
|
||||||
if fs.config.Endpoint != "" {
|
|
||||||
endpointResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...any) (aws.Endpoint, error) {
|
|
||||||
return aws.Endpoint{
|
|
||||||
URL: fs.config.Endpoint,
|
|
||||||
HostnameImmutable: fs.config.ForcePathStyle,
|
|
||||||
PartitionID: "aws",
|
|
||||||
SigningRegion: fs.config.Region,
|
|
||||||
Source: aws.EndpointSourceCustom,
|
|
||||||
}, nil
|
|
||||||
})
|
|
||||||
awsConfig.EndpointResolverWithOptions = endpointResolver
|
|
||||||
}
|
|
||||||
|
|
||||||
fs.setConfigDefaults()
|
fs.setConfigDefaults()
|
||||||
|
|
||||||
if fs.config.RoleARN != "" {
|
if fs.config.RoleARN != "" {
|
||||||
|
@ -137,6 +124,9 @@ func NewS3Fs(connectionID, localTempDir, mountPath string, s3Config S3FsConfig)
|
||||||
}
|
}
|
||||||
fs.svc = s3.NewFromConfig(awsConfig, func(o *s3.Options) {
|
fs.svc = s3.NewFromConfig(awsConfig, func(o *s3.Options) {
|
||||||
o.UsePathStyle = fs.config.ForcePathStyle
|
o.UsePathStyle = fs.config.ForcePathStyle
|
||||||
|
if fs.config.Endpoint != "" {
|
||||||
|
o.BaseEndpoint = aws.String(fs.config.Endpoint)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return fs, nil
|
return fs, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue