@@ -68,21 +68,11 @@ pub struct S3Config {
68
68
pub endpoint_url : String ,
69
69
70
70
/// The access key for AWS S3 or compatible object storage platform
71
- #[ arg(
72
- long,
73
- env = "P_S3_ACCESS_KEY" ,
74
- value_name = "access-key" ,
75
- required_unless_present = "profile_name"
76
- ) ]
71
+ #[ arg( long, env = "P_S3_ACCESS_KEY" , value_name = "access-key" ) ]
77
72
pub access_key_id : Option < String > ,
78
73
79
74
/// The secret key for AWS S3 or compatible object storage platform
80
- #[ arg(
81
- long,
82
- env = "P_S3_SECRET_KEY" ,
83
- value_name = "secret-key" ,
84
- required_unless_present = "profile_name"
85
- ) ]
75
+ #[ arg( long, env = "P_S3_SECRET_KEY" , value_name = "secret-key" ) ]
86
76
pub secret_key : Option < String > ,
87
77
88
78
// Use aws profile name to fetch credentials
@@ -91,7 +81,6 @@ pub struct S3Config {
91
81
env = "P_AWS_PROFILE_NAME" ,
92
82
value_name = "profile" ,
93
83
conflicts_with_all = [ "access_key_id" , "secret_key" ] ,
94
- required = false
95
84
) ]
96
85
pub profile_name : Option < String > ,
97
86
@@ -201,7 +190,7 @@ impl ObjectStorageProvider for S3Config {
201
190
// limit objectstore to a concurrent request limit
202
191
let s3 = LimitStore :: new ( s3, super :: MAX_OBJECT_STORE_REQUESTS ) ;
203
192
204
- let object_store_registry = DefaultObjectStoreRegistry :: new ( ) ;
193
+ let object_store_registry: DefaultObjectStoreRegistry = DefaultObjectStoreRegistry :: new ( ) ;
205
194
let url = ObjectStoreUrl :: parse ( format ! ( "s3://{}" , & self . bucket_name) ) . unwrap ( ) ;
206
195
object_store_registry. register_store ( url. as_ref ( ) , Arc :: new ( s3) ) ;
207
196
0 commit comments