Skip to content

refactor: users out of db watcher#32567

Merged
ggazzo merged 17 commits intodevelopfrom
refactor-users-out-of-db-watcher
Jun 21, 2024
Merged

refactor: users out of db watcher#32567
ggazzo merged 17 commits intodevelopfrom
refactor-users-out-of-db-watcher

Conversation

@sampaiodiego
Copy link
Copy Markdown
Member

@sampaiodiego sampaiodiego commented Jun 6, 2024

Proposed changes (including videos or screenshots)

Stop relying on MongoDB's Change Stream to notify clients of user changes.. All places that were updating a user record we're now manually sending the diff of the changes to the clients.

Here's a list of use cases covered by these changes:

  • Login token updates:

    • reset totp
    • enabling totp
    • enabling email 2fa
    • logout current sessions
    • logging out other clients
    • crowd log in
  • omnichannel use cases:

    • set and unset void extensions
    • livechat status through:
      • business hours
      • LivechatTyped.setUserStatusLivechat
      • user logout
      • new agent
      • removed agent
  • apps engine use cases

    • user creation
    • user update
  • user updates:

    • updates from REST API
    • activate and deactivate
    • username change
    • new and updated banners
    • banners read
    • language change
    • user preferences
    • sidebar preferences
    • status changes
      • irc quit and connect
    • name update via crowd
    • oauth login updates
    • data import
    • irc nick change
  • user removal

Issue(s)

SCA-6

Steps to test or reproduce

Further comments

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Jun 6, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 6, 2024

⚠️ No Changeset found

Latest commit: 811543b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 8.77193% with 52 lines in your changes missing coverage. Please review.

Project coverage is 56.56%. Comparing base (e47ae76) to head (811543b).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32567      +/-   ##
===========================================
- Coverage    56.62%   56.56%   -0.06%     
===========================================
  Files         2486     2490       +4     
  Lines        54921    55024     +103     
  Branches     11364    11384      +20     
===========================================
+ Hits         31097    31127      +30     
- Misses       21151    21214      +63     
- Partials      2673     2683      +10     
Flag Coverage Δ
e2e 56.25% <ø> (+0.06%) ⬆️
unit 71.70% <8.77%> (-0.47%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@sampaiodiego sampaiodiego force-pushed the refactor-users-out-of-db-watcher branch 5 times, most recently from c60e34a to f6aa938 Compare June 14, 2024 16:02
@sampaiodiego sampaiodiego force-pushed the refactor-users-out-of-db-watcher branch 2 times, most recently from 9f47a27 to 4e9f04a Compare June 17, 2024 20:42
@sampaiodiego sampaiodiego modified the milestone: 6.10 Jun 17, 2024
@sampaiodiego sampaiodiego marked this pull request as ready for review June 17, 2024 20:49
@sampaiodiego sampaiodiego requested review from a team as code owners June 17, 2024 20:49
@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Jun 18, 2024

image

ricardogarim
ricardogarim previously approved these changes Jun 18, 2024
ggazzo
ggazzo previously approved these changes Jun 21, 2024
@ggazzo ggazzo dismissed stale reviews from ricardogarim and themself via 811543b June 21, 2024 03:18
@ggazzo ggazzo force-pushed the refactor-users-out-of-db-watcher branch from 411d7b4 to 811543b Compare June 21, 2024 03:18
@ggazzo ggazzo merged commit 9e8370d into develop Jun 21, 2024
@ggazzo ggazzo deleted the refactor-users-out-of-db-watcher branch June 21, 2024 05:14
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