Deliver cellular tick diagnostics to owners
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (postgres) (push) Failing after 52s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / checks (network) (push) Failing after 3m1s
Foundation / checks (client) (push) Failing after 4m30s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-11 02:04:55 -04:00
parent fe03a0f8e4
commit ab9fbdec8f
16 changed files with 408 additions and 188 deletions
+16 -7
View File
@@ -422,7 +422,8 @@ struct RegionSessions::Impl {
c.protocol_version == network::session_protocol_v6) ||
(config.accept_cellular_actions &&
(c.protocol_version == network::session_protocol_v7 ||
c.protocol_version == network::session_protocol_v8)))))
c.protocol_version == network::session_protocol_v8 ||
c.protocol_version == network::session_protocol_v9)))))
return close(c, SessionCloseReason::protocol, now);
if (const auto* ack = std::get_if<network::SnapshotAck>(&*decoded))
return replication.acknowledge(c.session, *ack);
@@ -589,9 +590,10 @@ struct RegionSessions::Impl {
(wire_version == network::session_protocol_v5 && !primitive_v5) ||
(wire_version == network::session_protocol_v6 && !cellular_v6) ||
((wire_version == network::session_protocol_v7 ||
wire_version == network::session_protocol_v8) &&
wire_version == network::session_protocol_v8 ||
wire_version == network::session_protocol_v9) &&
!cellular_actions) ||
wire_version > network::session_protocol_v8)
wire_version > network::session_protocol_v9)
return close(c, SessionCloseReason::unsupported_version, now);
} else if (wire_version != c.protocol_version) {
return close(c, SessionCloseReason::unsupported_version, now);
@@ -615,7 +617,8 @@ struct RegionSessions::Impl {
}
if (const auto* m = std::get_if<network::CellularAction>(&*decoded)) {
if (c.protocol_version != network::session_protocol_v7 &&
c.protocol_version != network::session_protocol_v8)
c.protocol_version != network::session_protocol_v8 &&
c.protocol_version != network::session_protocol_v9)
return close(c, SessionCloseReason::protocol, now);
if (const auto receipt = intents.admit(c.session, *m, admission()))
answer(c, *receipt);
@@ -881,10 +884,15 @@ bool RegionSessions::send_cellular_perception(const network::AccountId& account,
auto& m = *impl_;
for (const auto& c : m.connections) {
if (c.state != Impl::State::established ||
c.protocol_version != network::session_protocol_v8 || c.account_id != account)
(c.protocol_version != network::session_protocol_v8 &&
c.protocol_version != network::session_protocol_v9) ||
c.account_id != account)
continue;
auto delivered = perception;
if (c.protocol_version == network::session_protocol_v8)
delivered.diagnostics.reset();
return m.endpoint
->send_message(c.id, network::encode_session(perception, c.protocol_version))
->send_message(c.id, network::encode_session(delivered, c.protocol_version))
.has_value();
}
return false;
@@ -897,7 +905,8 @@ void RegionSessions::clear_cellular_perceptions(std::uint64_t tick) {
const network::CellularPerception cleared{tick, 0, {}};
for (const auto& c : m.connections)
if (c.state == Impl::State::established &&
c.protocol_version == network::session_protocol_v8)
(c.protocol_version == network::session_protocol_v8 ||
c.protocol_version == network::session_protocol_v9))
m.send(c, cleared);
}