File tree Expand file tree Collapse file tree 4 files changed +12
-29
lines changed Expand file tree Collapse file tree 4 files changed +12
-29
lines changed Original file line number Diff line number Diff line change 3030
3131### Fixes  
3232-  Fixed spawned order client_id caching in ` ExecAlgorithm ` , thanks for reporting @kirill-gr1  
33- -  Fixed DataFusion object store registration for custom S3 endpoints (#3120  ), thanks for reporting @rgauny  
34- -  Fixed Binance instrument info dict JSON serialization (#3128  ), thanks for reporting @woung717  
33+ -  Fixed Binance instrument info dict JSON serialization, thanks for reporting @woung717  
3534-  Fixed Polymarket maker fill order side inversion (#3126  ), thanks for reporting @santivazq  
3635
3736### Internal Improvements  
Original file line number Diff line number Diff line change @@ -940,10 +940,10 @@ impl ParquetDataCatalog {
940940        // Register the object store with the session for remote URIs 
941941        if  self . is_remote_uri ( )  { 
942942            let  url = url:: Url :: parse ( & self . original_uri ) ?; 
943- 
944-             // DataFusion requires registration with protocol-level URLs (e.g., "s3://" )
945-             // rather than bucket-specific URLs (e.g., "s3:// bucket- name")
946-             let  base_url = url:: Url :: parse ( & format ! ( "{}://" ,  url. scheme( ) ) ) ?; 
943+              let  host = url 
944+                  . host_str ( ) 
945+                  . ok_or_else ( || anyhow :: anyhow! ( "Remote URI missing host/ bucket  name") ) ? ; 
946+             let  base_url = url:: Url :: parse ( & format ! ( "{}://{} " ,  url. scheme( ) ,  host ) ) ?; 
947947            self . session 
948948                . register_object_store ( & base_url,  self . object_store . clone ( ) ) ; 
949949        } 
Original file line number Diff line number Diff line change @@ -110,8 +110,12 @@ impl DataBackendSession {
110110            parsed_uri. scheme( ) , 
111111            "s3"  | "gs"  | "gcs"  | "az"  | "abfs"  | "http"  | "https" 
112112        )  { 
113-             // For cloud storage, register with the generic protocol URL 
114-             let  base_url = format ! ( "{}://" ,  parsed_uri. scheme( ) ) ; 
113+             // For cloud storage, register with the base URL (scheme + netloc) 
114+             let  base_url = format ! ( 
115+                 "{}://{}" , 
116+                 parsed_uri. scheme( ) , 
117+                 parsed_uri. host_str( ) . unwrap_or( "" ) 
118+             ) ; 
115119            let  base_parsed_url = Url :: parse ( & base_url) ?; 
116120            self . register_object_store ( & base_parsed_url,  object_store) ; 
117121        } 
Original file line number Diff line number Diff line change 1313//  limitations under the License. 
1414// ------------------------------------------------------------------------------------------------- 
1515
16- use  std:: { collections :: HashMap ,   str:: FromStr } ; 
16+ use  std:: str:: FromStr ; 
1717
1818use  nautilus_core:: UnixNanos ; 
1919use  nautilus_model:: { 
@@ -498,26 +498,6 @@ fn test_register_object_store_from_uri_nonexistent_path() {
498498    assert ! ( result. is_err( ) ) ; 
499499} 
500500
501- #[ rstest]  
502- fn  test_register_object_store_from_uri_s3 ( )  { 
503-     // Test registering remote object store ensures scheme + host base URL parsing succeeds 
504-     let  mut  storage_options = HashMap :: new ( ) ; 
505-     storage_options. insert ( 
506-         "endpoint_url" . to_string ( ) , 
507-         "https://test.endpoint.com" . to_string ( ) , 
508-     ) ; 
509-     storage_options. insert ( "region" . to_string ( ) ,  "us-west-2" . to_string ( ) ) ; 
510-     storage_options. insert ( "access_key_id" . to_string ( ) ,  "test_key" . to_string ( ) ) ; 
511-     storage_options. insert ( "secret_access_key" . to_string ( ) ,  "test_secret" . to_string ( ) ) ; 
512- 
513-     let  mut  session = DataBackendSession :: new ( 1000 ) ; 
514- 
515-     let  result = session
516-         . register_object_store_from_uri ( "s3://test-bucket/path/to/data" ,  Some ( storage_options) ) ; 
517- 
518-     assert ! ( result. is_ok( ) ) ; 
519- } 
520- 
521501#[ rstest]  
522502fn  test_rust_get_missing_intervals ( )  { 
523503    // Arrange 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments