FlowFuse / flowfuse

Connect, collect, transform, visualise, and interact with your Industrial Data in a single platform. Use FlowFuse to manage, scale and secure your Node-RED solutions.
https://flowfuse.com
Other
285 stars 64 forks source link

Do not add api-error:version_mismatch to audit log #4740

Closed knolleary closed 2 weeks ago

knolleary commented 2 weeks ago

Closes #4738

Description

The api-error:version_mismatch audit event from Node-RED occurs when a user tries to deploy changes but they don't have the latest flows loaded - it is part of the normal sequence that allows the editor to prompt the user to merge remote changes first and retry.

Node-RED emits it within its own audit log which we capture and put in the Instance audit log. However there is no real value in logging it - it displays as an error in the log but is not actionable. There is very little value knowing it happened as its a normal part of the deploy lifecycle.

This PR filters these events so they do not end up in the instance audit log.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.77%. Comparing base (77865ff) to head (ed0850c). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
forge/routes/logging/index.js 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4740 +/- ## ========================================== - Coverage 78.78% 78.77% -0.01% ========================================== Files 311 311 Lines 14748 14750 +2 Branches 3372 3373 +1 ========================================== + Hits 11619 11620 +1 - Misses 3129 3130 +1 ``` | [Flag](https://app.codecov.io/gh/FlowFuse/flowfuse/pull/4740/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FlowFuse) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/FlowFuse/flowfuse/pull/4740/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FlowFuse) | `78.77% <50.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FlowFuse#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.