File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
packages/toolchain/toolchain/src/tasks/deploy Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -176,11 +176,27 @@ async fn create_edge_function_actors(
176176 }
177177
178178 // Define actor tags for this function
179- let actor_tags = json ! ( {
179+ let mut actor_tags = json ! ( {
180180 "type" : "function" ,
181181 "function" : fn_name,
182182 } ) ;
183183
184+ // Use build tags to match the appropriate build
185+ // This is more robust than using a specific build ID
186+ let mut build_tags = json ! ( {
187+ "name" : fn_name,
188+ "current" : "true" ,
189+ "type" : "function"
190+ } ) ;
191+
192+ // Add extra tags to the function tags
193+ if let Some ( tags) = & function. build . tags {
194+ for ( k, v) in tags {
195+ actor_tags[ k] = json ! ( v) ;
196+ build_tags[ k] = json ! ( v) ;
197+ }
198+ }
199+
184200 // List all existing actors for this function
185201 let actors_res = apis:: actors_api:: actors_list (
186202 & ctx. openapi_config_cloud ,
@@ -203,14 +219,6 @@ async fn create_edge_function_actors(
203219 existing_actors. insert ( actor. region . clone ( ) , actor. id ) ;
204220 }
205221
206- // Use build tags to match the appropriate build
207- // This is more robust than using a specific build ID
208- let build_tags = json ! ( {
209- "name" : fn_name,
210- "current" : "true" ,
211- "type" : "function"
212- } ) ;
213-
214222 // Create or upgrade actors for each region
215223 for region in & region_ids {
216224 if existing_regions. contains ( region) {
You can’t perform that action at this time.
0 commit comments