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

[MM-53167] Persist participants list #486

Merged
merged 2 commits into from
Aug 7, 2023
Merged

[MM-53167] Persist participants list #486

merged 2 commits into from
Aug 7, 2023

Conversation

streamer45
Copy link
Collaborator

Summary

We were already caching some stats for telemetry purposes so extending on those to keep track of all participants which we persist the usual way through post props.

Ticket Link

https://mattermost.atlassian.net/browse/MM-53167

@streamer45 streamer45 added the 2: Dev Review Requires review by a core committer label Aug 4, 2023
@streamer45 streamer45 added this to the v0.19.0 - MM 9.0 milestone Aug 4, 2023
@streamer45 streamer45 requested a review from cpoile August 4, 2023 18:06
@streamer45 streamer45 self-assigned this Aug 4, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.02% ⚠️

Comparison is base (4aa8d37) 5.39% compared to head (ed1faf3) 5.38%.

Additional details and impacted files
@@             Coverage Diff             @@
##           MM-53162    #486      +/-   ##
===========================================
- Coverage      5.39%   5.38%   -0.02%     
===========================================
  Files            23      23              
  Lines          4297    4308      +11     
===========================================
  Hits            232     232              
- Misses         4047    4058      +11     
  Partials         18      18              
Files Changed Coverage Δ
server/channel_state.go 41.75% <0.00%> (ø)
server/plugin.go 0.00% <0.00%> (ø)
server/session.go 0.00% <0.00%> (ø)
server/utils.go 32.91% <0.00%> (-2.71%) ⬇️

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

@streamer45
Copy link
Collaborator Author

/cc @crspeller in case you had more requirements in mind than a simple list of user ids who joined the call.

@crspeller
Copy link
Member

@streamer45 Just to make sure, this would be a list of user ids of anyone who ever joined the call right?

@streamer45
Copy link
Collaborator Author

@streamer45 Just to make sure, this would be a list of user ids of anyone who ever joined the call right?

Yes the list is built incrementally so that it tracks all users who ever joined the call (except the bot), regardless of whether they have left before the end of the call.

Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

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

If we kept the timestamp of when they joined (instead of the empty struct), would that be useful?

@streamer45
Copy link
Collaborator Author

If we kept the timestamp of when they joined (instead of the empty struct), would that be useful?

We could, however it would be either the first or last join time unless we make it an array which becomes even more complex. I don't think we need that information for anything just yet. We can always augment later if necessary, props are pretty flexible.

@streamer45 streamer45 added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Aug 5, 2023
@streamer45 streamer45 merged commit 5c8769b into MM-53162 Aug 7, 2023
@streamer45 streamer45 deleted the MM-53167 branch August 7, 2023 15:36
streamer45 added a commit that referenced this pull request Aug 28, 2023
… state operations (#460)

* Refactor cluster mutex

* Call locking utils

* Add/remove session

* Mute/Unmute,RaiseHand/LowerHand,ScreenSharing

* Call start post

* Call end

* Enable/disable calls

* Recording API

* Remove unused functions

* Mutex metrics

* Lint fixes

* Update .golangci.yml

* Writer DB

* Simplify call lock use

* Simplify call start case

* Fix KVGet semantic in case of no results

* Small tweaks

* Make Unlock() actually safe

* Simplify recording API handlers

* Move code around

* Prevent logging errors on duplicate session removals attempts

* Enforce maxPollInterval

* Add note to cleanCallState function

* Use channelID instead of callID

* Update new code

* [MM-53167] Persist participants list (#486)

* Persist list of participants on call end

* Exclude bot from participants list

* Fix potential nil access upon starting a recording (#495)

* fix linter errors

* Bump golangci-lint version

* Force input

* Revert "Force input"

This reverts commit 0b22839.

---------

Co-authored-by: Christopher Poile <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants