Skip to content

Commit 18e91bb

Browse files
authored
fix s3 client path style not used (#344)
* bump cloud-kit version to fix #343 * change env name USE_AWS_S3 to S3_USE_AWS * update s3_use_aws default value to true * update readme about the upgrade notice
1 parent 1e260ee commit 18e91bb

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PLUGIN_REMOTE_INSTALLING_HOST=127.0.0.1
1111
PLUGIN_REMOTE_INSTALLING_PORT=5003
1212

1313
# s3 credentials
14-
USE_AWS_S3=true
14+
S3_USE_AWS=true
1515
S3_USE_AWS_MANAGED_IAM=false
1616
S3_ENDPOINT=
1717
S3_USE_PATH_STYLE=true

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ Firstly copy the `.env.example` file to `.env` and set the correct environment v
4848
cp .env.example .env
4949
```
5050

51+
If you were using a non-AWS S3 storage before version 0.1.2, you need to manually set the S3_USE_AWS environment variable to false in the .env file.
52+
5153
Attention that the `PYTHON_INTERPRETER_PATH` is the path to the python interpreter, please specify the correct path according to your python installation and make sure the python version is 3.11 or higher, as dify-plugin-sdk requires.
5254

5355
We recommend you to use `vscode` to debug the daemon, and a `launch.json` file is provided in the `.vscode` directory.
5456

57+
5558
### Python environment
5659
#### UV
5760
Daemon uses `uv` to manage the dependencies of plugins, before you start the daemon, you need to install [uv](https://github.com/astral-sh/uv) by yourself.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/go-git/go-git v4.7.0+incompatible
1111
github.com/google/uuid v1.6.0
1212
github.com/hashicorp/go-version v1.7.0
13-
github.com/langgenius/dify-cloud-kit v0.0.0-20250610144923-1b8f6a174d64
13+
github.com/langgenius/dify-cloud-kit v0.0.0-20250611112407-c54203d9e948
1414
github.com/panjf2000/ants/v2 v2.10.0
1515
github.com/redis/go-redis/v9 v9.5.5
1616
github.com/spf13/cobra v1.8.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ github.com/langgenius/dify-cloud-kit v0.0.0-20250610083317-681efb7762a4 h1:83W6f
254254
github.com/langgenius/dify-cloud-kit v0.0.0-20250610083317-681efb7762a4/go.mod h1:VCtfHs++R61MXdyrfVtPk1VwTM4JHjtY+pYUKO8QdtQ=
255255
github.com/langgenius/dify-cloud-kit v0.0.0-20250610144923-1b8f6a174d64 h1:YT4fJv3Idf7PzUzaNMl1ieALyyPszydhpUWFbYJ4+54=
256256
github.com/langgenius/dify-cloud-kit v0.0.0-20250610144923-1b8f6a174d64/go.mod h1:VCtfHs++R61MXdyrfVtPk1VwTM4JHjtY+pYUKO8QdtQ=
257+
github.com/langgenius/dify-cloud-kit v0.0.0-20250611112407-c54203d9e948 h1:+NSMZyiXfur8DNA1OIQ5q+NpLEJgiynxFV0q7VFmixc=
258+
github.com/langgenius/dify-cloud-kit v0.0.0-20250611112407-c54203d9e948/go.mod h1:VCtfHs++R61MXdyrfVtPk1VwTM4JHjtY+pYUKO8QdtQ=
257259
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
258260
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
259261
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=

internal/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func initOSS(config *app.Config) oss.OSS {
2222
Path: config.PluginStorageLocalRoot,
2323
},
2424
S3: &oss.S3{
25-
UseAws: config.UseAwsS3,
25+
UseAws: config.S3UseAWS,
2626
Endpoint: config.S3Endpoint,
2727
UsePathStyle: config.S3UsePathStyle,
2828
AccessKey: config.AWSAccessKey,

internal/types/app/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Config struct {
2626

2727
// aws s3
2828
S3UseAwsManagedIam bool `envconfig:"S3_USE_AWS_MANAGED_IAM" default:"false"`
29-
UseAwsS3 bool `envconfig:"USE_AWS_S3" default:"true"`
29+
S3UseAWS bool `envconfig:"S3_USE_AWS" default:"true"`
3030
S3Endpoint string `envconfig:"S3_ENDPOINT"`
3131
S3UsePathStyle bool `envconfig:"S3_USE_PATH_STYLE" default:"true"`
3232
AWSAccessKey string `envconfig:"AWS_ACCESS_KEY"`

0 commit comments

Comments
 (0)