Skip to content

Fixed post-session cleanup logic#641

Merged
tieneupin merged 14 commits intomainfrom
fix-visit-complete
Jul 23, 2025
Merged

Fixed post-session cleanup logic#641
tieneupin merged 14 commits intomainfrom
fix-visit-complete

Conversation

@tieneupin
Copy link
Contributor

@tieneupin tieneupin commented Jul 21, 2025

The previous attempt at fixing the session clean-up logic worked partially, but the threads associated with the session did not close properly as they ended up monitoring themselves and each other to see if they are closed.

This PR fixes that by having the multigrid controller thread be responsible for the creation and collection of the clean-up threads on the client side, before then submitting the request to clear the database of that particular session, and finally submitting a web socket message to notify the frontend (if present) of the change in state.

Additionally, this PR also adds more keys to the web socket messages sent by the client side, which can be used by the frontend to reload data from the backend as needed. It also adds conditionals to the endpoint functions that get information about the processes running on the client such that they error quietly if a component associated with that session ID doesn't exist on the client side. Furthermore, it also adjusts the logging setup for the client instrument server such that debug logs are sent to the logging dashboard, but won't be displayed on the console.

…of dormant controllers and split the dormant controller parsing and deletion into separate for loops
…iated threads

* Removed the dormancy check callback from the Analyser and DirWatcher when they are started up by the MultigridController
* The dormancy check is now done by the MultigridController as part of a while loop once it is ordered to finalise things
* Instrument server logs to console at the INFO level
* Instrument server logs Murfey-related events to Graylog at the DEBUG level, but logs at the INFO level for other packages
@tieneupin tieneupin requested a review from d-j-hatton July 21, 2025 12:33
@tieneupin tieneupin self-assigned this Jul 21, 2025
@tieneupin tieneupin added the bug Something isn't working label Jul 21, 2025
@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 23.86364% with 67 lines in your changes missing coverage. Please review.

Project coverage is 33.24%. Comparing base (432c50b) to head (966c404).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #641      +/-   ##
==========================================
- Coverage   33.29%   33.24%   -0.06%     
==========================================
  Files          90       90              
  Lines       11132    11185      +53     
  Branches     1463     1470       +7     
==========================================
+ Hits         3706     3718      +12     
- Misses       7299     7339      +40     
- Partials      127      128       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

… return a dictionary with useful properties regarding the status of the multigrid controller
…ly to be useful for now; ignore RuntimeError when trying to start a MultigridWatcher, as this can trigger when the backend server is rebooted and the client is running
@tieneupin tieneupin merged commit e4eaaf0 into main Jul 23, 2025
17 checks passed
@tieneupin tieneupin deleted the fix-visit-complete branch July 23, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants