[7324] Replace HTTP polling of instance / device status with MQTT-over-WS#7573
[7324] Replace HTTP polling of instance / device status with MQTT-over-WS#7573n-lark wants to merge 15 commits into
Conversation
… the team channel, add Pinia store, connect for Instances list only
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7573 +/- ##
==========================================
+ Coverage 76.95% 77.06% +0.11%
==========================================
Files 411 411
Lines 21094 21170 +76
Branches 5141 5161 +20
==========================================
+ Hits 16233 16315 +82
+ Misses 4861 4855 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…n't intermix and broadcast a stale instance status
…vices, fixing the cache test to use a real project id
…tches the /state topics
| // - ff/v1/<team>/p/<instance>/state | ||
| { topic: /^ff\/v1\/[^/]+\/p\/[^/]+\/state$/ }, | ||
| // - ff/v1/<team>/d/<device>/state | ||
| { topic: /^ff\/v1\/[^/]+\/d\/[^/]+\/state$/ }, |
There was a problem hiding this comment.
So devices already publish their raw status to the …/status topics, which forge subscribes to in order to collect it.
If forge re-published the browser-facing copy onto that same …/status topic, it would receive its own message back and loop forever, so the browser updates use a separate …/state topic that nothing on the backend listens to.
Also named instances .../state for consistency. I was also considering .../liveStatus to imply FE, not sold on the name.
There was a problem hiding this comment.
differentiating the topics to avoid loopbacks sounds sensible, the state name for consistency too
There was a problem hiding this comment.
I also like the liveStatus approach but in the live-state form to adhere to the ui naming and topic format, up to you if you want to change it
…fter suspend/stop under live MQTT status
…ansition checks into one typed helper
…shing, and only mask a real stop on device restarts
Description
See test plan: #7324 (comment)
See details: #7324 (comment)
Related Issue(s)
Resolves #7324
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel