Skip to content

Commit a07e898

Browse files
committed
fix: get new actors working on docker compose
1 parent d29889c commit a07e898

File tree

32 files changed

+195
-119
lines changed

32 files changed

+195
-119
lines changed

docker/dev-full/rivet-edge-server/config.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb",
99
"datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c",
1010
"server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10",
11-
"intercom_endpoint": "http://rivet-server:8081"
11+
"intercom_address": "http://rivet-server:8081"
1212
},
1313
"guard": {
1414
// TLS not configured for local development

docker/dev-full/rivet-guard/config.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb",
2121
"datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c",
2222
"server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10",
23-
"intercom_endpoint": "http://rivet-server:8081"
23+
"intercom_address": "http://rivet-server:8081"
2424
},
2525
"guard": {
2626
// TLS not configured for local development

docker/universal/Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ RUN apt-get update -y && \
6767
redis-tools \
6868
postgresql-client \
6969
gpg \
70-
dirmngr && \
70+
dirmngr \
71+
gcc \
72+
wget && \
7173
curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg && \
7274
echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | tee /etc/apt/sources.list.d/clickhouse.list && \
7375
apt-get update -y && \
@@ -76,7 +78,13 @@ RUN apt-get update -y && \
7678
mv migrate /usr/local/bin/migrate && \
7779
apt-get clean && \
7880
rm -rf /var/lib/apt/lists/* && \
79-
curl -Lf -o /lib/libfdb_c.so "https://github.com/apple/foundationdb/releases/download/7.1.60/libfdb_c.x86_64.so"
81+
curl -Lf -o /lib/libfdb_c.so "https://github.com/apple/foundationdb/releases/download/7.1.60/libfdb_c.x86_64.so" && \
82+
# Install go and usql
83+
wget https://go.dev/dl/go1.24.4.linux-amd64.tar.gz && \
84+
tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz && \
85+
export PATH=$PATH:/usr/local/go/bin && \
86+
export PATH="$PATH:$(go env GOPATH)/bin" && \
87+
go install github.com/xo/usql@latest
8088

8189
# MARK: Server (Full)
8290
FROM server-full-base AS server-full
@@ -137,7 +145,7 @@ RUN apt-get install -y skopeo iproute2 runc && \
137145
mkdir -p /opt/cni/bin /opt/cni/config && \
138146
curl -L https://github.com/containernetworking/plugins/releases/download/v${CNI_PLUGINS_VERSION}/cni-plugins-linux-amd64-v${CNI_PLUGINS_VERSION}.tgz | \
139147
tar -xz -C /opt/cni/bin
140-
COPY --from=builder /app/dist/rivet-container-runner /usr/local/bin/
148+
COPY --from=builder /app/dist/rivet-client /app/dist/rivet-container-runner /usr/local/bin/
141149
ENTRYPOINT ["/usr/bin/tini", "--", "rivet-client"]
142150

143151
# MARK: Monlith

examples/system-test-actor/tests/client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ async function run() {
4444
guard: {},
4545
},
4646
},
47-
udp: {
48-
protocol: "udp",
49-
// internalPort: 80,
50-
routing: {
51-
host: {},
52-
},
53-
},
47+
// udp: {
48+
// protocol: "udp",
49+
// // internalPort: 80,
50+
// routing: {
51+
// host: {},
52+
// },
53+
// },
5454
},
5555
},
5656
runtime: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
"react": "^19",
2929
"react-dom": "^19"
3030
}
31-
}
31+
}

packages/common/config/src/config/server/rivet/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ pub struct Edge {
843843
pub cluster_id: Uuid,
844844
pub datacenter_id: Uuid,
845845
pub server_id: Uuid,
846-
pub intercom_endpoint: Url,
846+
/// Url of the core cluster.
847+
pub intercom_address: Url,
847848
/// This API address will be used if there are no worker servers listed in the cluster package
848849
#[serde(default)]
849850
pub api_lan_address: Option<(String, u16)>,

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

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

39-
40-
4139
impl Id {
4240
/// Construct V0 from uuid.
4341
pub fn new_v0() -> Self {
@@ -241,20 +239,41 @@ impl TuplePack for Id {
241239
w: &mut W,
242240
tuple_depth: TupleDepth,
243241
) -> std::io::Result<VersionstampOffset> {
242+
let mut size = 1;
243+
244244
w.write_all(&[fdb_util::codes::ID])?;
245+
246+
// IMPORTANT: While the normal bytes representation of a v0 ID doesn't include the version, we write
247+
// it here so that we can unpack without a terminating NIL.
248+
if let Id::V0(_) = self {
249+
w.write_all(&[0])?;
250+
size += 1;
251+
}
252+
245253
let bytes = self.as_bytes();
254+
246255
let len = u32::try_from(bytes.len())
247256
.map_err(|err| std::io::Error::new(std::io::ErrorKind::InvalidData, err))?;
257+
size += len;
258+
248259
w.write_all(&bytes)?;
249260

250-
Ok(VersionstampOffset::None { size: 1 + len })
261+
Ok(VersionstampOffset::None { size })
251262
}
252263
}
253264

254265
impl<'de> TupleUnpack<'de> for Id {
255266
fn unpack(input: &[u8], tuple_depth: TupleDepth) -> PackResult<(&[u8], Self)> {
256267
let input = fdb_util::parse_code(input, fdb_util::codes::ID)?;
257-
let (input, slice) = fdb_util::parse_bytes(input, 16)?;
268+
let (input2, version) = fdb_util::parse_byte(input)?;
269+
270+
let (input, slice) = if version == 0 {
271+
// Parse 16 bytes after version
272+
fdb_util::parse_bytes(input2, 16)?
273+
} else {
274+
// Parse 19 bytes including version
275+
fdb_util::parse_bytes(input, 19)?
276+
};
258277

259278
let v = Id::from_bytes(slice)
260279
.map_err(|err| PackError::Message(format!("bad id format: {err}").into()))?;

packages/core/infra/server/src/run_config.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ pub fn config(rivet_config: rivet_config::Config) -> Result<RunConfigData> {
227227
),
228228
db_name: "db_pegboard_runner_log",
229229
},
230+
SqlService {
231+
kind: SqlServiceKind::ClickHouse,
232+
migrations: include_dir!(
233+
"$CARGO_MANIFEST_DIR/../../../edge/services/pegboard/db/runner"
234+
),
235+
db_name: "db_pegboard_runner",
236+
},
230237
SqlService {
231238
kind: SqlServiceKind::CockroachDB,
232239
migrations: include_dir!(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn configure(config: &rivet_config::Config) -> GlobalResult<String> {
5858
datacenter_id: Uuid::nil(),
5959
server_id: Uuid::nil(),
6060
api_lan_address: None,
61-
intercom_endpoint: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
61+
intercom_address: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
6262
redirect_logs_dir: Some(PathBuf::from("/var/log/rivet-guard")),
6363
}),
6464
status: server_config.rivet.status.clone(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn configure(config: &rivet_config::Config) -> GlobalResult<String> {
7272
datacenter_id: Uuid::nil(),
7373
server_id: Uuid::nil(),
7474
api_lan_address: None,
75-
intercom_endpoint: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
75+
intercom_address: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
7676
redirect_logs_dir: Some(PathBuf::from("/var/log/rivet-edge-server")),
7777
}),
7878
..Default::default()

0 commit comments

Comments
 (0)