1- use crate :: prelude:: * ;
1+ use crate :: { lib_context :: get_auth_registry , prelude:: * } ;
22
33use indexmap:: IndexMap ;
44use serde:: de:: DeserializeOwned ;
@@ -213,7 +213,6 @@ fn group_resource_states<'a>(
213213pub fn check_flow_setup_status (
214214 desired_state : Option < & FlowSetupState < DesiredMode > > ,
215215 existing_state : Option < & FlowSetupState < ExistingMode > > ,
216- auth_registry : & Arc < AuthRegistry > ,
217216) -> Result < FlowSetupStatusCheck > {
218217 let metadata_change = diff_state (
219218 existing_state. map ( |e| & e. metadata ) ,
@@ -294,7 +293,7 @@ pub fn check_flow_setup_status(
294293 & resource_id. key ,
295294 target_state,
296295 existing_without_setup_by_user,
297- auth_registry ,
296+ get_auth_registry ( ) ,
298297 ) ?)
299298 } ;
300299 target_resources. push ( ResourceSetupInfo {
@@ -316,18 +315,13 @@ pub fn check_flow_setup_status(
316315pub fn sync_setup (
317316 flows : & BTreeMap < String , Arc < FlowContext > > ,
318317 all_setup_state : & AllSetupState < ExistingMode > ,
319- auth_registry : & Arc < AuthRegistry > ,
320318) -> Result < AllSetupStatusCheck > {
321319 let mut flow_status_checks = BTreeMap :: new ( ) ;
322320 for ( flow_name, flow_context) in flows {
323321 let existing_state = all_setup_state. flows . get ( flow_name) ;
324322 flow_status_checks. insert (
325323 flow_name. clone ( ) ,
326- check_flow_setup_status (
327- Some ( & flow_context. flow . desired_state ) ,
328- existing_state,
329- auth_registry,
330- ) ?,
324+ check_flow_setup_status ( Some ( & flow_context. flow . desired_state ) , existing_state) ?,
331325 ) ;
332326 }
333327 Ok ( AllSetupStatusCheck {
@@ -342,7 +336,6 @@ pub fn sync_setup(
342336pub fn drop_setup (
343337 flow_names : impl IntoIterator < Item = String > ,
344338 all_setup_state : & AllSetupState < ExistingMode > ,
345- auth_registry : & Arc < AuthRegistry > ,
346339) -> Result < AllSetupStatusCheck > {
347340 if !all_setup_state. has_metadata_table {
348341 api_bail ! ( "CocoIndex metadata table is missing." ) ;
@@ -352,7 +345,7 @@ pub fn drop_setup(
352345 if let Some ( existing_state) = all_setup_state. flows . get ( & flow_name) {
353346 flow_status_checks. insert (
354347 flow_name,
355- check_flow_setup_status ( None , Some ( existing_state) , auth_registry ) ?,
348+ check_flow_setup_status ( None , Some ( existing_state) ) ?,
356349 ) ;
357350 }
358351 }
0 commit comments