-
Notifications
You must be signed in to change notification settings - Fork 129
fix: get new actors working on docker compose #2623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,4 +30,4 @@ | |
| "esbuild": "^0.25.5", | ||
| "actor-core": "file:./frontend/packages/actor-core.tgz" | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -190,7 +190,7 @@ async fn run(init: Init, first: bool) -> Result<()> { | |||||
| let ctx = Ctx::new(init.config, init.system, init.pool, tx); | ||||||
|
|
||||||
| tokio::try_join!( | ||||||
| async { metrics_task.await.map_err(Into::<anyhow::Error>::into) }, | ||||||
| async { metrics_task.await.map_err(Into::<anyhow::Error>::into)? }, | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error handling here is incomplete. When awaiting a Consider either: async {
// Handle both the JoinError and the inner anyhow::Error
metrics_task.await.map_err(Into::<anyhow::Error>::into)??
}Or a more explicit approach: async {
let result = metrics_task.await.map_err(Into::<anyhow::Error>::into)?;
result
}This ensures both the task completion error and any error returned by the metrics task itself are properly propagated.
Suggested change
Spotted by Diamond |
||||||
| ctx.run(rx), | ||||||
| )?; | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE actors | ||
| ADD COLUMN runner_id UUID; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,17 @@ | ||
| CREATE TABLE IF NOT EXISTS runner_logs ( | ||
| namespace LowCardinality(String), | ||
| runner_id UUID, | ||
| actor_id String, | ||
| stream_type UInt8, -- pegboard::types::LogsStreamType | ||
| ts DateTime64 (9), | ||
| message String | ||
| ) ENGINE = ReplicatedMergeTree () | ||
| PARTITION BY | ||
| toStartOfHour (ts) | ||
| ORDER BY ( | ||
| namespace, | ||
| runner_id, | ||
| toUnixTimestamp (ts), | ||
| stream_type | ||
| ) | ||
| TTL toDate (ts + toIntervalDay (3)) | ||
| TTL toDate (ts + toIntervalDay (14)) | ||
| SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
?operator is not compatible with the async block insidetokio::try_join!. This block needs to return aResulttype for the outertry_join!to handle, but adding?would cause early returns within the async block itself. The correct pattern is to usemap_err(Into::<anyhow::Error>::into)without the?operator, allowingtry_join!to handle the error propagation.Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.