Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix device log race condition between publish and disconnect #4903

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

cstns
Copy link
Contributor

@cstns cstns commented Dec 11, 2024

Description

Fix device log race condition between publish and disconnect

Related Issue(s)

missed out of #4893

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

Labels

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

@cstns cstns self-assigned this Dec 11, 2024
@cstns cstns requested a review from hardillb December 11, 2024 14:32
@hardillb hardillb merged commit 0445a24 into main Dec 11, 2024
16 checks passed
@hardillb hardillb deleted the fix-device-logs-race-condition branch December 11, 2024 14:43
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.70%. Comparing base (a7ebfe3) to head (dc693bd).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4903   +/-   ##
=======================================
  Coverage   78.70%   78.70%           
=======================================
  Files         323      323           
  Lines       15230    15230           
  Branches     3498     3498           
=======================================
  Hits        11987    11987           
  Misses       3243     3243           
Flag Coverage Δ
backend 78.70% <ø> (ø)

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.

@knolleary
Copy link
Member

This PR has broken the logs when you have more than one user access them. By triggering an unsubscribe when leaving the page, it stops log delivery to other users viewing the device. When you open the device log view it triggers the buffer to be resent and is received by all users viewing the log.

This needs to be reverted.

@knolleary
Copy link
Member

Sorry - comment above added to the wrong PR ....

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.

3 participants