diff --git a/docker/dev-full/docker-compose.yml b/docker/dev-full/docker-compose.yml index dcd293442b..9602796578 100644 --- a/docker/dev-full/docker-compose.yml +++ b/docker/dev-full/docker-compose.yml @@ -40,7 +40,7 @@ services: networks: - rivet-network healthcheck: - test: ["CMD", "curl", "-f", "http://127.0.0.1:8090/health/liveness"] + test: ["CMD", "curl", "-f", "http://127.0.0.1:6430/health/liveness"] interval: 2s timeout: 10s retries: 10 @@ -86,7 +86,7 @@ services: networks: - rivet-network healthcheck: - test: ["CMD", "curl", "-f", "http://127.0.0.1:8090/health/liveness"] + test: ["CMD", "curl", "-f", "http://127.0.0.1:6430/health/liveness"] interval: 2s timeout: 10s retries: 10 diff --git a/docker/dev-full/rivet-edge-server/config.jsonc b/docker/dev-full/rivet-edge-server/config.jsonc index f441be3844..1619be1563 100644 --- a/docker/dev-full/rivet-edge-server/config.jsonc +++ b/docker/dev-full/rivet-edge-server/config.jsonc @@ -8,7 +8,7 @@ "cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb", "datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c", "server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10", - "intercom_endpoint": "http://rivet-server:8081" + "intercom_endpoint": "http://rivet-server:6421" }, "guard": { // TLS not configured for local development diff --git a/docker/dev-full/rivet-guard/config.jsonc b/docker/dev-full/rivet-guard/config.jsonc index 2c704e7bb5..7e56b42f5d 100644 --- a/docker/dev-full/rivet-guard/config.jsonc +++ b/docker/dev-full/rivet-guard/config.jsonc @@ -20,7 +20,7 @@ "cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb", "datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c", "server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10", - "intercom_endpoint": "http://rivet-server:8081" + "intercom_endpoint": "http://rivet-server:6421" }, "guard": { // TLS not configured for local development diff --git a/frontend/apps/hub/.env b/frontend/apps/hub/.env index 313e1ba527..d32ffca04b 100644 --- a/frontend/apps/hub/.env +++ b/frontend/apps/hub/.env @@ -1,4 +1,4 @@ -VITE_APP_API_URL=http://127.0.0.1:8080 +VITE_APP_API_URL=http://127.0.0.1:6420 VITE_APP_ASSETS_URL=https://assets2.rivet.gg VITE_APP_SENTRY_DSN="https://66a566505cfb4341732a3d350f2b87e2@o4504307129188352.ingest.sentry.io/4506435887366144" VITE_APP_SENTRY_PROJECT_ID="4506435887366144" diff --git a/packages/toolchain/cli/src/util/login.rs b/packages/toolchain/cli/src/util/login.rs index cfc1d62469..388f7bc17b 100644 --- a/packages/toolchain/cli/src/util/login.rs +++ b/packages/toolchain/cli/src/util/login.rs @@ -15,7 +15,7 @@ pub fn inquire_self_hosting() -> Result> { let api_endpoint = if !using_cloud { let e = inquire::Text::new("What is the API endpoint?") - .with_default("http://localhost:8080") + .with_default("http://localhost:6420") .with_validator(|input: &str| match url::Url::parse(input) { Result::Ok(_) => StdResult::Ok(Validation::Valid), Err(err) => StdResult::Ok(Validation::Invalid(format!("{err}").into())), diff --git a/packages/toolchain/toolchain/src/util/actor/logs.rs b/packages/toolchain/toolchain/src/util/actor/logs.rs index adbd1cba04..16770c8e50 100644 --- a/packages/toolchain/toolchain/src/util/actor/logs.rs +++ b/packages/toolchain/toolchain/src/util/actor/logs.rs @@ -1,11 +1,9 @@ -use crate::{ - rivet_api::{apis, models}, - ToolchainCtx, -}; +use crate::{rivet_api::apis, ToolchainCtx}; use anyhow::*; use base64::{engine::general_purpose::STANDARD, Engine}; use chrono::{DateTime, Utc}; use clap::ValueEnum; +use serde_json::json; use std::time::Duration; use tokio::signal; use tokio::sync::watch; @@ -63,18 +61,17 @@ async fn tail_streams( stdout_fetched_tx: watch::Sender, stderr_fetched_tx: watch::Sender, ) -> Result<()> { - // TODO: Update ot use ActorsQueryLogStream::All tokio::try_join!( tail_stream( ctx, &opts, - models::ActorsQueryLogStream::StdOut, + 0, // stdout stdout_fetched_tx ), tail_stream( ctx, &opts, - models::ActorsQueryLogStream::StdErr, + 1, // stderr stderr_fetched_tx ), ) @@ -85,7 +82,7 @@ async fn tail_streams( async fn tail_stream( ctx: &ToolchainCtx, opts: &TailOpts<'_>, - stream: models::ActorsQueryLogStream, + stream: i32, // 0 = stdout, 1 = stderr log_fetched_tx: watch::Sender, ) -> Result<()> { let mut watch_index: Option = None; @@ -95,8 +92,8 @@ async fn tail_stream( // future doesn't exit. match (&opts.stream, stream) { (LogStream::All, _) => {} - (LogStream::StdOut, models::ActorsQueryLogStream::StdOut) => {} - (LogStream::StdErr, models::ActorsQueryLogStream::StdErr) => {} + (LogStream::StdOut, 0) => {} + (LogStream::StdErr, 1) => {} _ => { // Notify poll_actor_state log_fetched_tx.send(true).ok(); @@ -107,15 +104,19 @@ async fn tail_stream( } loop { + // Build query expression for a single actor + let query_expr = json!({ + "property": "actor_id", + "value": opts.actor_id.to_string(), + "case_sensitive": true + }); + let query_json = serde_json::to_string(&query_expr)?; + let res = apis::actors_logs_api::actors_logs_get( &ctx.openapi_config_cloud, - stream, - &serde_json::to_string(&vec![opts.actor_id])?, + &query_json, Some(&ctx.project.name_id), Some(opts.environment), - None, - None, - None, watch_index.as_deref(), ) .await @@ -127,7 +128,15 @@ async fn tail_stream( first_batch_fetched = true; } - for (ts, line) in res.timestamps.iter().zip(res.lines.iter()) { + // Filter logs by stream type + for (i, (ts, line)) in res.timestamps.iter().zip(res.lines.iter()).enumerate() { + // Check if this log entry is from the stream we're interested in + if let Some(&log_stream) = res.streams.get(i) { + if log_stream != stream { + continue; + } + } + let Result::Ok(ts) = ts.parse::>() else { eprintln!("Failed to parse timestamp: {ts} for line {line}"); continue; diff --git a/tests/load/actor-lifecycle/config.ts b/tests/load/actor-lifecycle/config.ts index 55ee919818..c908bdcba8 100644 --- a/tests/load/actor-lifecycle/config.ts +++ b/tests/load/actor-lifecycle/config.ts @@ -1,7 +1,7 @@ import type { Config } from "./types.ts"; export const CONFIG: Config = { - rivetEndpoint: __ENV.RIVET_ENDPOINT || "http://localhost:8080", + rivetEndpoint: __ENV.RIVET_ENDPOINT || "http://localhost:6420", rivetServiceToken: __ENV.RIVET_SERVICE_TOKEN || undefined, rivetProject: __ENV.RIVET_PROJECT || "default", rivetEnvironment: __ENV.RIVET_ENVIRONMENT || "default",