Skip to content

Commit 5339a83

Browse files
committed
chore: fix runner config creation
1 parent 4019c28 commit 5339a83

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

engine/packages/pegboard/src/ops/runner_config/delete.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,18 @@ pub async fn pegboard_runner_config_delete(ctx: &OperationCtx, input: &Input) ->
4444

4545
// Bump pool when a serverless config is modified
4646
if delete_pool {
47-
ctx.signal(crate::workflows::runner_pool::Bump {})
47+
let res = ctx
48+
.signal(crate::workflows::runner_pool::Bump {})
4849
.to_workflow::<crate::workflows::runner_pool::Workflow>()
4950
.tag("namespace_id", input.namespace_id)
5051
.tag("runner_name", input.name.clone())
52+
.graceful_not_found()
5153
.send()
5254
.await?;
55+
56+
if res.is_none() {
57+
tracing::debug!(namespace_id=?input.namespace_id, name=%input.name, "no runner pool workflow to bump");
58+
}
5359
}
5460

5561
Ok(())

engine/packages/pegboard/src/ops/runner_config/upsert.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,27 @@ pub async fn pegboard_runner_config_upsert(ctx: &OperationCtx, input: &Input) ->
169169
.dispatch()
170170
.await?;
171171
} else if input.config.affects_pool() {
172-
ctx.signal(crate::workflows::runner_pool::Bump {})
172+
let res = ctx
173+
.signal(crate::workflows::runner_pool::Bump {})
173174
.to_workflow::<crate::workflows::runner_pool::Workflow>()
174175
.tag("namespace_id", input.namespace_id)
175176
.tag("runner_name", input.name.clone())
177+
.graceful_not_found()
176178
.send()
177179
.await?;
180+
181+
// Backfill
182+
if res.is_none() {
183+
ctx.workflow(crate::workflows::runner_pool::Input {
184+
namespace_id: input.namespace_id,
185+
runner_name: input.name.clone(),
186+
})
187+
.tag("namespace_id", input.namespace_id)
188+
.tag("runner_name", input.name.clone())
189+
.unique()
190+
.dispatch()
191+
.await?;
192+
}
178193
}
179194

180195
Ok(res.endpoint_config_changed)

engine/packages/universalpubsub/src/chunking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl ChunkTracker {
103103
.retain(|_, buffer| now.duration_since(buffer.last_chunk_ts) < CHUNK_BUFFER_MAX_AGE);
104104
let size_after = self.chunks_in_process.len();
105105

106-
tracing::debug!(
106+
tracing::trace!(
107107
?size_before,
108108
?size_after,
109109
"performed chunk buffer garbage collection"

0 commit comments

Comments
 (0)