Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions packages/toolchain/toolchain/src/tasks/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,27 @@ async fn create_edge_function_actors(
}

// Define actor tags for this function
let actor_tags = json!({
let mut actor_tags = json!({
"type": "function",
"function": fn_name,
});

// Use build tags to match the appropriate build
// This is more robust than using a specific build ID
let mut build_tags = json!({
"name": fn_name,
"current": "true",
"type": "function"
});

// Add extra tags to the function tags
if let Some(tags) = &function.build.tags {
for (k, v) in tags {
actor_tags[k] = json!(v);
build_tags[k] = json!(v);
}
}

// List all existing actors for this function
let actors_res = apis::actors_api::actors_list(
&ctx.openapi_config_cloud,
Expand All @@ -203,14 +219,6 @@ async fn create_edge_function_actors(
existing_actors.insert(actor.region.clone(), actor.id);
}

// Use build tags to match the appropriate build
// This is more robust than using a specific build ID
let build_tags = json!({
"name": fn_name,
"current": "true",
"type": "function"
});

// Create or upgrade actors for each region
for region in &region_ids {
if existing_regions.contains(region) {
Expand Down
Loading