@@ -76,7 +76,7 @@ impl Factor for BlobStoreFactor {
76
76
let ( state, table) = get_data_with_table ( data) ;
77
77
BlobStoreDispatch :: new (
78
78
state. allowed_containers . clone ( ) ,
79
- state. store_manager . clone ( ) ,
79
+ state. container_manager . clone ( ) ,
80
80
table,
81
81
state. containers . clone ( ) ,
82
82
state. incoming_values . clone ( ) ,
@@ -97,12 +97,12 @@ impl Factor for BlobStoreFactor {
97
97
& self ,
98
98
mut ctx : ConfigureAppContext < T , Self > ,
99
99
) -> 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 ( ) ;
101
101
102
- let delegating_manager = DelegatingContainerManager :: new ( store_managers ) ;
102
+ let delegating_manager = DelegatingContainerManager :: new ( runtime_config ) ;
103
103
let container_manager = Arc :: new ( delegating_manager) ;
104
104
105
- // Build component -> allowed stores map
105
+ // Build component -> allowed containers map
106
106
let mut component_allowed_containers = HashMap :: new ( ) ;
107
107
for component in ctx. app ( ) . components ( ) {
108
108
let component_id = component. id ( ) . to_string ( ) ;
@@ -114,11 +114,11 @@ impl Factor for BlobStoreFactor {
114
114
for label in & containers {
115
115
ensure ! (
116
116
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( ) ,
118
119
) ;
119
120
}
120
121
component_allowed_containers. insert ( component_id, containers) ;
121
- // TODO: warn (?) on unused store?
122
122
}
123
123
124
124
Ok ( AppState {
@@ -135,11 +135,11 @@ impl Factor for BlobStoreFactor {
135
135
let allowed_containers = app_state
136
136
. component_allowed_containers
137
137
. get ( ctx. app_component ( ) . id ( ) )
138
- . expect ( "component should be in component_stores " )
138
+ . expect ( "component should be in component_allowed_containers " )
139
139
. clone ( ) ;
140
140
let capacity = u32:: MAX ;
141
141
Ok ( InstanceBuilder {
142
- store_manager : app_state. container_manager . clone ( ) ,
142
+ container_manager : app_state. container_manager . clone ( ) ,
143
143
allowed_containers,
144
144
containers : Arc :: new ( RwLock :: new ( Table :: new ( capacity) ) ) ,
145
145
incoming_values : Arc :: new ( RwLock :: new ( Table :: new ( capacity) ) ) ,
@@ -161,7 +161,7 @@ pub struct AppState {
161
161
162
162
pub struct InstanceBuilder {
163
163
/// The container manager for the app. This contains *all* container mappings.
164
- store_manager : Arc < DelegatingContainerManager > ,
164
+ container_manager : Arc < DelegatingContainerManager > ,
165
165
/// The allowed containers for this component instance.
166
166
allowed_containers : HashSet < String > ,
167
167
/// There are multiple WASI interfaces in play here. The factor adds each of them
0 commit comments