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: Omnichannel queue starting multiple times due to race condition #34062

Merged
merged 15 commits into from
Dec 6, 2024

Conversation

aleksandernsilva
Copy link
Contributor

@aleksandernsilva aleksandernsilva commented Nov 26, 2024

Proposed changes (including videos or screenshots)

This PR fixes a bug causing the Omnichannel queue to start more than once due to a race condition. In order to prevent the race condition settings.watch was changed to settings.watchMultiple which has a debounce built in.

Bug caught through this test omnichannel-livechat-queue-management-autoselection.spec.ts

Introduced here: #33719

Issue(s)

Steps to test or reproduce

Further comments

CONN-429

Copy link
Contributor

dionisio-bot bot commented Nov 26, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Nov 26, 2024

🦋 Changeset detected

Latest commit: 5be0a84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

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

@aleksandernsilva aleksandernsilva changed the title fix: Omnichannel queue being started multiple times due to race condition fix: Omnichannel queue starting multiple times due to race condition Nov 26, 2024
@aleksandernsilva aleksandernsilva force-pushed the fix/omni-queue-race-condition branch from 3dd2987 to 4f035bc Compare November 26, 2024 16:41
Copy link
Contributor

github-actions bot commented Nov 26, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34062/
on branch gh-pages at 2024-11-29 21:36 UTC

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 90.56604% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.79%. Comparing base (18cea50) to head (5be0a84).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #34062      +/-   ##
===========================================
+ Coverage    75.75%   75.79%   +0.03%     
===========================================
  Files          510      511       +1     
  Lines        22078    22130      +52     
  Branches      5387     5394       +7     
===========================================
+ Hits         16726    16773      +47     
- Misses        4706     4709       +3     
- Partials       646      648       +2     
Flag Coverage Δ
unit 75.79% <90.56%> (+0.03%) ⬆️

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

@aleksandernsilva aleksandernsilva marked this pull request as ready for review November 26, 2024 20:14
@aleksandernsilva aleksandernsilva requested a review from a team as a code owner November 26, 2024 20:14
@aleksandernsilva aleksandernsilva added this to the 7.2.0 milestone Nov 26, 2024
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc left a comment

Choose a reason for hiding this comment

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

It will still be called multiple times as shouldStart is also called when the license is validated.

@aleksandernsilva aleksandernsilva force-pushed the fix/omni-queue-race-condition branch from 2e859f4 to b009711 Compare December 2, 2024 13:20
@aleksandernsilva aleksandernsilva marked this pull request as draft December 2, 2024 14:24
@aleksandernsilva aleksandernsilva marked this pull request as ready for review December 2, 2024 19:31
@aleksandernsilva aleksandernsilva added the stat: QA assured Means it has been tested and approved by a company insider label Dec 6, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 6, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Dec 6, 2024
@aleksandernsilva aleksandernsilva added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Dec 6, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 6, 2024
@kodiakhq kodiakhq bot merged commit 072a749 into develop Dec 6, 2024
49 checks passed
@kodiakhq kodiakhq bot deleted the fix/omni-queue-race-condition branch December 6, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants