Skip to content

feat: [2267] Dashboard data store - Report store write failures - #2268

Open
n-lark wants to merge 2 commits into
2238-data-store-add-chartsfrom
2239-data-store-presentation-add-errors
Open

n-lark wants to merge 2 commits into
2238-data-store-add-chartsfrom
2239-data-store-presentation-add-errors

Conversation

@n-lark

@n-lark n-lark commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Description

First layer of #2239. Before the store starts driving the dashboard, failures in it need to be visible: today every store write swallows its errors, so a store that stops accepting writes fails silently.

  • Failed store writes and clears now warn on the widget that hit them, once per deploy, so the debug sidebar shows what broke without a warning per message.
  • Warnings name the real cause instead of an internal error.
  • A context store that saves copies no longer reports "replaced by a flow" on every write. That warning now only fires when the store really was replaced.

Test plan

  • Break the global context mid-run: one warning on the widget, the dashboard keeps updating
  • Redeploy, break it again: one new warning
  • Remove a widget while the context is broken: one "clearing a store entry failed" warning
  • A flow replacing global.dashboardStore still warns once
  • A context store that saves copies gives one write warning, not a "replaced by a flow" warning per write

Related Issue(s)

Resolves #2267

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

@n-lark n-lark self-assigned this Oct 1, 2026
@n-lark
n-lark added this pull request to stack #2258 October 1, 2026 13:47
@n-lark n-lark changed the title [2267] Dashboard data store - add error handling [2267] Dashboard data store - Report store write failures Oct 1, 2026
Comment thread nodes/store/data.js
let storeEnabled = false
const trimCounts = {}
const TRIM_BATCH = 60
let warned = false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo warnOnce only warns on the first failure. After that, every store failure, from any widget, is silent until the next full deploy or restart. Could extend it to warn per type of failure, or every N failures. Lmk if we want that, can always iterate down the line.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine as is

@n-lark n-lark mentioned this pull request Oct 1, 2026
3 of 14 tasks
@ppawlowski ppawlowski changed the title [2267] Dashboard data store - Report store write failures feat: [2267] Dashboard data store - Report store write failures Oct 5, 2026

@cstns cstns left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with a store that returns copies mid run, one clear warning instead of one per write and the dashboard keeps updating.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard data store - Report store write failures

2 participants