Skip to content

Commit 0169801

Browse files
committed
fix(runner-protocol): fix decoding gateway & req id from req id instead of message id (#3513)
1 parent ffe85f7 commit 0169801

File tree

7 files changed

+263
-35
lines changed

7 files changed

+263
-35
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/packages/pegboard-gateway/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod tunnel_to_ws_task;
3333
mod ws_to_tunnel_task;
3434

3535
const WEBSOCKET_OPEN_TIMEOUT: Duration = Duration::from_secs(15);
36-
const TUNNEL_ACK_TIMEOUT: Duration = Duration::from_secs(5);
36+
const RESPONSE_START_TIMEOUT: Duration = Duration::from_secs(15);
3737
const UPDATE_PING_INTERVAL: Duration = Duration::from_secs(3);
3838

3939
#[derive(RivetError, Serialize, Deserialize)]
@@ -231,10 +231,10 @@ impl CustomServeTrait for PegboardGateway {
231231

232232
Err(ServiceUnavailable.build())
233233
};
234-
let response_start = tokio::time::timeout(WEBSOCKET_OPEN_TIMEOUT, fut)
234+
let response_start = tokio::time::timeout(RESPONSE_START_TIMEOUT, fut)
235235
.await
236236
.map_err(|_| {
237-
tracing::warn!("timed out waiting for tunnel ack");
237+
tracing::warn!("timed out waiting for response start from runner");
238238

239239
ServiceUnavailable.build()
240240
})??;
@@ -373,10 +373,10 @@ impl CustomServeTrait for PegboardGateway {
373373
Err(WebSocketServiceUnavailable.build())
374374
};
375375

376-
let open_msg = tokio::time::timeout(TUNNEL_ACK_TIMEOUT, fut)
376+
let open_msg = tokio::time::timeout(WEBSOCKET_OPEN_TIMEOUT, fut)
377377
.await
378378
.map_err(|_| {
379-
tracing::warn!("timed out waiting for tunnel ack");
379+
tracing::warn!("timed out waiting for websocket open from runner");
380380

381381
WebSocketServiceUnavailable.build()
382382
})??;

engine/packages/pegboard-gateway/src/shared_state.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ pub struct SharedState(Arc<SharedStateInner>);
7272
impl SharedState {
7373
pub fn new(config: &rivet_config::Config, ups: PubSub) -> Self {
7474
let gateway_id = protocol::util::generate_gateway_id();
75+
tracing::info!(gateway_id = %protocol::util::id_to_string(&gateway_id), "setting up shared state for gateway");
7576
let receiver_subject =
7677
pegboard::pubsub_subjects::GatewayReceiverSubject::new(gateway_id).to_string();
7778

engine/sdks/rust/runner-protocol/Cargo.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/sdks/rust/runner-protocol/src/lib.rs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/sdks/rust/runner-protocol/src/uuid_compat.rs

Lines changed: 209 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/sdks/rust/runner-protocol/src/versioned.rs

Lines changed: 43 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)