Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Comments

New "essentials" mechanism#269

Merged
d-gubert merged 4 commits intonew-room-eventsfrom
essential-event-registration
May 17, 2020
Merged

New "essentials" mechanism#269
d-gubert merged 4 commits intonew-room-eventsfrom
essential-event-registration

Conversation

@d-gubert
Copy link
Member

@d-gubert d-gubert commented May 12, 2020

What? ⛵

This is a mechanism that allows an app to register itself as "essential" to an event in the Rocket.Chat lifecycle.

If an app that is "essential" is disabled during the execution of such event, an error is thrown.

Why? 🤔

Currently, we have a problem regarding the state management of apps in HA setups. Each instance in the cluster has to manage the apps that are enabled/disabled, and should communicate any changes to the other instances when they happen, but this has shown to be unreliable in times when there is high usage.

This mechanism presents a way of "shielding" workspaces that require custom rules for critical events (message sending, room creating, etc.) to take place from this unpredictable problems.

Links 🌎

RocketChat/Rocket.Chat#17656

PS 👀

@d-gubert d-gubert requested a review from rodrigok May 12, 2020 20:54
@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #269 into new-room-events will decrease coverage by 0.91%.
The diff coverage is 17.39%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           new-room-events     #269      +/-   ##
===================================================
- Coverage            54.57%   53.66%   -0.92%     
===================================================
  Files                   82       82              
  Lines                 2904     2909       +5     
  Branches               415      421       +6     
===================================================
- Hits                  1585     1561      -24     
- Misses                1319     1348      +29     
Impacted Files Coverage Δ
src/server/AppManager.ts 14.39% <0.00%> (-0.18%) ⬇️
src/server/ProxiedApp.ts 14.11% <0.00%> (-0.35%) ⬇️
src/server/managers/AppListenerManager.ts 7.67% <30.30%> (+0.29%) ⬆️
src/server/compiler/AppImplements.ts 100.00% <100.00%> (ø)
src/server/compiler/index.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bcdd3b0...e05db9c. Read the comment docs.

@d-gubert d-gubert marked this pull request as ready for review May 15, 2020 21:33
@d-gubert d-gubert merged commit e654965 into new-room-events May 17, 2020
@rodrigok rodrigok deleted the essential-event-registration branch May 18, 2020 12:05
d-gubert added a commit that referenced this pull request May 19, 2020
* Fix security problem

* Add IPreRoomUserJoined event

* Add the IPostRoomUserJoined event

* New "essentials" mechanism (#269)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants