1- use std :: sync :: Arc ;
1+ use crate :: prelude :: * ;
22
33use super :: { analyzer, plan} ;
44use crate :: {
5- api_error,
6- base:: { schema, spec} ,
75 ops:: registry:: ExecutorFactoryRegistry ,
86 service:: error:: { shared_ok, SharedError , SharedResultExt } ,
97 setup:: { self , ObjectSetupStatusCheck } ,
108} ;
11- use anyhow:: Result ;
12- use futures:: {
13- future:: { BoxFuture , Shared } ,
14- FutureExt ,
15- } ;
169
1710pub struct AnalyzedFlow {
1811 pub flow_instance : spec:: FlowInstanceSpec ,
@@ -28,8 +21,9 @@ impl AnalyzedFlow {
2821 flow_instance : crate :: base:: spec:: FlowInstanceSpec ,
2922 existing_flow_ss : Option < & setup:: FlowSetupState < setup:: ExistingMode > > ,
3023 registry : & ExecutorFactoryRegistry ,
24+ auth_registry : Arc < AuthRegistry > ,
3125 ) -> Result < Self > {
32- let ctx = analyzer:: build_flow_instance_context ( & flow_instance. name ) ;
26+ let ctx = analyzer:: build_flow_instance_context ( & flow_instance. name , auth_registry ) ;
3327 let ( data_schema, execution_plan_fut, desired_state) =
3428 analyzer:: analyze_flow ( & flow_instance, & ctx, existing_flow_ss, registry) ?;
3529 let setup_status_check =
@@ -79,8 +73,9 @@ impl AnalyzedTransientFlow {
7973 pub async fn from_transient_flow (
8074 transient_flow : spec:: TransientFlowSpec ,
8175 registry : & ExecutorFactoryRegistry ,
76+ auth_registry : Arc < AuthRegistry > ,
8277 ) -> Result < Self > {
83- let ctx = analyzer:: build_flow_instance_context ( & transient_flow. name ) ;
78+ let ctx = analyzer:: build_flow_instance_context ( & transient_flow. name , auth_registry ) ;
8479 let ( output_type, data_schema, execution_plan_fut) =
8580 analyzer:: analyze_transient_flow ( & transient_flow, & ctx, registry) ?;
8681 Ok ( Self {
0 commit comments