Skip to content

Commit 1b91198

Browse files
MasterPtatoNathanFlurry
authored andcommitted
fix(pegboard): convert ws manager socket to unix socket
1 parent c6732ea commit 1b91198

File tree

50 files changed

+1296
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1296
-711
lines changed

Cargo.toml

Lines changed: 1 addition & 4 deletions
Large diffs are not rendered by default.

docker/dev-full/prometheus/prometheus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ scrape_configs:
1414
- job_name: rivet-client
1515
static_configs:
1616
- targets:
17-
- rivet-client:6090
17+
- rivet-client:8091

docker/dev-full/vector-client/vector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sources:
88
prometheus_pegboard:
99
type: prometheus_scrape
1010
endpoints:
11-
- http://rivet-client:6090
11+
- http://rivet-client:8091
1212
scrape_interval_secs: 15
1313

1414
dynamic_events_http:

docker/monolith/build-scripts/setup_s6.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const services: Service[] = [
103103
rootUser: true,
104104
ports: {
105105
runner: 6080,
106-
metrics: 6090,
106+
metrics: 8091,
107107
},
108108
},
109109

docker/monolith/vector-client/vector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sources:
1212
prometheus_pegboard:
1313
type: prometheus_scrape
1414
endpoints:
15-
- http://rivet-client:6090
15+
- http://rivet-client:8091
1616
scrape_interval_secs: 15
1717

1818
pegboard_manager:

packages/common/chirp-workflow/core/src/worker.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ impl Worker {
8383
loop {
8484
tokio::select! {
8585
_ = tick_interval.tick() => {},
86+
res = wake_sub.next() => {
87+
if res.is_none() {
88+
return Err(WorkflowError::SubscriptionUnsubscribed.into());
89+
}
90+
91+
tick_interval.reset();
92+
},
93+
8694
res = &mut gc_handle => {
8795
tracing::error!(?res, "metrics task unexpectedly stopped");
8896
break;
@@ -91,13 +99,6 @@ impl Worker {
9199
tracing::error!(?res, "metrics task unexpectedly stopped");
92100
break;
93101
},
94-
res = wake_sub.next() => {
95-
if res.is_none() {
96-
return Err(WorkflowError::SubscriptionUnsubscribed.into());
97-
}
98-
99-
tick_interval.reset();
100-
},
101102
_ = ctrl_c() => break,
102103
_ = sigterm.recv() => break,
103104
}

packages/common/metrics/src/server.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
use std::net::SocketAddr;
2+
13
use global_error::prelude::*;
24
use hyper::{
35
header::CONTENT_TYPE,
46
service::{make_service_fn, service_fn},
57
Body, Request, Response, Server,
68
};
79
use prometheus::{Encoder, TextEncoder};
8-
use std::net::SocketAddr;
910

1011
// TODO: Record extra labels
1112

packages/common/util/core/src/id.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ pub enum Id {
3636
V1([u8; 18]),
3737
}
3838

39+
40+
3941
impl Id {
4042
/// Construct V0 from uuid.
4143
pub fn new_v0() -> Self {
@@ -313,6 +315,12 @@ impl sqlx::postgres::PgHasArrayType for Id {
313315
}
314316
}
315317

318+
impl Default for Id {
319+
fn default() -> Self {
320+
Id::V0(Uuid::new_v4())
321+
}
322+
}
323+
316324
/// Decode a base36 string into a fixed-size byte array.
317325
fn decode_base36<const N: usize>(s: &str) -> Result<[u8; N], IdError> {
318326
let mut data = [0u8; N];

packages/core/services/cluster/src/workflows/server/install/install_scripts/components/vector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn configure(namespace: &str, config: &Config, pool_type: PoolType) -> Globa
8181
}
8282
});
8383

84-
// Add pegboard manager and runner logs
84+
// Add pegboard manager and actor logs
8585
match pool_type {
8686
PoolType::Pegboard | PoolType::PegboardIsolate => {
8787
config_json["sources"]["pegboard_manager"] = json!({

packages/core/services/cluster/src/workflows/server/install/install_scripts/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ pub async fn gen_initialize(
179179
"pegboard".into(),
180180
components::vector::PrometheusTarget {
181181
// Should match port from pb manager config
182-
endpoint: "http://127.0.0.1:6090".into(),
182+
endpoint: "http://127.0.0.1:8091".into(),
183183
scrape_interval: 15,
184184
},
185185
);
@@ -194,7 +194,7 @@ pub async fn gen_initialize(
194194
"pegboard".into(),
195195
components::vector::PrometheusTarget {
196196
// Should match port from pb manager config
197-
endpoint: "http://127.0.0.1:6090".into(),
197+
endpoint: "http://127.0.0.1:8091".into(),
198198
scrape_interval: 15,
199199
},
200200
);

0 commit comments

Comments
 (0)