Skip to content

Conversation

hardillb
Copy link
Contributor

fixes #6126

Description

Has the settings component publish a MQTT message to signal to other forge app instances that a setting has changed.

Also sets up a topic subscription to receive these messages and reloads the value from the database.

Uses topic ff/v1/platform/sync and the commsClient uuid as the unique identifier.

Related Issue(s)

#6126

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@hardillb hardillb added this to the 2.23 milestone Oct 10, 2025
@hardillb hardillb self-assigned this Oct 10, 2025
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 35.71429% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.82%. Comparing base (6bec3e2) to head (5a8515f).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
forge/comms/commsClient.js 0.00% 5 Missing ⚠️
forge/settings/index.js 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6128      +/-   ##
==========================================
- Coverage   76.85%   76.82%   -0.03%     
==========================================
  Files         381      381              
  Lines       19272    19286      +14     
  Branches     4641     4645       +4     
==========================================
+ Hits        14812    14817       +5     
- Misses       4460     4469       +9     
Flag Coverage Δ
backend 76.82% <35.71%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hardillb hardillb requested a review from knolleary October 10, 2025 12:43
@hardillb hardillb marked this pull request as ready for review October 10, 2025 12:43
@knolleary knolleary merged commit 9bc8ebc into main Oct 16, 2025
28 of 30 checks passed
@knolleary knolleary deleted the sync-settings branch October 16, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Make app.settings use MQTT to notify about changes

2 participants