Skip to content

Commit 174dc68

Browse files
committed
fix: dont clear ingress ports on reschedule
1 parent 85c5499 commit 174dc68

File tree

1 file changed

+2
-10
lines changed
  • packages/edge/services/pegboard/src/workflows/actor

1 file changed

+2
-10
lines changed

packages/edge/services/pegboard/src/workflows/actor/runtime.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,20 +1393,12 @@ async fn clear_ports_and_resources(
13931393

13941394
let (
13951395
build_res,
1396-
ingress_ports,
13971396
(selected_resources_cpu_millicores, selected_resources_memory_mib),
13981397
_,
13991398
) = tokio::try_join!(
14001399
ctx.op(build::ops::get::Input {
14011400
build_ids: vec![input.image_id],
14021401
}),
1403-
sql_fetch_all!(
1404-
[ctx, (i64, i64), pool]
1405-
"
1406-
SELECT protocol, ingress_port_number
1407-
FROM ports_ingress
1408-
",
1409-
),
14101402
sql_fetch_one!(
14111403
[ctx, (Option<i64>, Option<i64>), pool]
14121404
"
@@ -1428,13 +1420,13 @@ async fn clear_ports_and_resources(
14281420
.fdb()
14291421
.await?
14301422
.run(|tx, _mc| {
1431-
let ingress_ports = ingress_ports.clone();
14321423
async move {
14331424
destroy::clear_ports_and_resources(
14341425
input.actor_id,
14351426
input.image_id,
14361427
Some(build.allocation_type),
1437-
ingress_ports,
1428+
// NOTE: Ingress ports are not cleared upon reschedule, they are reused
1429+
Vec::new(),
14381430
Some(input.runner_id),
14391431
Some(input.client_id),
14401432
Some(input.client_workflow_id),

0 commit comments

Comments
 (0)