mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-08 02:36:37 +08:00
fix(backend): resolve federation forward traffic stats and listener disappearance (#208)
* fix(backend): add repository methods for federation forward runtime management - GetActiveForwardPeerShareRuntimeByServiceName: lookup runtime by share_id and service_name - MarkForwardPeerShareRuntimeReleasedByServiceName: release runtime by service_name - ListActiveForwardPeerShareRuntimesByNodeAndServiceName: node-scoped query for flow processing Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(backend): bind and release federation forward runtimes on service commands - bindPeerShareForwardRuntimeServices: create runtime if missing, update ServiceName/Port/Applied/Status - releasePeerShareForwardRuntimeServices: handle deleteservice command to mark runtime released - parseFederationForwardServiceNamesForRelease: extract service names from delete payload - Tests: bind creates runtime when missing, release marks runtime as released Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(backend): scope federation flow lookup by node to avoid cross-share collisions - flowUpload: use GetNodeBySecret to extract nodeID for flow processing - processFlowItem: accept nodeID parameter and pass to flow handlers - processPeerShareFlowByServiceName: try node-scoped query first, fallback to global - Add warning log when multiple runtimes match (ambiguous) - Tests: update all processFlowItem calls with nodeID parameter Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test(contract): adjust federation dual panel contract expectations Update assertion for entry share runtime binding behavior after fix Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -166,7 +166,7 @@ func TestFederationDualPanelMiddleExitAutoPortContract(t *testing.T) {
|
||||
|
||||
assertCount(t, providerRepo, `SELECT COUNT(1) FROM peer_share_runtime WHERE share_id = ? AND status = 1 AND applied = 1`, middleShareID, 1)
|
||||
assertCount(t, providerRepo, `SELECT COUNT(1) FROM peer_share_runtime WHERE share_id = ? AND status = 1 AND applied = 1`, exitShareID, 1)
|
||||
assertCount(t, providerRepo, `SELECT COUNT(1) FROM peer_share_runtime WHERE share_id = ?`, entryShareID, 0)
|
||||
assertCount(t, providerRepo, `SELECT COUNT(1) FROM peer_share_runtime WHERE share_id = ? AND status = 1 AND applied = 1`, entryShareID, 1)
|
||||
}
|
||||
|
||||
func TestFederationDualPanelRemoteDiagnosisContract(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user