@@ -68,21 +68,11 @@ pub struct S3Config {
6868 pub endpoint_url : String ,
6969
7070 /// 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" ) ]
7772 pub access_key_id : Option < String > ,
7873
7974 /// 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" ) ]
8676 pub secret_key : Option < String > ,
8777
8878 // Use aws profile name to fetch credentials
@@ -91,7 +81,6 @@ pub struct S3Config {
9181 env = "P_AWS_PROFILE_NAME" ,
9282 value_name = "profile" ,
9383 conflicts_with_all = [ "access_key_id" , "secret_key" ] ,
94- required = false
9584 ) ]
9685 pub profile_name : Option < String > ,
9786
@@ -201,7 +190,7 @@ impl ObjectStorageProvider for S3Config {
201190 // limit objectstore to a concurrent request limit
202191 let s3 = LimitStore :: new ( s3, super :: MAX_OBJECT_STORE_REQUESTS ) ;
203192
204- let object_store_registry = DefaultObjectStoreRegistry :: new ( ) ;
193+ let object_store_registry: DefaultObjectStoreRegistry = DefaultObjectStoreRegistry :: new ( ) ;
205194 let url = ObjectStoreUrl :: parse ( format ! ( "s3://{}" , & self . bucket_name) ) . unwrap ( ) ;
206195 object_store_registry. register_store ( url. as_ref ( ) , Arc :: new ( s3) ) ;
207196
0 commit comments