@@ -76,7 +76,7 @@ impl Factor for BlobStoreFactor {
7676 let ( state, table) = get_data_with_table ( data) ;
7777 BlobStoreDispatch :: new (
7878 state. allowed_containers . clone ( ) ,
79- state. store_manager . clone ( ) ,
79+ state. container_manager . clone ( ) ,
8080 table,
8181 state. containers . clone ( ) ,
8282 state. incoming_values . clone ( ) ,
@@ -97,12 +97,12 @@ impl Factor for BlobStoreFactor {
9797 & self ,
9898 mut ctx : ConfigureAppContext < T , Self > ,
9999 ) -> anyhow:: Result < Self :: AppState > {
100- let store_managers = ctx. take_runtime_config ( ) . unwrap_or_default ( ) ;
100+ let runtime_config = ctx. take_runtime_config ( ) . unwrap_or_default ( ) ;
101101
102- let delegating_manager = DelegatingContainerManager :: new ( store_managers ) ;
102+ let delegating_manager = DelegatingContainerManager :: new ( runtime_config ) ;
103103 let container_manager = Arc :: new ( delegating_manager) ;
104104
105- // Build component -> allowed stores map
105+ // Build component -> allowed containers map
106106 let mut component_allowed_containers = HashMap :: new ( ) ;
107107 for component in ctx. app ( ) . components ( ) {
108108 let component_id = component. id ( ) . to_string ( ) ;
@@ -114,11 +114,11 @@ impl Factor for BlobStoreFactor {
114114 for label in & containers {
115115 ensure ! (
116116 container_manager. is_defined( label) ,
117- "unknown blob_stores label {label:?} for component {component_id:?}"
117+ "unknown {} label {label:?} for component {component_id:?}" ,
118+ BLOB_CONTAINERS_KEY . as_ref( ) ,
118119 ) ;
119120 }
120121 component_allowed_containers. insert ( component_id, containers) ;
121- // TODO: warn (?) on unused store?
122122 }
123123
124124 Ok ( AppState {
@@ -135,11 +135,11 @@ impl Factor for BlobStoreFactor {
135135 let allowed_containers = app_state
136136 . component_allowed_containers
137137 . get ( ctx. app_component ( ) . id ( ) )
138- . expect ( "component should be in component_stores " )
138+ . expect ( "component should be in component_allowed_containers " )
139139 . clone ( ) ;
140140 let capacity = u32:: MAX ;
141141 Ok ( InstanceBuilder {
142- store_manager : app_state. container_manager . clone ( ) ,
142+ container_manager : app_state. container_manager . clone ( ) ,
143143 allowed_containers,
144144 containers : Arc :: new ( RwLock :: new ( Table :: new ( capacity) ) ) ,
145145 incoming_values : Arc :: new ( RwLock :: new ( Table :: new ( capacity) ) ) ,
@@ -161,7 +161,7 @@ pub struct AppState {
161161
162162pub struct InstanceBuilder {
163163 /// The container manager for the app. This contains *all* container mappings.
164- store_manager : Arc < DelegatingContainerManager > ,
164+ container_manager : Arc < DelegatingContainerManager > ,
165165 /// The allowed containers for this component instance.
166166 allowed_containers : HashSet < String > ,
167167 /// There are multiple WASI interfaces in play here. The factor adds each of them
0 commit comments