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

feat: New endpoint for listing rooms & discussions from teams #33177

Merged
merged 29 commits into from
Sep 17, 2024

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented Aug 28, 2024

Proposed changes (including videos or screenshots)

  • New endpoint teams.listChildren
  • Endpoint accepts teamId & filter + pagination
  • Endpoint returns a mesh of team public rooms, rooms the user is part of (public/private) + the discussions from the team's main room.
  • Tests

Issue(s)

https://rocketchat.atlassian.net/browse/SIDE-145

Steps to test or reproduce

Further comments

Perf metrics!
Team with 5 rooms, 1 discussion, no filter

❯ k6 run script.js

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io
     ✓ status was 200

     checks.........................: 100.00% ✓ 3379       ✗ 0
     data_received..................: 18 MB   581 kB/s
     data_sent......................: 801 kB  27 kB/s
     http_req_blocked...............: avg=6.12µs   min=1.3µs   med=3µs     max=1.15ms   p(90)=4.59µs   p(95)=5.3µs
     http_req_connecting............: avg=2.41µs   min=0s      med=0s      max=1.07ms   p(90)=0s       p(95)=0s
     http_req_duration..............: avg=88.66ms  min=30.6ms  med=66.29ms max=1.91s    p(90)=103.47ms p(95)=136.69ms
       { expected_response:true }...: avg=88.66ms  min=30.6ms  med=66.29ms max=1.91s    p(90)=103.47ms p(95)=136.69ms
     http_req_failed................: 0.00%   ✓ 0          ✗ 3379
     http_req_receiving.............: avg=836.91µs min=27.7µs  med=122.5µs max=60.77ms  p(90)=205.44µs p(95)=312.05µs
     http_req_sending...............: avg=25.75µs  min=6.7µs   med=16.1µs  max=575.41µs p(90)=52.1µs   p(95)=58.5µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s       p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=87.79ms  min=30.39ms med=65.84ms max=1.91s    p(90)=97.67ms  p(95)=134.28ms
     http_reqs......................: 3379    112.496802/s
     iteration_duration.............: avg=88.82ms  min=30.83ms med=66.46ms max=1.91s    p(90)=103.66ms p(95)=136.92ms
     iterations.....................: 3379    112.496802/s
     vus............................: 10      min=10       max=10
     vus_max........................: 10      min=10       max=10


running (0m30.0s), 00/10 VUs, 3379 complete and 0 interrupted iterations
default ✓ [======================================] 10 VUs  30s

Team with 5 rooms, 1 discussion, filter "t"

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

     execution: local
        script: script.js
        output: -

     scenarios: (100.00%) 1 scenario, 10 max VUs, 1m0s max duration (incl. graceful stop):
              * default: 10 looping VUs for 30s (gracefulStop: 30s)


     ✓ status was 200

     checks.........................: 100.00% ✓ 3677       ✗ 0
     data_received..................: 15 MB   483 kB/s
     data_sent......................: 905 kB  30 kB/s
     http_req_blocked...............: avg=5.37µs   min=1µs     med=3µs     max=919.72µs p(90)=4.59µs   p(95)=5.5µs
     http_req_connecting............: avg=1.41µs   min=0s      med=0s      max=712.42µs p(90)=0s       p(95)=0s
     http_req_duration..............: avg=81.51ms  min=31.96ms med=64.53ms max=835.32ms p(90)=97.84ms  p(95)=134.76ms
       { expected_response:true }...: avg=81.51ms  min=31.96ms med=64.53ms max=835.32ms p(90)=97.84ms  p(95)=134.76ms
     http_req_failed................: 0.00%   ✓ 0          ✗ 3677
     http_req_receiving.............: avg=254.56µs min=18µs    med=108.2µs max=60.28ms  p(90)=168.38µs p(95)=203.26µs
     http_req_sending...............: avg=23.39µs  min=6.3µs   med=15.1µs  max=1.12ms   p(90)=49.1µs   p(95)=54.42µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s       p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=81.23ms  min=31.86ms med=64.28ms max=835.2ms  p(90)=96.65ms  p(95)=134.51ms
     http_reqs......................: 3677    122.335694/s
     iteration_duration.............: avg=81.66ms  min=32.09ms med=64.68ms max=835.56ms p(90)=98.02ms  p(95)=134.94ms
     iterations.....................: 3677    122.335694/s
     vus............................: 10      min=10       max=10
     vus_max........................: 10      min=10       max=10


running (0m30.1s), 00/10 VUs, 3677 complete and 0 interrupted iterations
default ✓ [======================================] 10 VUs  30s

Copy link
Contributor

dionisio-bot bot commented Aug 28, 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 Aug 28, 2024

🦋 Changeset detected

Latest commit: fdfd5ca

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

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-services Minor
@rocket.chat/model-typings Minor
@rocket.chat/rest-typings Minor
@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/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/apps Patch
@rocket.chat/models Patch
@rocket.chat/api-client Patch
@rocket.chat/ddp-client Patch
@rocket.chat/ui-contexts Major
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/livechat Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/web-ui-registration Major
@rocket.chat/core-typings Minor
@rocket.chat/license Patch
@rocket.chat/pdf-worker 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

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.70%. Comparing base (636d32d) to head (fdfd5ca).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #33177   +/-   ##
========================================
  Coverage    59.70%   59.70%           
========================================
  Files         2551     2551           
  Lines        62792    62792           
  Branches     14102    14102           
========================================
  Hits         37492    37492           
  Misses       22893    22893           
  Partials      2407     2407           
Flag Coverage Δ
unit 76.91% <ø> (ø)

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

@KevLehman KevLehman added this to the 6.13 milestone Aug 28, 2024
@KevLehman KevLehman marked this pull request as ready for review August 28, 2024 23:48
@KevLehman KevLehman requested review from a team as code owners August 28, 2024 23:48
ricardogarim
ricardogarim previously approved these changes Aug 29, 2024
ricardogarim
ricardogarim previously approved these changes Sep 2, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA tested labels Sep 2, 2024
ricardogarim
ricardogarim previously approved these changes Sep 2, 2024
@ggazzo
Copy link
Member

ggazzo commented Sep 6, 2024

@KevLehman @MarcosSpessatto I just rebased against develop

@KevLehman
Copy link
Contributor Author

Thanks @ggazzo !

@MarcosSpessatto @sampaiodiego :whip:

@KevLehman
Copy link
Contributor Author

@sampaiodiego , wanna take a look again? 😬

Copy link
Contributor

github-actions bot commented Sep 16, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-09-17 16:39 UTC

@kodiakhq kodiakhq bot merged commit 3a161c4 into develop Sep 17, 2024
50 checks passed
@kodiakhq kodiakhq bot deleted the feat/teams-and-discs branch September 17, 2024 16:39
pierre-lehnen-rc added a commit that referenced this pull request Sep 26, 2024
* Bump 6.12.1

* fix: message parser being slow to process very long messages with too many symbols (#33254)

Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com>

* fix: Allow to use the token from `room.v` when requesting transcript instead of finding visitor (#33242)

Co-authored-by: Kevin Aleman <11577696+KevLehman@users.noreply.github.com>

* fix: Retention Policy cached settings not updated during upgrade procedure (#33265)

Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>

* fix: imported fixes (#33268)

Co-authored-by: Julio A. <52619625+julio-cfa@users.noreply.github.com>

* Release 6.12.1

[no ci]

* fix: Federation callback not awaiting model call (#33298)

* fix: correct parameter order in afterSaveMessage to restore outgoing webhooks and related features (#33295)

* feat: New endpoint for listing rooms & discussions from teams (#33177)

* chore: Update typings on callbacks to accept less than a full room object (#33305)

* fix: resolve avatar download issue on setUsername by refining service selection logic (#33193)

* feat: Allow managing association to business units on departments' creation and update (#32682)

* fix: Local avatars prioritized over external avatar provider and remove remnant references on client of `Accounts_AvatarExternalProviderUrl` (#33296)

Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>

* fix: Mark as unread not working (#32939)

Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>

* refactor: Remove old `setreaction` callbacks and use new after/before callbacks (#33309)

* fix: `LivechatSessionTaken` webhook event called without `agent` param (#33209)

* fix: error on sendmessage stub (#33317)

* feat: contextualbar based on chat size (#33321)

* feat: `RoomSidepanel` (#33225)

Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com>

* ci: auto candidate releases (#33325)

Co-authored-by: Diego Sampaio <chinello@gmail.com>

* refactor: Reactions set/unset (#32994)

* feat: E2EE messages mentions (#32510)

* fix: markdown inconsistency with bold and italics (#33157)

* fix: conference calls are shown as "not answered" after they end (#33179)

* Release 6.13.0-rc.0

* chore: update E2EE setting text (#33226)

* feat: Implement proper accessbility for report user modal (#33294)

Co-authored-by: Tasso Evangelista <2263066+tassoevan@users.noreply.github.com>

* fix: imported fixes (#33330)

* chore: create network broker package (#33338)

* feat: Adds new admin feature preview setting management (#33212)

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>

* chore: move common files to core-services (#33341)

* regression: `Sidepanel` color highlight (#33342)

* feat: Adds new admin feature preview setting management (#33212)

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>

* fix: Avoid destructuring `connectionData` when value is undefined (#33339)

* Release 6.13.0-rc.1

[no ci]

* chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356)

* Bump rocket.chat to 6.14.0-develop (#33366)

* ci: use node20 for release action (#33343)

---------

Co-authored-by: rocketchat-github-ci <buildmaster@rocket.chat>
Co-authored-by: dionisio-bot[bot] <117394943+dionisio-bot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com>
Co-authored-by: Kevin Aleman <11577696+KevLehman@users.noreply.github.com>
Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>
Co-authored-by: Julio A. <52619625+julio-cfa@users.noreply.github.com>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
Co-authored-by: Ricardo Garim <rswarovsky@gmail.com>
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
Co-authored-by: Martin Schoeler <martin.schoeler@rocket.chat>
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
Co-authored-by: Júlia Jaeger Foresti <60678893+juliajforesti@users.noreply.github.com>
Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com>
Co-authored-by: Diego Sampaio <chinello@gmail.com>
Co-authored-by: Hugo Costa <hugocarreiracosta@gmail.com>
Co-authored-by: csuadev <72958726+csuadev@users.noreply.github.com>
Co-authored-by: Henrique Guimarães Ribeiro <43561537+rique223@users.noreply.github.com>
Co-authored-by: Tasso Evangelista <2263066+tassoevan@users.noreply.github.com>
Co-authored-by: Lucas Pelegrino <lucas.pelegrino@icloud.com>
Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
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.

7 participants