-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Use standard CSS rules to resize emoticons #29276
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
Conversation
|
Not triggering E2E tests: this PR has 8 commit status(es) or check-runs that are not passing. Ensure all statuses aside from the E2E testing ones are green, before triggering E2E tests. |
|
@hanzei I'm removing myself from reviewing this. Not sure if I see a difference in the changes. |
@rahimrahman You can find the reproduction steps in the linked issue. Then the difference should become apparent. |
I understand, it looks good to me based on screenshots. But I have no real understanding of why |
I see, thanks for the reference. I wasn't aware that the original issue was on macOS. Unfortunately I'm on Linux, so I cannot check if this change is causing a regression in terms of "blurriness" on macOS. |
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
|
@Willyfrog @hmhealey can you all help review this or assign somebody? I was the only reviewers assigned by @mattermost/core-reviewers and I'm 0/5 on the use of zoom vs scale which may cause regression (see this jira ticket) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lorumic Maybe we can do both here? Do you mind testing on both?
| transform: scale(0.5); | |
| zoom: 0.5; /* fixes blurry images on Chrome? */ | |
| transform: scale(0.5); /* fixes small images on Firefox? */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that if you do both, both get applied on FF 133, resulting in the issue that was reported: 0.5 from zoom and 0.5 from transform: scale results in a final 0.25 size.
I think the takeaway here is that the usage of zoom should not be mixed with that of transform: scale. You could use zoom only, but that would probably affect your browser compatibility: scale vs zoom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thank you. I acknowledge that my knowledge of css is subpar, thus I'm seeking others to help. I'm just throwing a few ideas.
Perhaps we can use @supports? Again, this may not work as I don't spend much time on web css (I'm more of a mobile engineer here at MM).
.zoomable {
zoom: 0.5; /* Default for browsers supporting zoom */
}
@supports (transform: scale(1)) {
.zoomable {
zoom: unset; /* Reset zoom for modern browsers */
transform: scale(0.5); /* Use scale instead */
transform-origin: 0 0; /* Anchor scaling */
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea, but it should be the other way around, as zoom is the less-supported property. :)
I have just updated the code to use zoom whenever supported (which means "always" in Chrome, where the blurriness problem originally occurred, because Chrome supports it since version 1), and fall back to transform: scale when unsupported (e.g. FF versions before 126).
Can you maybe have another look @rahimrahman?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart, totally see your reasoning of reversing. Of course, my example would have cause blurriness on Chrome and totally not fixing the problem. 😏
Do you have a screenshot of Chrome which shows no blurriness and another on Firefox that shows the icon is the correct size? Visual representation helps a lot, especially for other reviewers.
Thanks for working to solve this even at small scale (pun intended!). I appreciate helping me understand the diff between zoom and scale. Something I have not encountered before (again as a mobile dev, I don't spend a lot of time here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just re-read that you're on Linux. Let me check on mine, or we can get one of our QAs to verify.
cbc4678 to
4716fbd
Compare
|
@lorumic thanks for the discussion and your contribution. It was nice working with you. I learned a ton. If you want to explore the mobile side of things, hit me up in Community. @BenCookie95 I will merge, but I don't know if there's anything special I have to do here to get to v10.4 (which I believe 12/2 was the code freeze). @lindy65 is there anything we need to do to kill the test server? |
|
Test server destroyed |
1 similar comment
|
Test server destroyed |
Hey @rahimrahman - removing the test server label will destroy the server but it's also destroyed on merge |
|
Hey, Obviously not a massive bug, I'm just curious why a already merged PR from over a month ago takes so long to reach the customer. |
Hey @felixb-denic - this fix is scheduled to be released today in v10.4 |
Good to know, thanks. |
It's not currently scheduled to be back-ported but our release manager, @amyblais will be able to help with this |
|
Backporting would be nice, especially considering how trivial the fix it (for self-builds it's a simple cherry pick to backport it yourself, but I guess the typical Enterprise user of ESR can't do that) |
|
Sounds good, we can take a look at backporting to v9.11. |
|
/cherry-pick release-9.11 |
|
Cherry pick is scheduled. |
|
Thanks @amyblais :) Can confirm it's part of 9.11.8 |
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 5.6% (329 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Polish)
Currently translated at 100.0% (2509 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 5.7% (332 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 5.7% (334 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (2509 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/en_AU/
* Translated using Weblate (Dutch)
Currently translated at 100.0% (2509 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/en_AU/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.0% (349 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (2507 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.0% (350 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 0.9% (24 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nb_NO/
* Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/
* [MM-58516] Migrate tooltips of "components/search/user_guide_dropdown/user_guide_dropdown.tsx" to WithTooltip (#27248)
* [MM-58512] Migrate tooltips of "components/status_dropdown/status_dropdown.tsx" to WithTooltip (#27246)
* [MM-59059] Re enable markdown preview for channel header in user advanced settings (#27440)
* MM-58255 Ensure remote users do not get valid email addresses (#27421)
* remote users don't get valid email addresses; remote users cannot have access tokens
* block notification emails for remote users
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58802 Fix overlapping back button (#27394)
* fix overlapping back button
* css tweak
* use classNames utility
* fixed import order
* CLD-5704 Migrate daily master/cloud tests (#27393)
* [skip ci] Support Cloud/daily tests and Zephyr integration
* [skip ci] Fix workflow file
* [skip ci] Fix typo in workflow input name
* Fix cloud variable passing
* [skip ci] Fix typo
* Utilize master branch image for daily tests
* Apply Saturn's suggestion, fixes and improvements
* update for adding multiple members (#25128)
* update for adding multiple members
* fix unit test
* more test fixes
* add another unit test
* fix object passed by client4
* revert package-lock.json
* revert package-lock.json
* add length check
* limit size of lists in API requests
* revert package-lock
* add batching to front end
* add batching to front end
* fix bad merge
* update return type
* remove unnecessary permisssion check, add unit test
* fixes and add tests from review
* revert changes adding limits to other apis
* fixes
* clean-up from code review
* fix unit test call
* revert back to interface{}, fix unit test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58777 Confirm that sendBeacon exists before trying to use it (#27458)
* migrate tooltips of file_preview_modal_main_actions.tsx to WithTooltip (#27243)
* Change: Use WithTooltip instead of OverlayTrigger on filename_overlay (#27439)
* MM-58411 Migrate tooltips of 'components/actions_menu/actions_menu' to WithTooltip (#27238)
* Added console log for draft PR
* Replaced tooltip component with changes
* Updated snapshot for tests
* Updated title to use FormattedMessage
* Remove defineMessages
* Fix style
* Removed unused tooltip
---------
Co-authored-by: ezekiel <ezekiel@itsmart.my>
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-58408] Migrate tooltips of 'components/file_preview_modal/file_preview_modal_main_nav/file_preview_modal_main_nav' to WithTooltip (#27422)
* Change PerformanceReporter tests to not check exact values for timestamps (#27459)
* [MM-58409] Migrate tooltips of 'components/file_preview_modal/popover_bar/popover_bar' to WithTooltip (#27447)
* MM-58755 - Fixing inproduct notices spacing (#27442)
* MM-58755 - Fixing inproduct notices spacing
* Updating compass modal
* Updating test
* Bubble up parsing error from en.json (#27362)
Running `make i18n-extract` on a en.json file
with bad JSON will just wipe off all keys instead
of throwing the error. This is very confusing
and can lead to a lot of time wasted because
there's no indication that the JSON is incorrect.
Fixing this.
```release-note
NONE
```
* Sanitize RemoteEmail user prop (#27170)
* Sanitize RemoteEmail user prop
If the server is configured to hide user emails, the "RemoteEmail"
user property will be sanitized as well, effectively hiding the real
email of remote users.
* fix merge conflict
---------
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
* require regenerate invite id to have invite permission (#27427)
* [MM-59061] Remove redundant index route for Root.tsx (#27441)
* [MM-59047] Keyboard Shortcuts Modal Improvements (#27443)
* [MM-59064] Close Icon is not in line with toast text of "search this channel" when RHS threads panel is open (#27464)
* Add support packet metadata (#27465)
* removed offending line that hid threads view on mobile (#27428)
Automatic Merge
* chore(deps): pin whatwg-url to 12.0.0+ in /api (#27463)
to suppress warnings from whatwg-url 5.0.0 (through 11.0.0)
on `make build` or `make run` in /api.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Fix concurrency for daily tests (#27480)
* MM-59254 Fix EnableClientMetrics setting being hidden (#27483)
Automatic Merge
* MM-58854 Update how Compass icons are referenced by AnnouncementBar (#27461)
Automatic Merge
* MM-57375: Update to latest minio image (#27475)
* test with latest minio image
* Update the KMS key
- Also use latest config settings. The older ones were deprecated.
* MM-58496 - Updating channel font size (#27445)
* MM-58496 - Updating channel font size
* Updating lineheight
* MM-54416: Channel Bookmarks Web UI (#25889)
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
* [MM-58405] Migrate tooltips of 'components/announcement_bar/default_announcement_bar/announcement_bar' to WithTooltip (#27244)
* Migrate tooltips of 'components/announcement_bar/default_announcement_bar/announcement_bar' to WithTooltip
* Review fixes
* Review fix
* Fix imports
* Update snapshots
* Test fix
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-58509] Migrate tooltips of "components/admin_console/user_grid/user_grid_role_dropdown.tsx" to WithTooltip (#27242)
* chore: update package metadata for API reference (#27462)
* [MM-58840] Add routing restrictions (#27482)
* require Permission to user to mark channels as read (#27468)
* chore(api redoc): remove api/redoc-static.html (#27500)
The orphaned file unexpectedly introduced in the old PR in 2020
can now be removed as it originally is orphaned and not referenced
at all.
- mattermost/mattermost-api-reference PR 503
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Print panic message when mmctl panics (#27390)
* Update latest minor version to 9.11.0 (#27496)
Automatic Merge
* fix panic in migrations (#27494)
* [chore] migration of plugin-store (#27506)
Plugin store is gradually migrated from:
- https://plugins-store.test.mattermost.com
to
- https://plugins.releases.mattermost.com
We reflect that change here
Note: Currently both CDN's are working as expected, to facilitate the mgiration. Upon succesfull migration, https://plugins-store.test.mattermost.com will be decomissioned
* MM-56774: Delete file along with bookmark (#27495)
* [MM-58686] Adjust text alignment on custom status tooltip (#27353)
* Change: Adjust text alignment on custom status tooltip
Change: Update 'Today' expiry time calculation on custom_status_modal
* Change: Use display inline-block instead of flex for custom-status class
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Translations update from Mattermost Weblate (#27507)
* Translated using Weblate (German)
Currently translated at 100.0% (2510 of 2510 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/
* Translated using Weblate (German)
Currently translated at 100.0% (5775 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/
* Translated using Weblate (Polish)
Currently translated at 100.0% (2510 of 2510 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/
* Translated using Weblate (Polish)
Currently translated at 100.0% (5775 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/
* Translated using Weblate (Dutch)
Currently translated at 99.9% (5771 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/
* Translated using Weblate (Serbian)
Currently translated at 10.5% (611 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sr/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.3% (369 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (German)
Currently translated at 100.0% (5801 of 5801 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/
---------
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: homerCOD <anicin.goran@gmail.com>
Co-authored-by: Frank Paul Silye <frankps@uio.no>
* MM-58771 - Make manage_server permission, non updatable (#27481)
* make manage_server, non updatable
* remove blank line
* Update ISSUE_TEMPLATE.md (#27538)
Automatic Merge
* [MM-57942] Fix a panic on password is too long (#27449)
* return error from bcrypt, handle gracefully; remove dead code
* linting
* linting
* i18n
* fix test
* fill out translations
* Adds Remote Cluster related API endpoints (#27432)
* Adds Remote Cluster related API endpoints
New endpoints for the following routes are added:
- Get Remote Clusters at `GET /api/v4/remotecluster`
- Create Remote Cluster at `POST /api/v4/remotecluster`
- Accept Remote Cluster invite at `POST
/api/v4/remotecluster/accept_invite`
- Generate Remote Cluster invite at `POST
/api/v4/remotecluster/{remote_id}/generate_invite`
- Get Remote Cluster at `GET /api/v4/remotecluster/{remote_id}`
- Patch Remote Cluster at `PATCH /api/v4/remotecluster/{remote_id}`
- Delete Remote Cluster at `DELETE /api/v4/remotecluster/{remote_id}`
These endpoints are planned to be used from the system console, and
gated through the `manage_secure_connections` permission.
* Update server/channels/api4/remote_cluster_test.go
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
* Fix AppError names
---------
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Skips flaky test on the remote cluster API (#27547)
* Skips flaky test on the remote cluster API
* Adds ticket link to the `t.Skip`
* Revert "Added GetPluginID method and tests (#27281)" (#27540)
This reverts commit 4acc4796edb2c1ff93e861b4732c1c758ac76371.
* [MM-58443] Migrate tooltips of 'components/global_header/right_controls/saved_posts_button/saved_posts_button.tsx' to WithTooltip (#27185)
* add withtooltip handling
* add withtooltip handling
* placed icon inside tooltip
* Update saved_posts_button.tsx
* Update saved_posts_button.tsx
* Update saved_posts_button.test.tsx.snap
* Update saved_posts_button.tsx
---------
Co-authored-by: surajanthwal <surajanthwal2010@gmail.com>
Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update Packet metadata generation based on feedback (#27490)
* Add platform information for push notification metrics (#27460)
* Add platform information for push notification metrics
* Address feedback
* Add the client platform returned by the devices to the normalize function
* Add "no platform" platform label to distinguish from unknown
* Orders results of the GetAll remote clusters store method (#27548)
* MM-57824: Export/import custom status (#27361)
https://mattermost.atlassian.net/browse/MM-57824
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* chore: improvements to keycloak local development (#26518)
* update keycloak docker image
* update realm file with a compatible realm
* import realm on start-docker command
Since bitnami's image does not support importing directly, the import of the test realm is done in the make file start-docker action
* Use official image from quay
* updated realm keycloak config
* final note about nickname attrib for saml
* add admin user
* update realm
* Updated from master
* Updated docs
* local typo
* use jq for ldap and saml
* updated readme
* Correctly merge plugin configuration on mmctl config patch (#26647)
* Adds a step to the config patch command to merge plugin configurations
* Fix linter
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Translations update from Mattermost Weblate (#27586)
Automatic Merge
* [MM-58856] Migrate tooltips of "components/copy_button.tsx" to WithTooltip (#27433)
* [MM-58003] Allow setting AdvancedLoggingJSON via mmctl (#27388)
* [MM-57963] Log Name and DisplayName of groups (#26836)
* [MM-58004] Update logged fields of users (#26860)
* [MM-56339] Audit logs: on login add UserId and SessionId to audit's Actor field (#27446)
* on login add UserId and SessionId to audit's Actor field to match logout
* lint
* simplify to add only userId and sessionId
* AddToEventActor -> AddUser/SessionToEventActor
* fill in missing session data when logging the audit record
* why did it bump that? reverting.
* make modules-tidy
* trigger build
* add more context to the comment
* Bump prepackage Github plugin version to 2.3.0 (#27572)
* Don't modify global variables in TestNoticeValidation (#27591)
* Remove dup stylelint depdendencies in webapp/channels (#27499)
* add hover state to accordions and tweaks styles (#27577)
* MM-58548 Remove manage_team permissions from System Console Ancillary permissions (#27395)
* remove manage team permissions from sysconsole_write_user_management_chanels and sysconsole_write_user_management_groups
* update migrations, add unit tests
* run migrations-extract
* make updating ancillary permissions a post
* update file names
* add new api to doc, update body to just be []string
* revert moving ancillary permissions to post
* fix queries after final testing
* Update channel.go
* Update channel.go
* Update 000124_remove_manage_team_permission.up.sql
* Update 000124_remove_manage_team_permission.up.sql
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58535 Add more information to LCP and INP metrics (#27484)
* Improve mocking of imported resources in unit tests
We have Webpack configured so that, when code imports an image or other resource, the code gets the URL of that image. Jest now matches that behaviour which is needed because React Testing Library would previously throw an error.
* Polyfill ResizeObserver in all unit tests
* Ensure haveIChannelPermission always returns a boolean value
The previous code could sometimes return undefined. While that should behave the same in practice, it can cause React to print prop type warnings
* MM-58535 Add region label to LCP metrics
* MM-58535 Upgrade web-vitals and add INP attribution
* Change new labels to use snake_case
* Remove replaceGlobalStore option from renderWithContext
I was going to add this in case any tests failed with this option set to false, but after running those tests, that's not the case. I'm going to remove this as an option since it seems more likely than not that anyone using RTL would prefer to have this on.
* [MM-56921] Rendered Latex in Codeblock when rendering disabled (#27060)
* Rendered Latex in Codeblock when rendering disabled
* Fixed Lint error
* Removed render function in Latex Component
* Fix errors preventing LatexBlock unit tests from running
* Updated latex disabled test for Codeblock testing
* Fixed latex_block test lint errors
* Removed Latex disabled test Snapshot
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58776 - Change Ancillary Permissions API to POST (#27504)
* make /ancillary a post
* remove get from client, fix tests
* Update permissions.yaml
* Support release testing (#27587)
* Support release testing
* Merge resolve-ref and generate-test-variables jobs
* Update .server/gitignore to ignore all JSON files under the directory (#27593)
* MM-53962: Adding ES8 dependency (#24399)
* Adding ES8 dependency
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58245 Don't allow patching real email or username for remote users (#27613)
* don't allow patching real email or username for remote users
* add comment
* Fix several re-renders on init (#26361)
* Fix several re-renders on init
* Fix tests
* Address feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58351 Fix showing LHS scrollbar when moving mouse over on chrome and safari (#27160)
* fixing scrollbar not showing when moving mouse over sidebar
* making scrollbar hidden by default and keep shown when hover over channel list
* updating sidebar_list snapshot
* MM-59378 Skip flaky PerformanceReporter test (#27626)
* [MM-58778] Fixing white screen for GM conversion (#27385)
* fixing white screen for GM conversion
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [feat] adding container image scanning (#27624)
Expanding on our ongoing efforts to enhance security, we are integrating container image scanning into the CI pipeline using Wiz.io
https://docs.wiz.io/wiz-docs/docs/github-pipeline
The policy defined, will be providing internal reports in wiz.io for our teams to review. Will not enforcing CI failure at this point.
* Sysadmin manage user settings (#27583)
* Opened modal from system console
* WIP
* WIP
* WIP
* Handled saving user
* Successfully updated user based settings
* WIP
* WIP
* All settings are updating well
* Fixed modal style
* Added admin mode indicators in modal
* Added confirmation dialog
* Lint fixes
* Added license check
* Added permission check
* Fixed i18n file order
* type fix
* Updated snapshots
* Handled performance debugging setting
* Some styling tweaks
* Fixed text alighnment
* Updated license required from professional to enterprise
* Handled long user names
* review fixes
* Added manage setting option in user list page context menu
* Added loader
* Minor reordering
* Removed confirm modal
* Updated snapshots for removed modal
* Added some tests
* Lint fix
* Used new selector in user detail page
* Used new selector in user list page
* Updated tests
* Fixed an incorrect default test
* [fix] ci container image scanning (#27631)
Fixup on https://github.com/mattermost/mattermost/pull/27624
Exposing the tag variable to be used in the scanning step.
Ticket: https://mattermost.atlassian.net/browse/CLD-8041
Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
* Updated required role for user report page GET API (#27529)
* Updated required role for user report page GET API
* Updated permission in error message
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update npm packages versions for release-9.11
* [MM-58750] Update prepackage calls to v0.29.0 for MM v9.11 (#27642) (#27643)
Automatic Merge
* Automated cherry pick of #27571 (#27647)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Automated cherry pick of #27573 (#27651)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Update Copilot plugin prepackaged version to 0.8.3 (#27645) (#27658)
(cherry picked from commit fa8269e4ab0c9e2986ef3dd505363a3bc5ab8a52)
Co-authored-by: Christopher Speller <crspeller@gmail.com>
* chore: Update NOTICE.txt file with updated dependencies (#27655) (#27659)
Automatic Merge
* MM-59416 Don't request notification permissions when we already have them (#27629) (#27672)
Automatic Merge
* MM-59099 Show invalid emoji text with its original case (#27603) (#27673)
Automatic Merge
* [MM-59083] Handle permissions in user management options (#27668) (#27679)
Automatic Merge
* Code enhancements to feature - Sysadmin manage user settings (#27636) (#27680)
Automatic Merge
* MM-58847 Sanitize User (#27471) (#27682)
Automatic Merge
* fix wrong property set (#27625) (#27690)
Automatic Merge
* [MM-59296] Can't open web client on iOS Safari (#27607) (#27697)
Automatic Merge
* Updated minimum supported Edge and Chrome versions (#27691) (#27698)
Automatic Merge
* MM-58772 Fix counter metrics not using Date.now (#27702) (#27731)
(cherry picked from commit a773e6828cdadf6877c0cbc0fbf277a9f1175e74)
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* [MM-59825] Fix linter error found by updated govet (#27715) (#27748)
Automatic Merge
* Update prepackage calls to v0.29.1 for MM v9.11 (#27706) (#27741)
Automatic Merge
* MM-59835: Prevent unnecessary channel bookmarks request causing console 404 (#27745) (#27749)
Automatic Merge
* MM-59026: Update reserved IP ranges (#27751) (#27767)
Automatic Merge
* Fixed bug around channel file sidebar (#27705) (#27770)
* Fixed the issue for DB layer, ES to go
* Handled channel bookmarks
* Handled Bleve
* Lint fix
* Added channel bookmark test
* Skip bleve test
* Used common function
* SKipping ES as indexing logic in unavailable in test
(cherry picked from commit eb6336ce7a34f84e0787e8bf438b042f2d206d73)
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
* MM-57354: Fix elastic search e2e tests (#27670) (#27799)
Automatic Merge
* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel (#27409) (#27815)
* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel
* Fix lint, add ChannelId to uploads
* Fix MMCTL tests and remove unnecessary check for the error message that doesn't work anyways
* Include channel map for getting flagged posts
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit aa85a13c8f0d6a5cfd24f90e7b529076055d2638)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Update latest patch version to 9.11.1 (#27844)
Automatic Merge
* CLD-5783 Implement rolling upgrade tests (#27842) (#27865)
* Make server.prepare idempotent, don't cleanup containers on server.start
* Implement rolling upgrade E2E tests
* Apply Akis' suggestions from code review
* Apply Saturn's suggestions from review
* Communicate RollingRelease on GHA and test automation results channel
* Implement E2E test case versioning for rolling release tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
(cherry picked from commit 39ca104688d634d794d31ffea3f372057d1400f5)
Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
* [MM-58492] Remove subsequent check for team permissions on open channels (#27827) (#27866)
* [MM-58492] Remove subsequent check for team permissions on open channels
* Removed extra check for open channel for webhooks as well
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 6ae03a098e5c4ebdecec7ef58b6d270ce840ccc2)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Cleanup post embed for WebSocket payload (#27763) (#27878)
Automatic Merge
* MM-58793 Apply EnableUserCreation to signup.tsx (#27692) (#27974)
Automatic Merge
* Automated cherry pick of #27903 (#27977)
* [MM-60026] Add playbooks <v2 in the transitionaslly packaged list (#27903)
(cherry picked from commit 5f19d8513b6253cc6d641712c04d9da843c01773)
* add missing method and variable
---------
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Julien Tant <julien@craftyx.fr>
* CLD-7841 Optimize E2E testing costs (#27883) (#27997)
Automatic Merge
* Update latest patch version to 9.11.2 (#28021)
Automatic Merge
* Added User Survey Plugin to prepackaged plugins (#28031)
Automatic Merge
* [MM-58549] Desktop login (#27732) (#28071)
Automatic Merge
* bump prepackaged playbooks versions (#28026) (#28075)
Automatic Merge
* MM-58529 Fix for AdditionalValues in SystemConsole (#27614) (#28147)
Automatic Merge
* Add SBOM generation on release (#27733) (#28149)
Automatic Merge
* Use Reusable SBOM Workflow (#28161) (#28171)
Automatic Merge
* [MM-59069] Make sure OTP are actual One Time Password (#28074) (#28223)
Automatic Merge
* Add MobileExternalBrowser to client config (#28180) (#28228)
Automatic Merge
* MM-60240 Sanitize Channels based on user permissions (#28086) (#28231)
Automatic Merge
* Prepackage Calls v0.29.2 (#28236)
Automatic Merge
* Automated cherry pick of #28195 (#28252)
* [MM-60307] Fix racy use of session in NewWebConn (#28195)
(cherry picked from commit 40d2ae97f1b1a5fab53ba3933860fd08f2a03c29)
* Check if session is nil before calling UpdateLastActivityAtIfNeeded
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Checkout latest stable pgloader release (#28251) (#28258)
Automatic Merge
* Bump yuin/goldmark to v1.7.4 (#28267)
* Manual cherry pick of #28270 on release-9.11 (#28307)
Automatic Merge
* [MM-60307] Check if session is nil before calling UpdateLastActivityAtIfNeeded (#28254) (#28321)
(cherry picked from commit 20ed58906adcc1405cb13690b2a02bf27241d273)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Update latest patch version to 9.11.3 (#28327)
Automatic Merge
* add reuse check on update MFA (#28304) (#28338)
Automatic Merge
* MM-60351 Use oEmbed for YouTube links (#28312) (#28374)
Automatic Merge
* cherry pick of #28065 (#28487)
* Automated cherry pick of #28300 (#28576)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Enhance reporting, add shellcheck (#28240) (#28665)
* Enhance reporting, add shellcheck
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 60b38bb91a839654317fca62001f11d788093d8d)
Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
* Update latest patch version to 9.11.4 (#28686)
Automatic Merge
* MM-60722 - don't allow multiple '@' in email (#28481) (#28799)
Automatic Merge
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership (#27846) (#28915)
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership
* Fix redundant JSON serializing
(cherry picked from commit 90884172ae6920a5843694efe40b5101680585be)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Update latest patch version to 9.11.5 (#28991)
Automatic Merge
* Prepackage Calls v0.29.3 (#28982)
* [MM-61213] Limit file size for slack import file uploads (#28904) (#28996)
Automatic Merge
* [MM-37585] (#28634) (#29117)
Automatic Merge
* Prepackage Calls v0.29.4 (#29231)
Automatic Merge
* Update latest patch version to 9.11.6 (#29271)
Automatic Merge
* MM-59540 Ensure user has invite team permission in order to change setting (#28670) (#29383)
Automatic Merge
* Prevent HEAD requests to a sub-path from infinite redirects (#28285) (#29384)
Automatic Merge
* Add post props validation (#29017) (#29394)
Automatic Merge
* MM-61297 - remove unused code (#29354) (#29410)
Automatic Merge
* Fix MM-61710 (#29248) (#29420)
Automatic Merge
* Prepackage Calls v0.29.5 (#29455)
Automatic Merge
* Fix server update message not handling mutli-digit version numbers (#29436) (#29469)
Automatic Merge
* Prepackage Calls v0.29.6 (#29480)
* Update latest patch version to 9.11.7 (#29536)
Automatic Merge
* [MM-62086] Don't include deleted DMs/GMs when returning archived channels (#29572) (#29598)
* MM-59952/MM-61438 Fix web app not responding to WS events for status (#29371) (#29622)
* MM-59952/MM-61438 Fix web app not responding to WS events for status
* Add E2E tests
* httpservice: improve validation of proxied URLs (#29600) (#29762)
Automatic Merge
* MM-62188 - Revoke user sessions when converted to bot (#29573) (#29752)
Automatic Merge
* Bugfix - Enforce URL length check in LinkMetadata before attempting to insert to database (#29589) (#29794)
Automatic Merge
* fixed issue where it automatically scroll to top when custom emoji are loaded (#29608) (#29824)
Automatic Merge
* Update latest patch version to 9.11.8 (#29863)
Automatic Merge
* Use "transform: scale" to resize emoticons, and "zoom" when supported (#29276) (#29885)
Automatic Merge
* fix merge conflict (#29912)
Automatic Merge
* Prepackage Calls v0.29.7 (#29951)
Automatic Merge
* Updated board prepackaged version to v9.0.5 (#29966)
* [MM-60888] Fix: Retention can cause unrelated files to be deleted (#29897) (#29971)
Automatic Merge
* [MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update latest patch version to 9.11.9 (#29981)
Automatic Merge
* restrict access to channel converstion to public for non team admin+ (#29819) (#30000)
Automatic Merge
* Updated board prepackaged version to v9.0.6 (#30010)
* [MM-62515] Fix: Compliance exports fail when missing s3 file attachment (#29936)
* Permission changes (#29570) (#30024)
Automatic Merge
* Cherry pick of #29880 to v9.11 (#30035)
Automatic Merge
* MM-62500 - Apply Delete check on commands (#29896) (#30067)
Automatic Merge
* Prompt Team Admin before joining private channel (#29955) (#30068)
Automatic Merge
* Upgraded boards prepackaged version to v9.1.0 (#30076)
Automatic Merge
* MM-61751 -Enforce permissions on role detail form. (#29361) (#30113)
Automatic Merge
* Upgraded board version to v9.1.1 (#30153)
Automatic Merge
* MM-62862: CP: Bump dependencies (x/net/html) (#30176)
https://mattermost.atlassian.net/browse/MM-62862
```release-note
NONE
```
* Bump katex for release 9.11 (#30192)
Automatic Merge
* [Cherry-pick] [AI assisted]: MM-62914: Added MFA authentication for plugin requests as well (#30160) (#30238)
* [Cherry-pick] [AI assisted]: MM-62914: Added MFA authentication for plugin requests as well (#30160)
We wipe the token if MFA authentication is enabled. Also added a test case
to lock in the functionality.
https://mattermost.atlassian.net/browse/MM-62914
```release-note
NONE
```
* fix issues
```release-note
NONE
```
* server/Makefile: pin dbcmp (#30245) (#30248)
(cherry picked from commit 3da6e7a75dd2151380945aa9193d7329088fcb97)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* MM-62050: restrict channel bookmarks in archived channels (#29490) (#30229)
* v9.11 cherry-pick of MM-62191 (#30264)
Automatic Merge
* Update latest patch version to 9.11.10 (#30272)
Automatic Merge
* MM-62371 Add additional error handling to PerformanceReporter (#29774) (#30278)
Automatic Merge
* MM-61375: Update file handling for bookmarks (#30034) (#30283)
Automatic Merge
* [AI assisted] MM-62837: (#30268) (#30288)
Automatic Merge
* MM-63195: Enforce MFA requirement for non-self requests (#30290) (#30302)
Automatic Merge
* Fix for draft and scheduled post section not scrolling (#29811) (#30307)
Automatic Merge
* MM-62760 - Allow Team Admins to view team email (#30170) (#30328)
Automatic Merge
* [MM-62687] Patch permission check to avoid modifying the system admin (#30292) (#30351)
Automatic Merge
* MM-62866 Update axios dependency (#30265) (#30316)
* MM-62866 Update axios dependency (#30265)
* Further mess with the lockfile
* Backport additional change from #28999 to fix build
* [MM-62798][MM-63193] Restrict channel permissions on archived channels when viewing archived channels is disabled (#30314) (#30378)
Automatic Merge
* Prepackage Calls v0.29.8 (#30436)
* Update latest patch version to 9.11.11 (#30499)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* Update playbooks to v1.41.0 (#30516)
* MM-63350 Add tests for inviting guest users to teams (#30448) (#30527)
* MM-63350 Add tests for inviting guest users to teams
* Fix style issue
* Fix one more issue
* Update latest patch version to 9.11.12 (#30555)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-61707 release-9.11 (#30560)
* conflicts
* layers
* cherry pick and fix conflicts (#30652)
* [MM-63693] Don't log PING websocket events (#30669) (#30706)
(cherry picked from commit f53625d59f9d1a80ae72911d21e5dee63cff283d)
Co-authored-by: David Krauser <david@krauser.org>
* Update latest patch version to 9.11.13 (#30751)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* [MM-63480] Remove user cache early when deactivating user (#30571) (#30660)
* remove user cache early when deactivating user
* add e2e test
* fix test style
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63590 - validate user has proper permission when updating team privacy (#30650) (#30762)
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 02c76784380acb6802601bd24c205553b9a5a1be)
Co-authored-by: Pablo Vélez <pablovv2012@gmail.com>
* MM-63342:Bot accounts OAuth gating (#30466) (#30766)
(cherry picked from commit 04676582cdd26f4fdfa78fcf60a7f8745e6b27f5)
Co-authored-by: catalintomai <56169943+catalintomai@users.noreply.github.com>
* MM-63316: Guest access to channel (#30467) (#30768)
(cherry picked from commit c23f44fe8ed02f71d506f99adc30ad34c58c89d1)
Co-authored-by: catalintomai <56169943+catalintomai@users.noreply.github.com>
* MM-63378: Test and fix permission issues with System Manager team access (#30672) (#30770)
* test PermissionView semantics
* change required ancillary permissions
`PermissionSysconsoleReadReportingTeamStatistics` doesn't strictly need `PermissionViewTeam`, but can work with whatever teams the user has access to.
* remove unnecessary timeouts
* remove redundant comment
* update snapshots
* Update e2e-tests/playwright/specs/functional/system_console/permissions/team_access.spec.ts
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 6f33b721de76b39a7714bfe0d5e9c1306869a3e3)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* [MM-63436] Cherry-pick to `release-9.11` (#30811)
* [MM-63436] Replace Exif parser dependency (#30479)
* Replace Exif parser dependency
* Improve forward seeking logic
* Fix linting
* Stop decoding upon finding tag
* Use latest version of imagemeta dependency
* Don't skip TIFF reader tests
* Log improvements
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update layers
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update latest patch version to 9.11.14 (#30869)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-63791: guest permissions to teams (#30789) (#30874)
* improve th.CreateGuestAndClient
* test coverage for guest user access to teams
* restrict guest access to public teams unless a member
(cherry picked from commit 701ddc896a107b13f457fbdbe229bce5019fc516)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* MM-62930: Add validation of LDAP attribute values. (#30419) (#30823)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Revert "[MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)" (#30939)
This reverts commit 968fc9abd56d51d32880bca2f7cbcdff8c1af68c.
* Update latest patch version to 9.11.15 (#30940)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* [CP] MM-63756: Added index to sidebarchannels table (#30724) (#30932)
The (s SqlChannelStore) getSidebarCategoriesT gets called quite frequently.
- Team switch
- WS reconnect
- Category created
- Category updated
- Category deleted
Of these 1 and 2 are probably the most commonly called sources. Based on that,
the sidebarChannels table is not that well-optimized. Even though
the query time might be reasonable, without an index, it has to churn a lot of
DB CPU for a sequential scan.
We add a new index to optimize this.
CREATE INDEX idx_sidebarchannels_categoryid ON sidebarchannels(categoryid);
```
Before:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=40854.18..40854.19 rows=4 width=193) (actual time=251.635..251.646 rows=204 loops=1)
Sort Key: sidebarcategories.sortorder, sidebarchannels.sortorder
Sort Method: quicksort Memory: 65kB
Buffers: shared hit=1203 read=23668
-> Nested Loop (cost=8.87..40854.14 rows=4 width=193) (actual time=251.345..251.455 rows=204 loops=1)
Buffers: shared hit=1203 read=23668
-> Nested Loop (cost=0.41..9.47 rows=1 width=54) (actual time=0.068..0.074 rows=1 loops=1)
Buffers: shared hit=5
-> Seq Scan on teams (cost=0.00..1.03 rows=1 width=27) (actual time=0.024..0.026 rows=1 loops=1)
Filter: (((id)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1
-> Index Scan using teammembers_pkey on teammembers (cost=0.41..8.43 rows=1 width=27) (actual time=0.039..0.043 rows=1 loops=1)
Index Cond: (((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (deleteat = 0)
Buffers: shared hit=4
-> Hash Right Join (cost=8.45..40844.62 rows=4 width=193) (actual time=251.274..251.361 rows=204 loops=1)
Hash Cond: ((sidebarchannels.categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=1198 read=23668
-> Seq Scan on sidebarchannels (cost=0.00..37514.77 rows=1265277 width=100) (actual time=0.043..99.345 rows=1265444 loops=1)
Buffers: shared hit=1194 read=23668
-> Hash (cost=8.44..8.44 rows=1 width=158) (actual time=0.047..0.047 rows=6 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 10kB
Buffers: shared hit=4
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=158) (actual time=0.029..0.037 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
Planning:
Buffers: shared hit=9
Planning Time: 1.215 ms
Execution Time: 251.755 ms
(31 rows)
After:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=1544.53..1544.54 rows=4 width=192) (actual time=0.834..0.859 rows=204 loops=1)
Sort Key: sidebarcategories.sortorder, sidebarchannels.sortorder
Sort Method: quicksort Memory: 65kB
Buffers: shared hit=58
-> Nested Loop Left Join (cost=8.53..1544.49 rows=4 width=192) (actual time=0.066..0.252 rows=204 loops=1)
Buffers: shared hit=58
-> Nested Loop (cost=0.83..17.93 rows=1 width=157) (actual time=0.042..0.098 rows=6 loops=1)
Buffers: shared hit=34
-> Nested Loop (cost=0.42..9.48 rows=1 width=157) (actual time=0.030..0.049 rows=6 loops=1)
Buffers: shared hit=10
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=157) (actual time=0.018..0.022 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
-> Seq Scan on teams (cost=0.00..1.03 rows=1 width=27) (actual time=0.002..0.003 rows=1 loops=6)
Filter: (((id)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=6
-> Index Scan using teammembers_pkey on teammembers (cost=0.41..8.43 rows=1 width=27) (actual time=0.007..0.007 rows=1 loops=6)
Index Cond: (((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (deleteat = 0)
Buffers: shared hit=24
-> Bitmap Heap Scan on sidebarchannels (cost=7.69..1522.35 rows=421 width=100) (actual time=0.012..0.017 rows=34 loops=6)
Recheck Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Heap Blocks: exact=6
Buffers: shared hit=24
-> Bitmap Index Scan on idx_sidebarchannels_categoryid (cost=0.00..7.58 rows=421 width=0) (actual time=0.010..0.010 rows=34 loops=6)
Index Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=18
Planning:
Buffers: shared hit=18
Planning Time: 0.543 ms
Execution Time: 0.968 ms
(32 rows)
```
I have also looked at potentially re-ordering the JOINs to make
sidebarchannels and sidebarcategories JOIN earlier, but that didn't give
a major benefit.
Also looked at adding a compound index with (categoryid, sortorder) to improve
sorting performance, but that didn't give a major benefit from what the single
column index already gives.
The `completePopulatingCategoryChannelsT` query also partially benefits
from this. But the Postgres optimizer sometimes selects the index on categoryId
and sometimes on ChannelId, both giving equivalent performance. So there's no major
improvement there, but at the same time, no regression as well.
```
Original:
[bigdb] # EXPLAIN (ANALYZE, BUFFERS) SELECT Id FROM ChannelMembers LEFT JOIN Channels ON Channels.Id=ChannelMembers.ChannelId WHERE (ChannelMembers.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND Channels.Type IN ('D'
,'G') AND Channels.DeleteAt = 0 AND NOT EXISTS ( SELECT 1 FROM SidebarChannels JOIN SidebarCategories on SidebarChannels.CategoryId=SidebarCategories.Id WHERE (SidebarChannels.ChannelId = ChannelMembers.ChannelI
d AND SidebarCategories.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND SidebarCategories.TeamId = '3ee5y5ok6jgxicrmqstdnghmfr') )) ORDER BY DisplayName ASC;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=5864.68..5865.84 rows=463 width=40) (actual time=9.008..9.022 rows=39 loops=1)
Sort Key: channels.displayname
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=2112
-> Nested Loop Anti Join (cost=1.96..5844.18 rows=463 width=40) (actual time=0.188..8.932 rows=39 loops=1)
Buffers: shared hit=2112
-> Nested Loop (cost=0.99..3476.66 rows=463 width=67) (actual time=0.159..7.952 rows=39 loops=1)
Buffers: shared hit=1956
-> Index Only Scan using idx_channelmembers_user_id_channel_id_last_viewed_at on channelmembers (cost=0.56..40.78 rows=470 width=27) (actual time=0.036..0.467 rows=437 loops=1)
Index Cond: (userid = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Heap Fetches: 45
Buffers: shared hit=208
-> Memoize (cost=0.43..7.69 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=437)
Cache Key: channelmembers.channelid
Cache Mode: logical
Hits: 0 Misses: 437 Evictions: 0 Overflows: 0 Memory Usage: 42kB
Buffers: shared hit=1748
-> Index Scan using channels_pkey on channels (cost=0.42..7.68 rows=1 width=40) (actual time=0.015..0.015 rows=0 loops=437)
Index Cond: ((id)::text = (channelmembers.channelid)::text)
Filter: ((type = ANY ('{D,G}'::channel_type[])) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1748
-> Nested Loop (cost=0.97..5.10 rows=1 width=27) (actual time=0.023..0.023 rows=0 loops=39)
Buffers: shared hit=156
-> Index Only Scan using sidebarchannels_pkey on sidebarchannels (cost=0.55..4.56 rows=1 width=92) (actual time=0.022..0.022 rows=0 loops=39)
Index Cond: (channelid = (channelmembers.channelid)::text)
Heap Fetches: 0
Buffers: shared hit=156
-> Index Scan using sidebarcategories_pkey on sidebarcategories (cost=0.42..0.48 rows=1 width=65) (never executed)
Index Cond: ((id)::text = (sidebarchannels.categoryid)::text)
Filter: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Planning:
Buffers: shared hit=48 dirtied=1
Planning Time: 2.222 ms
Execution Time: 9.142 ms
(35 rows)
New:
[bigdb] # EXPLAIN (ANALYZE, BUFFERS) SELECT Id FROM ChannelMembers LEFT JOIN Channels ON Channels.Id=ChannelMembers.ChannelId WHERE (ChannelMembers.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND Channels.Type IN ('D'
,'G') AND Channels.DeleteAt = 0 AND NOT EXISTS ( SELECT 1 FROM SidebarChannels JOIN SidebarCategories on SidebarChannels.CategoryId=SidebarCategories.Id WHERE (SidebarChannels.ChannelId = ChannelMembers.ChannelId AND SidebarCategories.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND SidebarCategories.TeamId = '3ee5y5ok6jgxicrmqstdnghmfr') )) ORDER BY DisplayName ASC;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=5059.95..5061.11 rows=463 width=40) (actual time=12.072..12.086 rows=39 loops=1)
Sort Key: channels.displayname
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=1984
-> Nested Loop Anti Join (cost=9.10..5039.45 rows=463 width=40) (actual time=0.751..12.009 rows=39 loops=1)
Join Filter: ((sidebarchannels.channelid)::text = (channelmembers.channelid)::text)
Rows Removed by Join Filter: 7839
Buffers: shared hit=1984
-> Nested Loop (cost=0.99..3476.66 rows=463 width=67) (actual time=0.161..7.579 rows=39 loops=1)
Buffers: shared hit=1956
-> Index Only Scan using idx_channelmembers_user_id_channel_id_last_viewed_at on channelmembers (cost=0.56..40.78 rows=470 width=27) (actual time=0.036..0.449 rows=437 loops=1)
Index Cond: (userid = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Heap Fetches: 45
Buffers: shared hit=208
-> Memoize (cost=0.43..7.69 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=437)
Cache Key: channelmembers.channelid
Cache Mode: logical
Hits: 0 Misses: 437 Evictions: 0 Overflows: 0 Memory Usage: 42kB
Buffers: shared hit=1748
-> Index Scan using channels_pkey on channels (cost=0.42..7.68 rows=1 width=40) (actual time=0.014..0.014 rows=0 loops=437)
Index Cond: ((id)::text = (channelmembers.channelid)::text)
Filter: ((type = ANY ('{D,G}'::channel_type[])) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1748
-> Materialize (cost=8.11..1535.03 rows=4 width=27) (actual time=0.003..0.046 rows=201 loops=39)
Buffers: shared hit=28
-> Nested Loop (cost=8.11..1535.01 rows=4 width=27) (actual time=0.099..0.383 rows=201 loops=1)
Buffers: shared hit=28
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=65) (actual time=0.047..0.057 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
-> Bitmap Heap Scan on sidebarchannels (cost=7.69..1522.35 rows=421 width=92) (actual time=0.028..0.040 rows=34 loops=6)
Recheck Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Heap Blocks: exact=6
Buffers: shared hit=24
-> Bitmap Index Scan on idx_sidebarchannels_categoryid (cost=0.00..7.58 rows=421 width=0) (actual time=0.023..0.023 rows=34 loops=6)
Index Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=18
Planning:
Buffers: shared hit=51
Planning Time: 2.240 ms
Execution Time: 12.210 ms
(42 rows)
```
Analysis on MySQL for completion:
```
Before:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Sort: SidebarCategories.SortOrder, SidebarChannels.SortOrder (actual time=277.675..277.675 rows=4 loops=1)
-> Stream results (cost=138558.36 rows=1287808) (actual time=242.506..277.650 rows=4 loops=1)
-> Left hash join (<hash>(SidebarChannels.CategoryId)=<hash>(SidebarCategories.Id)), extra conditions: (SidebarChannels.CategoryId = SidebarCategories.Id) (cost=138558.36 rows=1287808) (actual time=242.498..277.626 rows=4 loops=1)
-> Index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='qdggj9pyobgkjpj8htwzizks1r', TeamId='xmh7bupzajnudqf3h4mm76qapy') (cost=1.40 rows=4) (actual time=0.092..0.094 rows=4 loops=1)
-> Hash
-> Table scan on SidebarChannels (cost=8394.55 rows=321952) (actual time=0.123..106.334 rows=300002 loops=1)
|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After:
----------------------------------------------------------------+
| -> Sort: SidebarCategories.SortOrder, SidebarChannels.SortOrder (actual time=0.739..0.742 rows=4 loops=1)
-> Stream results (cost=6.80 rows=7) (actual time=0.468..0.703 rows=4 loops=1)
-> Nested loop left join (cost=6.80 rows=7) (actual time=0.456..0.673 rows=4 loops=1)
-> Index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='qdggj9pyobgkjpj8htwzizks1r', TeamId='xmh7bupzajnudqf3h4mm76qapy') (cost=4.38 rows=4) (actual time=0.302..0.313 rows=4 loops=1)
-> Index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=0.48 rows=2) (actual time=0.085..0.087 rows=0 loops=4)
|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```
Timing wise, it takes around 2s to add the index on a table with 1.2M rows
for Postgres. And it takes around 5s on MySQL on a table with 300K rows.
It looks like it takes longer on MySQL, but since both migrations are
non-locking, it should be fine.
https://mattermost.atlassian.net/browse/MM-63756
```release-note
NONE
```
* MM-64209: Optimize completePopulatingCategoryChannelsT for MySQL (#30963) (#30967)
For our MySQL customers, we have discovered that the query is not
able to choose the right plan by itself without adequate hints.
This is only for MySQL as we have confirmed from multiple customers
that Postgres takes the right index idx_sidebarcategories_userid_teamid
for the sidebarCategories table. And if it doesn't, then a VACUUM ANALYZE
fixes it.
But for MySQL, we have to do two things:
- Pass an index hint to let it use idx_sidebarcategories_userid_teamid.
- Pass an optimizer hint to materialize the sub-query. This is used
to materialize the doesNotHaveSidebarChannel sub-query into a temporary
table, letting MySQL reuse the contents of the table for further processing
in the parent sections of the query.
I have confirmed both locally and in the customer environment
that it gives a clear benefit.
*LOCAL*
OLD:
```
| -> Nested loop antijoin (cost=2889.85 rows=19767) (actual time=3.355..38.033 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.410..1.689 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.394..0.886 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.389..0.793 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.003 rows=1 loops=220)
-> Nested loop inner join (cost=4967.50 rows=180) (actual time=0.165..0.165 rows=1 loops=220)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=Channels.Id) (cost=7.86 rows=180) (actual time=0.055..0.062 rows=13 loops=220)
-> Filter: ((SidebarCategories.TeamId = 'team01') and (SidebarCategories.UserId = 'user000')) (cost=44.93 rows=1) (actual time=0.008..0.008 rows=0 loops=2881)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=SidebarChannels.CategoryId) (cost=44.93 rows=1) (actual time=0.006..0.006 rows=1 loops=2881)
|
```
NEW:
```
| -> Nested loop antijoin (cost=5879.73 rows=58021) (actual time=1.544..3.135 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.421..1.778 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.405..0.945 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.400..0.859 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.004 rows=1 loops=220)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=Channels.Id) (cost=130.37..130.37 rows=1) (actual time=0.006..0.006 rows=1 loops=220)
-> Materialize with deduplication (cost=130.35..130.35 rows=527) (actual time=1.118..1.118 rows=205 loops=1)
-> Filter: (SidebarChannels.ChannelId is not null) (cost=77.61 rows=527) (actual time=0.059..0.851 rows=523 loops=1)
-> Nested loop inner join (cost=77.61 rows=527) (actual time=0.058..0.786 rows=523 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='user000', TeamId='team01') (cost=2.81 rows=15) (actual time=0.025..0.031 rows=15 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=1.70 rows=35) (actual time=0.032..0.046 rows=35 loops=15)
```
Performance improvement from 38ms to 3ms.
*CUSTOMER ENV* (with sensitive data wiped off)
OLD:
```
| -> Sort: channels.DisplayName (actual time=512..512 rows=5 loops=1)
-> Stream results (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop antijoin (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.025..0.0878 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0146..0.023 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00999..0.0102 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.00778..0.00785 rows=1 loops=6)
-> Nested loop inner join (cost=2.85 rows=4.81) (actual time=102..102 rows=0 loops=5)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=channelmembers.ChannelId) (cost=2.01 rows=4.81) (actual time=0.0125..13.8 rows=24134 loops=5)
-> Filter: ((sidebarcategories.TeamId = '') and (sidebarcategories.UserId = '')) (cost=1.54 rows=1) (actual time=0.00359..0.00359 rows=0 loops=120671)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=sidebarchannels.CategoryId) (cost=1.54 rows=1) (actual time=0.00316..0.00319 rows=1 loops=120671)
```
NEW:
```
Here is the output
| -> Sort: channels.DisplayName (actual time=0.12..0.12 rows=5 loops=1)
-> Stream results (cost=3.45 rows=4.01) (actual time=0.0797..0.11 rows=5 loops=1)
-> Nested loop antijoin (cost=3.45 rows=4.01) (actual time=0.0769..0.106 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.0291..0.0555 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0145..0.0162 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00611..0.00619 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.0053..0.00534 rows=1 loops=6)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=channelmembers.ChannelId) (cost=7.01..7.01 rows=1) (actual time=0.00956..0.00956 rows=0 loops=5)
-> Materialize with deduplication (cost=7..7 rows=13.4) (actual time=0.0451..0.0451 rows=0 loops=1)
-> Filter: (sidebarchannels.ChannelId is not null) (cost=5.66 rows=13.4) (actual time=0.0441..0.0441 rows=0 loops=1)
-> Nested loop inner join (cost=5.66 rows=13.4) (actual time=0.0439..0.0439 rows=0 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='', TeamId='') (cost=0.592 rows=3) (actual time=0.0105..0.0134 rows=3 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=sidebarcategories.Id) (cost=1.39 rows=4.46) (actual time=0.00999..0.00999 rows=0 loops=3)
```
Performance improvement from 512ms to 0.12ms.
https://mattermost.atlassian.net/browse/MM-64209
```release-note
NONE
```
(cherry picked from commit 0ebd3e808507d948b1ef83425b2f05723e1102c1)
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
* Revert "Revert "[MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)" (#30939)" (#30964)
This reverts commit 97e6d3231a80107e0c9098f22617900d78c3a1c8.
* Update latest patch version to 9.11.16 (#30973)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* Fix potential nil dereference in app.isChannelArchivedAndHidden (#30628) (#30987)
(cherry picked from commit 7250095f861772bee5204874793cab484fd82c3d)
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
* MM-64336: simplify doc extractor (#31103) (#31109)
* MM-64336: simplify doc extractor
Avoid creating a whole temporary directory when a single temporary file suffices.
Fixes: https://mattermost.atlassian.net/browse/MM-64337
* clarify -* semantics
(cherry picked from commit 65ae…
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 5.7% (332 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 5.7% (334 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (2509 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/en_AU/
* Translated using Weblate (Dutch)
Currently translated at 100.0% (2509 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/en_AU/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.0% (349 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (2507 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.0% (350 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 0.9% (24 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nb_NO/
* Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/
* [MM-58516] Migrate tooltips of "components/search/user_guide_dropdown/user_guide_dropdown.tsx" to WithTooltip (#27248)
* [MM-58512] Migrate tooltips of "components/status_dropdown/status_dropdown.tsx" to WithTooltip (#27246)
* [MM-59059] Re enable markdown preview for channel header in user advanced settings (#27440)
* MM-58255 Ensure remote users do not get valid email addresses (#27421)
* remote users don't get valid email addresses; remote users cannot have access tokens
* block notification emails for remote users
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58802 Fix overlapping back button (#27394)
* fix overlapping back button
* css tweak
* use classNames utility
* fixed import order
* CLD-5704 Migrate daily master/cloud tests (#27393)
* [skip ci] Support Cloud/daily tests and Zephyr integration
* [skip ci] Fix workflow file
* [skip ci] Fix typo in workflow input name
* Fix cloud variable passing
* [skip ci] Fix typo
* Utilize master branch image for daily tests
* Apply Saturn's suggestion, fixes and improvements
* update for adding multiple members (#25128)
* update for adding multiple members
* fix unit test
* more test fixes
* add another unit test
* fix object passed by client4
* revert package-lock.json
* revert package-lock.json
* add length check
* limit size of lists in API requests
* revert package-lock
* add batching to front end
* add batching to front end
* fix bad merge
* update return type
* remove unnecessary permisssion check, add unit test
* fixes and add tests from review
* revert changes adding limits to other apis
* fixes
* clean-up from code review
* fix unit test call
* revert back to interface{}, fix unit test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58777 Confirm that sendBeacon exists before trying to use it (#27458)
* migrate tooltips of file_preview_modal_main_actions.tsx to WithTooltip (#27243)
* Change: Use WithTooltip instead of OverlayTrigger on filename_overlay (#27439)
* MM-58411 Migrate tooltips of 'components/actions_menu/actions_menu' to WithTooltip (#27238)
* Added console log for draft PR
* Replaced tooltip component with changes
* Updated snapshot for tests
* Updated title to use FormattedMessage
* Remove defineMessages
* Fix style
* Removed unused tooltip
---------
Co-authored-by: ezekiel <ezekiel@itsmart.my>
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-58408] Migrate tooltips of 'components/file_preview_modal/file_preview_modal_main_nav/file_preview_modal_main_nav' to WithTooltip (#27422)
* Change PerformanceReporter tests to not check exact values for timestamps (#27459)
* [MM-58409] Migrate tooltips of 'components/file_preview_modal/popover_bar/popover_bar' to WithTooltip (#27447)
* MM-58755 - Fixing inproduct notices spacing (#27442)
* MM-58755 - Fixing inproduct notices spacing
* Updating compass modal
* Updating test
* Bubble up parsing error from en.json (#27362)
Running `make i18n-extract` on a en.json file
with bad JSON will just wipe off all keys instead
of throwing the error. This is very confusing
and can lead to a lot of time wasted because
there's no indication that the JSON is incorrect.
Fixing this.
```release-note
NONE
```
* Sanitize RemoteEmail user prop (#27170)
* Sanitize RemoteEmail user prop
If the server is configured to hide user emails, the "RemoteEmail"
user property will be sanitized as well, effectively hiding the real
email of remote users.
* fix merge conflict
---------
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
* require regenerate invite id to have invite permission (#27427)
* [MM-59061] Remove redundant index route for Root.tsx (#27441)
* [MM-59047] Keyboard Shortcuts Modal Improvements (#27443)
* [MM-59064] Close Icon is not in line with toast text of "search this channel" when RHS threads panel is open (#27464)
* Add support packet metadata (#27465)
* removed offending line that hid threads view on mobile (#27428)
Automatic Merge
* chore(deps): pin whatwg-url to 12.0.0+ in /api (#27463)
to suppress warnings from whatwg-url 5.0.0 (through 11.0.0)
on `make build` or `make run` in /api.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Fix concurrency for daily tests (#27480)
* MM-59254 Fix EnableClientMetrics setting being hidden (#27483)
Automatic Merge
* MM-58854 Update how Compass icons are referenced by AnnouncementBar (#27461)
Automatic Merge
* MM-57375: Update to latest minio image (#27475)
* test with latest minio image
* Update the KMS key
- Also use latest config settings. The older ones were deprecated.
* MM-58496 - Updating channel font size (#27445)
* MM-58496 - Updating channel font size
* Updating lineheight
* MM-54416: Channel Bookmarks Web UI (#25889)
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
* [MM-58405] Migrate tooltips of 'components/announcement_bar/default_announcement_bar/announcement_bar' to WithTooltip (#27244)
* Migrate tooltips of 'components/announcement_bar/default_announcement_bar/announcement_bar' to WithTooltip
* Review fixes
* Review fix
* Fix imports
* Update snapshots
* Test fix
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-58509] Migrate tooltips of "components/admin_console/user_grid/user_grid_role_dropdown.tsx" to WithTooltip (#27242)
* chore: update package metadata for API reference (#27462)
* [MM-58840] Add routing restrictions (#27482)
* require Permission to user to mark channels as read (#27468)
* chore(api redoc): remove api/redoc-static.html (#27500)
The orphaned file unexpectedly introduced in the old PR in 2020
can now be removed as it originally is orphaned and not referenced
at all.
- mattermost/mattermost-api-reference PR 503
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Print panic message when mmctl panics (#27390)
* Update latest minor version to 9.11.0 (#27496)
Automatic Merge
* fix panic in migrations (#27494)
* [chore] migration of plugin-store (#27506)
Plugin store is gradually migrated from:
- https://plugins-store.test.mattermost.com
to
- https://plugins.releases.mattermost.com
We reflect that change here
Note: Currently both CDN's are working as expected, to facilitate the mgiration. Upon succesfull migration, https://plugins-store.test.mattermost.com will be decomissioned
* MM-56774: Delete file along with bookmark (#27495)
* [MM-58686] Adjust text alignment on custom status tooltip (#27353)
* Change: Adjust text alignment on custom status tooltip
Change: Update 'Today' expiry time calculation on custom_status_modal
* Change: Use display inline-block instead of flex for custom-status class
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Translations update from Mattermost Weblate (#27507)
* Translated using Weblate (German)
Currently translated at 100.0% (2510 of 2510 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/
* Translated using Weblate (German)
Currently translated at 100.0% (5775 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/
* Translated using Weblate (Polish)
Currently translated at 100.0% (2510 of 2510 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/
* Translated using Weblate (Polish)
Currently translated at 100.0% (5775 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/
* Translated using Weblate (Dutch)
Currently translated at 99.9% (5771 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/
* Translated using Weblate (Serbian)
Currently translated at 10.5% (611 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sr/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.3% (369 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (German)
Currently translated at 100.0% (5801 of 5801 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/
---------
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: homerCOD <anicin.goran@gmail.com>
Co-authored-by: Frank Paul Silye <frankps@uio.no>
* MM-58771 - Make manage_server permission, non updatable (#27481)
* make manage_server, non updatable
* remove blank line
* Update ISSUE_TEMPLATE.md (#27538)
Automatic Merge
* [MM-57942] Fix a panic on password is too long (#27449)
* return error from bcrypt, handle gracefully; remove dead code
* linting
* linting
* i18n
* fix test
* fill out translations
* Adds Remote Cluster related API endpoints (#27432)
* Adds Remote Cluster related API endpoints
New endpoints for the following routes are added:
- Get Remote Clusters at `GET /api/v4/remotecluster`
- Create Remote Cluster at `POST /api/v4/remotecluster`
- Accept Remote Cluster invite at `POST
/api/v4/remotecluster/accept_invite`
- Generate Remote Cluster invite at `POST
/api/v4/remotecluster/{remote_id}/generate_invite`
- Get Remote Cluster at `GET /api/v4/remotecluster/{remote_id}`
- Patch Remote Cluster at `PATCH /api/v4/remotecluster/{remote_id}`
- Delete Remote Cluster at `DELETE /api/v4/remotecluster/{remote_id}`
These endpoints are planned to be used from the system console, and
gated through the `manage_secure_connections` permission.
* Update server/channels/api4/remote_cluster_test.go
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
* Fix AppError names
---------
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Skips flaky test on the remote cluster API (#27547)
* Skips flaky test on the remote cluster API
* Adds ticket link to the `t.Skip`
* Revert "Added GetPluginID method and tests (#27281)" (#27540)
This reverts commit 4acc4796edb2c1ff93e861b4732c1c758ac76371.
* [MM-58443] Migrate tooltips of 'components/global_header/right_controls/saved_posts_button/saved_posts_button.tsx' to WithTooltip (#27185)
* add withtooltip handling
* add withtooltip handling
* placed icon inside tooltip
* Update saved_posts_button.tsx
* Update saved_posts_button.tsx
* Update saved_posts_button.test.tsx.snap
* Update saved_posts_button.tsx
---------
Co-authored-by: surajanthwal <surajanthwal2010@gmail.com>
Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update Packet metadata generation based on feedback (#27490)
* Add platform information for push notification metrics (#27460)
* Add platform information for push notification metrics
* Address feedback
* Add the client platform returned by the devices to the normalize function
* Add "no platform" platform label to distinguish from unknown
* Orders results of the GetAll remote clusters store method (#27548)
* MM-57824: Export/import custom status (#27361)
https://mattermost.atlassian.net/browse/MM-57824
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* chore: improvements to keycloak local development (#26518)
* update keycloak docker image
* update realm file with a compatible realm
* import realm on start-docker command
Since bitnami's image does not support importing directly, the import of the test realm is done in the make file start-docker action
* Use official image from quay
* updated realm keycloak config
* final note about nickname attrib for saml
* add admin user
* update realm
* Updated from master
* Updated docs
* local typo
* use jq for ldap and saml
* updated readme
* Correctly merge plugin configuration on mmctl config patch (#26647)
* Adds a step to the config patch command to merge plugin configurations
* Fix linter
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Translations update from Mattermost Weblate (#27586)
Automatic Merge
* [MM-58856] Migrate tooltips of "components/copy_button.tsx" to WithTooltip (#27433)
* [MM-58003] Allow setting AdvancedLoggingJSON via mmctl (#27388)
* [MM-57963] Log Name and DisplayName of groups (#26836)
* [MM-58004] Update logged fields of users (#26860)
* [MM-56339] Audit logs: on login add UserId and SessionId to audit's Actor field (#27446)
* on login add UserId and SessionId to audit's Actor field to match logout
* lint
* simplify to add only userId and sessionId
* AddToEventActor -> AddUser/SessionToEventActor
* fill in missing session data when logging the audit record
* why did it bump that? reverting.
* make modules-tidy
* trigger build
* add more context to the comment
* Bump prepackage Github plugin version to 2.3.0 (#27572)
* Don't modify global variables in TestNoticeValidation (#27591)
* Remove dup stylelint depdendencies in webapp/channels (#27499)
* add hover state to accordions and tweaks styles (#27577)
* MM-58548 Remove manage_team permissions from System Console Ancillary permissions (#27395)
* remove manage team permissions from sysconsole_write_user_management_chanels and sysconsole_write_user_management_groups
* update migrations, add unit tests
* run migrations-extract
* make updating ancillary permissions a post
* update file names
* add new api to doc, update body to just be []string
* revert moving ancillary permissions to post
* fix queries after final testing
* Update channel.go
* Update channel.go
* Update 000124_remove_manage_team_permission.up.sql
* Update 000124_remove_manage_team_permission.up.sql
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58535 Add more information to LCP and INP metrics (#27484)
* Improve mocking of imported resources in unit tests
We have Webpack configured so that, when code imports an image or other resource, the code gets the URL of that image. Jest now matches that behaviour which is needed because React Testing Library would previously throw an error.
* Polyfill ResizeObserver in all unit tests
* Ensure haveIChannelPermission always returns a boolean value
The previous code could sometimes return undefined. While that should behave the same in practice, it can cause React to print prop type warnings
* MM-58535 Add region label to LCP metrics
* MM-58535 Upgrade web-vitals and add INP attribution
* Change new labels to use snake_case
* Remove replaceGlobalStore option from renderWithContext
I was going to add this in case any tests failed with this option set to false, but after running those tests, that's not the case. I'm going to remove this as an option since it seems more likely than not that anyone using RTL would prefer to have this on.
* [MM-56921] Rendered Latex in Codeblock when rendering disabled (#27060)
* Rendered Latex in Codeblock when rendering disabled
* Fixed Lint error
* Removed render function in Latex Component
* Fix errors preventing LatexBlock unit tests from running
* Updated latex disabled test for Codeblock testing
* Fixed latex_block test lint errors
* Removed Latex disabled test Snapshot
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58776 - Change Ancillary Permissions API to POST (#27504)
* make /ancillary a post
* remove get from client, fix tests
* Update permissions.yaml
* Support release testing (#27587)
* Support release testing
* Merge resolve-ref and generate-test-variables jobs
* Update .server/gitignore to ignore all JSON files under the directory (#27593)
* MM-53962: Adding ES8 dependency (#24399)
* Adding ES8 dependency
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58245 Don't allow patching real email or username for remote users (#27613)
* don't allow patching real email or username for remote users
* add comment
* Fix several re-renders on init (#26361)
* Fix several re-renders on init
* Fix tests
* Address feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58351 Fix showing LHS scrollbar when moving mouse over on chrome and safari (#27160)
* fixing scrollbar not showing when moving mouse over sidebar
* making scrollbar hidden by default and keep shown when hover over channel list
* updating sidebar_list snapshot
* MM-59378 Skip flaky PerformanceReporter test (#27626)
* [MM-58778] Fixing white screen for GM conversion (#27385)
* fixing white screen for GM conversion
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [feat] adding container image scanning (#27624)
Expanding on our ongoing efforts to enhance security, we are integrating container image scanning into the CI pipeline using Wiz.io
https://docs.wiz.io/wiz-docs/docs/github-pipeline
The policy defined, will be providing internal reports in wiz.io for our teams to review. Will not enforcing CI failure at this point.
* Sysadmin manage user settings (#27583)
* Opened modal from system console
* WIP
* WIP
* WIP
* Handled saving user
* Successfully updated user based settings
* WIP
* WIP
* All settings are updating well
* Fixed modal style
* Added admin mode indicators in modal
* Added confirmation dialog
* Lint fixes
* Added license check
* Added permission check
* Fixed i18n file order
* type fix
* Updated snapshots
* Handled performance debugging setting
* Some styling tweaks
* Fixed text alighnment
* Updated license required from professional to enterprise
* Handled long user names
* review fixes
* Added manage setting option in user list page context menu
* Added loader
* Minor reordering
* Removed confirm modal
* Updated snapshots for removed modal
* Added some tests
* Lint fix
* Used new selector in user detail page
* Used new selector in user list page
* Updated tests
* Fixed an incorrect default test
* [fix] ci container image scanning (#27631)
Fixup on https://github.com/mattermost/mattermost/pull/27624
Exposing the tag variable to be used in the scanning step.
Ticket: https://mattermost.atlassian.net/browse/CLD-8041
Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
* Updated required role for user report page GET API (#27529)
* Updated required role for user report page GET API
* Updated permission in error message
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update npm packages versions for release-9.11
* [MM-58750] Update prepackage calls to v0.29.0 for MM v9.11 (#27642) (#27643)
Automatic Merge
* Automated cherry pick of #27571 (#27647)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Automated cherry pick of #27573 (#27651)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Update Copilot plugin prepackaged version to 0.8.3 (#27645) (#27658)
(cherry picked from commit fa8269e4ab0c9e2986ef3dd505363a3bc5ab8a52)
Co-authored-by: Christopher Speller <crspeller@gmail.com>
* chore: Update NOTICE.txt file with updated dependencies (#27655) (#27659)
Automatic Merge
* MM-59416 Don't request notification permissions when we already have them (#27629) (#27672)
Automatic Merge
* MM-59099 Show invalid emoji text with its original case (#27603) (#27673)
Automatic Merge
* [MM-59083] Handle permissions in user management options (#27668) (#27679)
Automatic Merge
* Code enhancements to feature - Sysadmin manage user settings (#27636) (#27680)
Automatic Merge
* MM-58847 Sanitize User (#27471) (#27682)
Automatic Merge
* fix wrong property set (#27625) (#27690)
Automatic Merge
* [MM-59296] Can't open web client on iOS Safari (#27607) (#27697)
Automatic Merge
* Updated minimum supported Edge and Chrome versions (#27691) (#27698)
Automatic Merge
* MM-58772 Fix counter metrics not using Date.now (#27702) (#27731)
(cherry picked from commit a773e6828cdadf6877c0cbc0fbf277a9f1175e74)
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* [MM-59825] Fix linter error found by updated govet (#27715) (#27748)
Automatic Merge
* Update prepackage calls to v0.29.1 for MM v9.11 (#27706) (#27741)
Automatic Merge
* MM-59835: Prevent unnecessary channel bookmarks request causing console 404 (#27745) (#27749)
Automatic Merge
* MM-59026: Update reserved IP ranges (#27751) (#27767)
Automatic Merge
* Fixed bug around channel file sidebar (#27705) (#27770)
* Fixed the issue for DB layer, ES to go
* Handled channel bookmarks
* Handled Bleve
* Lint fix
* Added channel bookmark test
* Skip bleve test
* Used common function
* SKipping ES as indexing logic in unavailable in test
(cherry picked from commit eb6336ce7a34f84e0787e8bf438b042f2d206d73)
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
* MM-57354: Fix elastic search e2e tests (#27670) (#27799)
Automatic Merge
* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel (#27409) (#27815)
* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel
* Fix lint, add ChannelId to uploads
* Fix MMCTL tests and remove unnecessary check for the error message that doesn't work anyways
* Include channel map for getting flagged posts
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit aa85a13c8f0d6a5cfd24f90e7b529076055d2638)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Update latest patch version to 9.11.1 (#27844)
Automatic Merge
* CLD-5783 Implement rolling upgrade tests (#27842) (#27865)
* Make server.prepare idempotent, don't cleanup containers on server.start
* Implement rolling upgrade E2E tests
* Apply Akis' suggestions from code review
* Apply Saturn's suggestions from review
* Communicate RollingRelease on GHA and test automation results channel
* Implement E2E test case versioning for rolling release tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
(cherry picked from commit 39ca104688d634d794d31ffea3f372057d1400f5)
Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
* [MM-58492] Remove subsequent check for team permissions on open channels (#27827) (#27866)
* [MM-58492] Remove subsequent check for team permissions on open channels
* Removed extra check for open channel for webhooks as well
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 6ae03a098e5c4ebdecec7ef58b6d270ce840ccc2)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Cleanup post embed for WebSocket payload (#27763) (#27878)
Automatic Merge
* MM-58793 Apply EnableUserCreation to signup.tsx (#27692) (#27974)
Automatic Merge
* Automated cherry pick of #27903 (#27977)
* [MM-60026] Add playbooks <v2 in the transitionaslly packaged list (#27903)
(cherry picked from commit 5f19d8513b6253cc6d641712c04d9da843c01773)
* add missing method and variable
---------
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Julien Tant <julien@craftyx.fr>
* CLD-7841 Optimize E2E testing costs (#27883) (#27997)
Automatic Merge
* Update latest patch version to 9.11.2 (#28021)
Automatic Merge
* Added User Survey Plugin to prepackaged plugins (#28031)
Automatic Merge
* [MM-58549] Desktop login (#27732) (#28071)
Automatic Merge
* bump prepackaged playbooks versions (#28026) (#28075)
Automatic Merge
* MM-58529 Fix for AdditionalValues in SystemConsole (#27614) (#28147)
Automatic Merge
* Add SBOM generation on release (#27733) (#28149)
Automatic Merge
* Use Reusable SBOM Workflow (#28161) (#28171)
Automatic Merge
* [MM-59069] Make sure OTP are actual One Time Password (#28074) (#28223)
Automatic Merge
* Add MobileExternalBrowser to client config (#28180) (#28228)
Automatic Merge
* MM-60240 Sanitize Channels based on user permissions (#28086) (#28231)
Automatic Merge
* Prepackage Calls v0.29.2 (#28236)
Automatic Merge
* Automated cherry pick of #28195 (#28252)
* [MM-60307] Fix racy use of session in NewWebConn (#28195)
(cherry picked from commit 40d2ae97f1b1a5fab53ba3933860fd08f2a03c29)
* Check if session is nil before calling UpdateLastActivityAtIfNeeded
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Checkout latest stable pgloader release (#28251) (#28258)
Automatic Merge
* Bump yuin/goldmark to v1.7.4 (#28267)
* Manual cherry pick of #28270 on release-9.11 (#28307)
Automatic Merge
* [MM-60307] Check if session is nil before calling UpdateLastActivityAtIfNeeded (#28254) (#28321)
(cherry picked from commit 20ed58906adcc1405cb13690b2a02bf27241d273)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Update latest patch version to 9.11.3 (#28327)
Automatic Merge
* add reuse check on update MFA (#28304) (#28338)
Automatic Merge
* MM-60351 Use oEmbed for YouTube links (#28312) (#28374)
Automatic Merge
* cherry pick of #28065 (#28487)
* Automated cherry pick of #28300 (#28576)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Enhance reporting, add shellcheck (#28240) (#28665)
* Enhance reporting, add shellcheck
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 60b38bb91a839654317fca62001f11d788093d8d)
Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
* Update latest patch version to 9.11.4 (#28686)
Automatic Merge
* MM-60722 - don't allow multiple '@' in email (#28481) (#28799)
Automatic Merge
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership (#27846) (#28915)
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership
* Fix redundant JSON serializing
(cherry picked from commit 90884172ae6920a5843694efe40b5101680585be)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Update latest patch version to 9.11.5 (#28991)
Automatic Merge
* Prepackage Calls v0.29.3 (#28982)
* [MM-61213] Limit file size for slack import file uploads (#28904) (#28996)
Automatic Merge
* [MM-37585] (#28634) (#29117)
Automatic Merge
* Prepackage Calls v0.29.4 (#29231)
Automatic Merge
* Update latest patch version to 9.11.6 (#29271)
Automatic Merge
* MM-59540 Ensure user has invite team permission in order to change setting (#28670) (#29383)
Automatic Merge
* Prevent HEAD requests to a sub-path from infinite redirects (#28285) (#29384)
Automatic Merge
* Add post props validation (#29017) (#29394)
Automatic Merge
* MM-61297 - remove unused code (#29354) (#29410)
Automatic Merge
* Fix MM-61710 (#29248) (#29420)
Automatic Merge
* Prepackage Calls v0.29.5 (#29455)
Automatic Merge
* Fix server update message not handling mutli-digit version numbers (#29436) (#29469)
Automatic Merge
* Prepackage Calls v0.29.6 (#29480)
* Update latest patch version to 9.11.7 (#29536)
Automatic Merge
* [MM-62086] Don't include deleted DMs/GMs when returning archived channels (#29572) (#29598)
* MM-59952/MM-61438 Fix web app not responding to WS events for status (#29371) (#29622)
* MM-59952/MM-61438 Fix web app not responding to WS events for status
* Add E2E tests
* httpservice: improve validation of proxied URLs (#29600) (#29762)
Automatic Merge
* MM-62188 - Revoke user sessions when converted to bot (#29573) (#29752)
Automatic Merge
* Bugfix - Enforce URL length check in LinkMetadata before attempting to insert to database (#29589) (#29794)
Automatic Merge
* fixed issue where it automatically scroll to top when custom emoji are loaded (#29608) (#29824)
Automatic Merge
* Update latest patch version to 9.11.8 (#29863)
Automatic Merge
* Use "transform: scale" to resize emoticons, and "zoom" when supported (#29276) (#29885)
Automatic Merge
* fix merge conflict (#29912)
Automatic Merge
* Prepackage Calls v0.29.7 (#29951)
Automatic Merge
* Updated board prepackaged version to v9.0.5 (#29966)
* [MM-60888] Fix: Retention can cause unrelated files to be deleted (#29897) (#29971)
Automatic Merge
* [MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update latest patch version to 9.11.9 (#29981)
Automatic Merge
* restrict access to channel converstion to public for non team admin+ (#29819) (#30000)
Automatic Merge
* Updated board prepackaged version to v9.0.6 (#30010)
* [MM-62515] Fix: Compliance exports fail when missing s3 file attachment (#29936)
* Permission changes (#29570) (#30024)
Automatic Merge
* Cherry pick of #29880 to v9.11 (#30035)
Automatic Merge
* MM-62500 - Apply Delete check on commands (#29896) (#30067)
Automatic Merge
* Prompt Team Admin before joining private channel (#29955) (#30068)
Automatic Merge
* Upgraded boards prepackaged version to v9.1.0 (#30076)
Automatic Merge
* MM-61751 -Enforce permissions on role detail form. (#29361) (#30113)
Automatic Merge
* Upgraded board version to v9.1.1 (#30153)
Automatic Merge
* MM-62862: CP: Bump dependencies (x/net/html) (#30176)
https://mattermost.atlassian.net/browse/MM-62862
```release-note
NONE
```
* Bump katex for release 9.11 (#30192)
Automatic Merge
* [Cherry-pick] [AI assisted]: MM-62914: Added MFA authentication for plugin requests as well (#30160) (#30238)
* [Cherry-pick] [AI assisted]: MM-62914: Added MFA authentication for plugin requests as well (#30160)
We wipe the token if MFA authentication is enabled. Also added a test case
to lock in the functionality.
https://mattermost.atlassian.net/browse/MM-62914
```release-note
NONE
```
* fix issues
```release-note
NONE
```
* server/Makefile: pin dbcmp (#30245) (#30248)
(cherry picked from commit 3da6e7a75dd2151380945aa9193d7329088fcb97)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* MM-62050: restrict channel bookmarks in archived channels (#29490) (#30229)
* v9.11 cherry-pick of MM-62191 (#30264)
Automatic Merge
* Update latest patch version to 9.11.10 (#30272)
Automatic Merge
* MM-62371 Add additional error handling to PerformanceReporter (#29774) (#30278)
Automatic Merge
* MM-61375: Update file handling for bookmarks (#30034) (#30283)
Automatic Merge
* [AI assisted] MM-62837: (#30268) (#30288)
Automatic Merge
* MM-63195: Enforce MFA requirement for non-self requests (#30290) (#30302)
Automatic Merge
* Fix for draft and scheduled post section not scrolling (#29811) (#30307)
Automatic Merge
* MM-62760 - Allow Team Admins to view team email (#30170) (#30328)
Automatic Merge
* [MM-62687] Patch permission check to avoid modifying the system admin (#30292) (#30351)
Automatic Merge
* MM-62866 Update axios dependency (#30265) (#30316)
* MM-62866 Update axios dependency (#30265)
* Further mess with the lockfile
* Backport additional change from #28999 to fix build
* [MM-62798][MM-63193] Restrict channel permissions on archived channels when viewing archived channels is disabled (#30314) (#30378)
Automatic Merge
* Prepackage Calls v0.29.8 (#30436)
* Update latest patch version to 9.11.11 (#30499)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* Update playbooks to v1.41.0 (#30516)
* MM-63350 Add tests for inviting guest users to teams (#30448) (#30527)
* MM-63350 Add tests for inviting guest users to teams
* Fix style issue
* Fix one more issue
* Update latest patch version to 9.11.12 (#30555)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-61707 release-9.11 (#30560)
* conflicts
* layers
* cherry pick and fix conflicts (#30652)
* [MM-63693] Don't log PING websocket events (#30669) (#30706)
(cherry picked from commit f53625d59f9d1a80ae72911d21e5dee63cff283d)
Co-authored-by: David Krauser <david@krauser.org>
* Update latest patch version to 9.11.13 (#30751)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* [MM-63480] Remove user cache early when deactivating user (#30571) (#30660)
* remove user cache early when deactivating user
* add e2e test
* fix test style
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63590 - validate user has proper permission when updating team privacy (#30650) (#30762)
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 02c76784380acb6802601bd24c205553b9a5a1be)
Co-authored-by: Pablo Vélez <pablovv2012@gmail.com>
* MM-63342:Bot accounts OAuth gating (#30466) (#30766)
(cherry picked from commit 04676582cdd26f4fdfa78fcf60a7f8745e6b27f5)
Co-authored-by: catalintomai <56169943+catalintomai@users.noreply.github.com>
* MM-63316: Guest access to channel (#30467) (#30768)
(cherry picked from commit c23f44fe8ed02f71d506f99adc30ad34c58c89d1)
Co-authored-by: catalintomai <56169943+catalintomai@users.noreply.github.com>
* MM-63378: Test and fix permission issues with System Manager team access (#30672) (#30770)
* test PermissionView semantics
* change required ancillary permissions
`PermissionSysconsoleReadReportingTeamStatistics` doesn't strictly need `PermissionViewTeam`, but can work with whatever teams the user has access to.
* remove unnecessary timeouts
* remove redundant comment
* update snapshots
* Update e2e-tests/playwright/specs/functional/system_console/permissions/team_access.spec.ts
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 6f33b721de76b39a7714bfe0d5e9c1306869a3e3)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* [MM-63436] Cherry-pick to `release-9.11` (#30811)
* [MM-63436] Replace Exif parser dependency (#30479)
* Replace Exif parser dependency
* Improve forward seeking logic
* Fix linting
* Stop decoding upon finding tag
* Use latest version of imagemeta dependency
* Don't skip TIFF reader tests
* Log improvements
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update layers
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update latest patch version to 9.11.14 (#30869)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-63791: guest permissions to teams (#30789) (#30874)
* improve th.CreateGuestAndClient
* test coverage for guest user access to teams
* restrict guest access to public teams unless a member
(cherry picked from commit 701ddc896a107b13f457fbdbe229bce5019fc516)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* MM-62930: Add validation of LDAP attribute values. (#30419) (#30823)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Revert "[MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)" (#30939)
This reverts commit 968fc9abd56d51d32880bca2f7cbcdff8c1af68c.
* Update latest patch version to 9.11.15 (#30940)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* [CP] MM-63756: Added index to sidebarchannels table (#30724) (#30932)
The (s SqlChannelStore) getSidebarCategoriesT gets called quite frequently.
- Team switch
- WS reconnect
- Category created
- Category updated
- Category deleted
Of these 1 and 2 are probably the most commonly called sources. Based on that,
the sidebarChannels table is not that well-optimized. Even though
the query time might be reasonable, without an index, it has to churn a lot of
DB CPU for a sequential scan.
We add a new index to optimize this.
CREATE INDEX idx_sidebarchannels_categoryid ON sidebarchannels(categoryid);
```
Before:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=40854.18..40854.19 rows=4 width=193) (actual time=251.635..251.646 rows=204 loops=1)
Sort Key: sidebarcategories.sortorder, sidebarchannels.sortorder
Sort Method: quicksort Memory: 65kB
Buffers: shared hit=1203 read=23668
-> Nested Loop (cost=8.87..40854.14 rows=4 width=193) (actual time=251.345..251.455 rows=204 loops=1)
Buffers: shared hit=1203 read=23668
-> Nested Loop (cost=0.41..9.47 rows=1 width=54) (actual time=0.068..0.074 rows=1 loops=1)
Buffers: shared hit=5
-> Seq Scan on teams (cost=0.00..1.03 rows=1 width=27) (actual time=0.024..0.026 rows=1 loops=1)
Filter: (((id)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1
-> Index Scan using teammembers_pkey on teammembers (cost=0.41..8.43 rows=1 width=27) (actual time=0.039..0.043 rows=1 loops=1)
Index Cond: (((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (deleteat = 0)
Buffers: shared hit=4
-> Hash Right Join (cost=8.45..40844.62 rows=4 width=193) (actual time=251.274..251.361 rows=204 loops=1)
Hash Cond: ((sidebarchannels.categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=1198 read=23668
-> Seq Scan on sidebarchannels (cost=0.00..37514.77 rows=1265277 width=100) (actual time=0.043..99.345 rows=1265444 loops=1)
Buffers: shared hit=1194 read=23668
-> Hash (cost=8.44..8.44 rows=1 width=158) (actual time=0.047..0.047 rows=6 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 10kB
Buffers: shared hit=4
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=158) (actual time=0.029..0.037 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
Planning:
Buffers: shared hit=9
Planning Time: 1.215 ms
Execution Time: 251.755 ms
(31 rows)
After:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=1544.53..1544.54 rows=4 width=192) (actual time=0.834..0.859 rows=204 loops=1)
Sort Key: sidebarcategories.sortorder, sidebarchannels.sortorder
Sort Method: quicksort Memory: 65kB
Buffers: shared hit=58
-> Nested Loop Left Join (cost=8.53..1544.49 rows=4 width=192) (actual time=0.066..0.252 rows=204 loops=1)
Buffers: shared hit=58
-> Nested Loop (cost=0.83..17.93 rows=1 width=157) (actual time=0.042..0.098 rows=6 loops=1)
Buffers: shared hit=34
-> Nested Loop (cost=0.42..9.48 rows=1 width=157) (actual time=0.030..0.049 rows=6 loops=1)
Buffers: shared hit=10
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=157) (actual time=0.018..0.022 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
-> Seq Scan on teams (cost=0.00..1.03 rows=1 width=27) (actual time=0.002..0.003 rows=1 loops=6)
Filter: (((id)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=6
-> Index Scan using teammembers_pkey on teammembers (cost=0.41..8.43 rows=1 width=27) (actual time=0.007..0.007 rows=1 loops=6)
Index Cond: (((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (deleteat = 0)
Buffers: shared hit=24
-> Bitmap Heap Scan on sidebarchannels (cost=7.69..1522.35 rows=421 width=100) (actual time=0.012..0.017 rows=34 loops=6)
Recheck Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Heap Blocks: exact=6
Buffers: shared hit=24
-> Bitmap Index Scan on idx_sidebarchannels_categoryid (cost=0.00..7.58 rows=421 width=0) (actual time=0.010..0.010 rows=34 loops=6)
Index Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=18
Planning:
Buffers: shared hit=18
Planning Time: 0.543 ms
Execution Time: 0.968 ms
(32 rows)
```
I have also looked at potentially re-ordering the JOINs to make
sidebarchannels and sidebarcategories JOIN earlier, but that didn't give
a major benefit.
Also looked at adding a compound index with (categoryid, sortorder) to improve
sorting performance, but that didn't give a major benefit from what the single
column index already gives.
The `completePopulatingCategoryChannelsT` query also partially benefits
from this. But the Postgres optimizer sometimes selects the index on categoryId
and sometimes on ChannelId, both giving equivalent performance. So there's no major
improvement there, but at the same time, no regression as well.
```
Original:
[bigdb] # EXPLAIN (ANALYZE, BUFFERS) SELECT Id FROM ChannelMembers LEFT JOIN Channels ON Channels.Id=ChannelMembers.ChannelId WHERE (ChannelMembers.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND Channels.Type IN ('D'
,'G') AND Channels.DeleteAt = 0 AND NOT EXISTS ( SELECT 1 FROM SidebarChannels JOIN SidebarCategories on SidebarChannels.CategoryId=SidebarCategories.Id WHERE (SidebarChannels.ChannelId = ChannelMembers.ChannelI
d AND SidebarCategories.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND SidebarCategories.TeamId = '3ee5y5ok6jgxicrmqstdnghmfr') )) ORDER BY DisplayName ASC;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=5864.68..5865.84 rows=463 width=40) (actual time=9.008..9.022 rows=39 loops=1)
Sort Key: channels.displayname
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=2112
-> Nested Loop Anti Join (cost=1.96..5844.18 rows=463 width=40) (actual time=0.188..8.932 rows=39 loops=1)
Buffers: shared hit=2112
-> Nested Loop (cost=0.99..3476.66 rows=463 width=67) (actual time=0.159..7.952 rows=39 loops=1)
Buffers: shared hit=1956
-> Index Only Scan using idx_channelmembers_user_id_channel_id_last_viewed_at on channelmembers (cost=0.56..40.78 rows=470 width=27) (actual time=0.036..0.467 rows=437 loops=1)
Index Cond: (userid = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Heap Fetches: 45
Buffers: shared hit=208
-> Memoize (cost=0.43..7.69 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=437)
Cache Key: channelmembers.channelid
Cache Mode: logical
Hits: 0 Misses: 437 Evictions: 0 Overflows: 0 Memory Usage: 42kB
Buffers: shared hit=1748
-> Index Scan using channels_pkey on channels (cost=0.42..7.68 rows=1 width=40) (actual time=0.015..0.015 rows=0 loops=437)
Index Cond: ((id)::text = (channelmembers.channelid)::text)
Filter: ((type = ANY ('{D,G}'::channel_type[])) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1748
-> Nested Loop (cost=0.97..5.10 rows=1 width=27) (actual time=0.023..0.023 rows=0 loops=39)
Buffers: shared hit=156
-> Index Only Scan using sidebarchannels_pkey on sidebarchannels (cost=0.55..4.56 rows=1 width=92) (actual time=0.022..0.022 rows=0 loops=39)
Index Cond: (channelid = (channelmembers.channelid)::text)
Heap Fetches: 0
Buffers: shared hit=156
-> Index Scan using sidebarcategories_pkey on sidebarcategories (cost=0.42..0.48 rows=1 width=65) (never executed)
Index Cond: ((id)::text = (sidebarchannels.categoryid)::text)
Filter: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Planning:
Buffers: shared hit=48 dirtied=1
Planning Time: 2.222 ms
Execution Time: 9.142 ms
(35 rows)
New:
[bigdb] # EXPLAIN (ANALYZE, BUFFERS) SELECT Id FROM ChannelMembers LEFT JOIN Channels ON Channels.Id=ChannelMembers.ChannelId WHERE (ChannelMembers.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND Channels.Type IN ('D'
,'G') AND Channels.DeleteAt = 0 AND NOT EXISTS ( SELECT 1 FROM SidebarChannels JOIN SidebarCategories on SidebarChannels.CategoryId=SidebarCategories.Id WHERE (SidebarChannels.ChannelId = ChannelMembers.ChannelId AND SidebarCategories.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND SidebarCategories.TeamId = '3ee5y5ok6jgxicrmqstdnghmfr') )) ORDER BY DisplayName ASC;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=5059.95..5061.11 rows=463 width=40) (actual time=12.072..12.086 rows=39 loops=1)
Sort Key: channels.displayname
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=1984
-> Nested Loop Anti Join (cost=9.10..5039.45 rows=463 width=40) (actual time=0.751..12.009 rows=39 loops=1)
Join Filter: ((sidebarchannels.channelid)::text = (channelmembers.channelid)::text)
Rows Removed by Join Filter: 7839
Buffers: shared hit=1984
-> Nested Loop (cost=0.99..3476.66 rows=463 width=67) (actual time=0.161..7.579 rows=39 loops=1)
Buffers: shared hit=1956
-> Index Only Scan using idx_channelmembers_user_id_channel_id_last_viewed_at on channelmembers (cost=0.56..40.78 rows=470 width=27) (actual time=0.036..0.449 rows=437 loops=1)
Index Cond: (userid = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Heap Fetches: 45
Buffers: shared hit=208
-> Memoize (cost=0.43..7.69 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=437)
Cache Key: channelmembers.channelid
Cache Mode: logical
Hits: 0 Misses: 437 Evictions: 0 Overflows: 0 Memory Usage: 42kB
Buffers: shared hit=1748
-> Index Scan using channels_pkey on channels (cost=0.42..7.68 rows=1 width=40) (actual time=0.014..0.014 rows=0 loops=437)
Index Cond: ((id)::text = (channelmembers.channelid)::text)
Filter: ((type = ANY ('{D,G}'::channel_type[])) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1748
-> Materialize (cost=8.11..1535.03 rows=4 width=27) (actual time=0.003..0.046 rows=201 loops=39)
Buffers: shared hit=28
-> Nested Loop (cost=8.11..1535.01 rows=4 width=27) (actual time=0.099..0.383 rows=201 loops=1)
Buffers: shared hit=28
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=65) (actual time=0.047..0.057 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
-> Bitmap Heap Scan on sidebarchannels (cost=7.69..1522.35 rows=421 width=92) (actual time=0.028..0.040 rows=34 loops=6)
Recheck Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Heap Blocks: exact=6
Buffers: shared hit=24
-> Bitmap Index Scan on idx_sidebarchannels_categoryid (cost=0.00..7.58 rows=421 width=0) (actual time=0.023..0.023 rows=34 loops=6)
Index Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=18
Planning:
Buffers: shared hit=51
Planning Time: 2.240 ms
Execution Time: 12.210 ms
(42 rows)
```
Analysis on MySQL for completion:
```
Before:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Sort: SidebarCategories.SortOrder, SidebarChannels.SortOrder (actual time=277.675..277.675 rows=4 loops=1)
-> Stream results (cost=138558.36 rows=1287808) (actual time=242.506..277.650 rows=4 loops=1)
-> Left hash join (<hash>(SidebarChannels.CategoryId)=<hash>(SidebarCategories.Id)), extra conditions: (SidebarChannels.CategoryId = SidebarCategories.Id) (cost=138558.36 rows=1287808) (actual time=242.498..277.626 rows=4 loops=1)
-> Index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='qdggj9pyobgkjpj8htwzizks1r', TeamId='xmh7bupzajnudqf3h4mm76qapy') (cost=1.40 rows=4) (actual time=0.092..0.094 rows=4 loops=1)
-> Hash
-> Table scan on SidebarChannels (cost=8394.55 rows=321952) (actual time=0.123..106.334 rows=300002 loops=1)
|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After:
----------------------------------------------------------------+
| -> Sort: SidebarCategories.SortOrder, SidebarChannels.SortOrder (actual time=0.739..0.742 rows=4 loops=1)
-> Stream results (cost=6.80 rows=7) (actual time=0.468..0.703 rows=4 loops=1)
-> Nested loop left join (cost=6.80 rows=7) (actual time=0.456..0.673 rows=4 loops=1)
-> Index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='qdggj9pyobgkjpj8htwzizks1r', TeamId='xmh7bupzajnudqf3h4mm76qapy') (cost=4.38 rows=4) (actual time=0.302..0.313 rows=4 loops=1)
-> Index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=0.48 rows=2) (actual time=0.085..0.087 rows=0 loops=4)
|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```
Timing wise, it takes around 2s to add the index on a table with 1.2M rows
for Postgres. And it takes around 5s on MySQL on a table with 300K rows.
It looks like it takes longer on MySQL, but since both migrations are
non-locking, it should be fine.
https://mattermost.atlassian.net/browse/MM-63756
```release-note
NONE
```
* MM-64209: Optimize completePopulatingCategoryChannelsT for MySQL (#30963) (#30967)
For our MySQL customers, we have discovered that the query is not
able to choose the right plan by itself without adequate hints.
This is only for MySQL as we have confirmed from multiple customers
that Postgres takes the right index idx_sidebarcategories_userid_teamid
for the sidebarCategories table. And if it doesn't, then a VACUUM ANALYZE
fixes it.
But for MySQL, we have to do two things:
- Pass an index hint to let it use idx_sidebarcategories_userid_teamid.
- Pass an optimizer hint to materialize the sub-query. This is used
to materialize the doesNotHaveSidebarChannel sub-query into a temporary
table, letting MySQL reuse the contents of the table for further processing
in the parent sections of the query.
I have confirmed both locally and in the customer environment
that it gives a clear benefit.
*LOCAL*
OLD:
```
| -> Nested loop antijoin (cost=2889.85 rows=19767) (actual time=3.355..38.033 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.410..1.689 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.394..0.886 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.389..0.793 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.003 rows=1 loops=220)
-> Nested loop inner join (cost=4967.50 rows=180) (actual time=0.165..0.165 rows=1 loops=220)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=Channels.Id) (cost=7.86 rows=180) (actual time=0.055..0.062 rows=13 loops=220)
-> Filter: ((SidebarCategories.TeamId = 'team01') and (SidebarCategories.UserId = 'user000')) (cost=44.93 rows=1) (actual time=0.008..0.008 rows=0 loops=2881)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=SidebarChannels.CategoryId) (cost=44.93 rows=1) (actual time=0.006..0.006 rows=1 loops=2881)
|
```
NEW:
```
| -> Nested loop antijoin (cost=5879.73 rows=58021) (actual time=1.544..3.135 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.421..1.778 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.405..0.945 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.400..0.859 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.004 rows=1 loops=220)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=Channels.Id) (cost=130.37..130.37 rows=1) (actual time=0.006..0.006 rows=1 loops=220)
-> Materialize with deduplication (cost=130.35..130.35 rows=527) (actual time=1.118..1.118 rows=205 loops=1)
-> Filter: (SidebarChannels.ChannelId is not null) (cost=77.61 rows=527) (actual time=0.059..0.851 rows=523 loops=1)
-> Nested loop inner join (cost=77.61 rows=527) (actual time=0.058..0.786 rows=523 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='user000', TeamId='team01') (cost=2.81 rows=15) (actual time=0.025..0.031 rows=15 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=1.70 rows=35) (actual time=0.032..0.046 rows=35 loops=15)
```
Performance improvement from 38ms to 3ms.
*CUSTOMER ENV* (with sensitive data wiped off)
OLD:
```
| -> Sort: channels.DisplayName (actual time=512..512 rows=5 loops=1)
-> Stream results (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop antijoin (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.025..0.0878 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0146..0.023 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00999..0.0102 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.00778..0.00785 rows=1 loops=6)
-> Nested loop inner join (cost=2.85 rows=4.81) (actual time=102..102 rows=0 loops=5)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=channelmembers.ChannelId) (cost=2.01 rows=4.81) (actual time=0.0125..13.8 rows=24134 loops=5)
-> Filter: ((sidebarcategories.TeamId = '') and (sidebarcategories.UserId = '')) (cost=1.54 rows=1) (actual time=0.00359..0.00359 rows=0 loops=120671)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=sidebarchannels.CategoryId) (cost=1.54 rows=1) (actual time=0.00316..0.00319 rows=1 loops=120671)
```
NEW:
```
Here is the output
| -> Sort: channels.DisplayName (actual time=0.12..0.12 rows=5 loops=1)
-> Stream results (cost=3.45 rows=4.01) (actual time=0.0797..0.11 rows=5 loops=1)
-> Nested loop antijoin (cost=3.45 rows=4.01) (actual time=0.0769..0.106 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.0291..0.0555 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0145..0.0162 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00611..0.00619 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.0053..0.00534 rows=1 loops=6)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=channelmembers.ChannelId) (cost=7.01..7.01 rows=1) (actual time=0.00956..0.00956 rows=0 loops=5)
-> Materialize with deduplication (cost=7..7 rows=13.4) (actual time=0.0451..0.0451 rows=0 loops=1)
-> Filter: (sidebarchannels.ChannelId is not null) (cost=5.66 rows=13.4) (actual time=0.0441..0.0441 rows=0 loops=1)
-> Nested loop inner join (cost=5.66 rows=13.4) (actual time=0.0439..0.0439 rows=0 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='', TeamId='') (cost=0.592 rows=3) (actual time=0.0105..0.0134 rows=3 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=sidebarcategories.Id) (cost=1.39 rows=4.46) (actual time=0.00999..0.00999 rows=0 loops=3)
```
Performance improvement from 512ms to 0.12ms.
https://mattermost.atlassian.net/browse/MM-64209
```release-note
NONE
```
(cherry picked from commit 0ebd3e808507d948b1ef83425b2f05723e1102c1)
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
* Revert "Revert "[MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)" (#30939)" (#30964)
This reverts commit 97e6d3231a80107e0c9098f22617900d78c3a1c8.
* Update latest patch version to 9.11.16 (#30973)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* Fix potential nil dereference in app.isChannelArchivedAndHidden (#30628) (#30987)
(cherry picked from commit 7250095f861772bee5204874793cab484fd82c3d)
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
* MM-64336: simplify doc extractor (#31103) (#31109)
* MM-64336: simplify doc extractor
Avoid creating a whole temporary directory when a single temporary file suffices.
Fixes: https://mattermost.atlassian.net/browse/MM-64337
* clarify -* semantics
(cherry picked from commit 65aec10162f612d98edf91cc66bf7e781868448b)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* Update latest patch version to 9.11.17 (#31143)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-64226: improved post deduplication (#31004) (#31217)
Require access to a post before allowing PendingPostId to deduplicate.
Fixes: https://mattermost.atlassian.net/browse/…
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/en_AU/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.0% (349 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (2507 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.0% (350 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (5772 of 5772 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 0.9% (24 of 2509 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nb_NO/
* Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/
* [MM-58516] Migrate tooltips of "components/search/user_guide_dropdown/user_guide_dropdown.tsx" to WithTooltip (#27248)
* [MM-58512] Migrate tooltips of "components/status_dropdown/status_dropdown.tsx" to WithTooltip (#27246)
* [MM-59059] Re enable markdown preview for channel header in user advanced settings (#27440)
* MM-58255 Ensure remote users do not get valid email addresses (#27421)
* remote users don't get valid email addresses; remote users cannot have access tokens
* block notification emails for remote users
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58802 Fix overlapping back button (#27394)
* fix overlapping back button
* css tweak
* use classNames utility
* fixed import order
* CLD-5704 Migrate daily master/cloud tests (#27393)
* [skip ci] Support Cloud/daily tests and Zephyr integration
* [skip ci] Fix workflow file
* [skip ci] Fix typo in workflow input name
* Fix cloud variable passing
* [skip ci] Fix typo
* Utilize master branch image for daily tests
* Apply Saturn's suggestion, fixes and improvements
* update for adding multiple members (#25128)
* update for adding multiple members
* fix unit test
* more test fixes
* add another unit test
* fix object passed by client4
* revert package-lock.json
* revert package-lock.json
* add length check
* limit size of lists in API requests
* revert package-lock
* add batching to front end
* add batching to front end
* fix bad merge
* update return type
* remove unnecessary permisssion check, add unit test
* fixes and add tests from review
* revert changes adding limits to other apis
* fixes
* clean-up from code review
* fix unit test call
* revert back to interface{}, fix unit test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58777 Confirm that sendBeacon exists before trying to use it (#27458)
* migrate tooltips of file_preview_modal_main_actions.tsx to WithTooltip (#27243)
* Change: Use WithTooltip instead of OverlayTrigger on filename_overlay (#27439)
* MM-58411 Migrate tooltips of 'components/actions_menu/actions_menu' to WithTooltip (#27238)
* Added console log for draft PR
* Replaced tooltip component with changes
* Updated snapshot for tests
* Updated title to use FormattedMessage
* Remove defineMessages
* Fix style
* Removed unused tooltip
---------
Co-authored-by: ezekiel <ezekiel@itsmart.my>
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-58408] Migrate tooltips of 'components/file_preview_modal/file_preview_modal_main_nav/file_preview_modal_main_nav' to WithTooltip (#27422)
* Change PerformanceReporter tests to not check exact values for timestamps (#27459)
* [MM-58409] Migrate tooltips of 'components/file_preview_modal/popover_bar/popover_bar' to WithTooltip (#27447)
* MM-58755 - Fixing inproduct notices spacing (#27442)
* MM-58755 - Fixing inproduct notices spacing
* Updating compass modal
* Updating test
* Bubble up parsing error from en.json (#27362)
Running `make i18n-extract` on a en.json file
with bad JSON will just wipe off all keys instead
of throwing the error. This is very confusing
and can lead to a lot of time wasted because
there's no indication that the JSON is incorrect.
Fixing this.
```release-note
NONE
```
* Sanitize RemoteEmail user prop (#27170)
* Sanitize RemoteEmail user prop
If the server is configured to hide user emails, the "RemoteEmail"
user property will be sanitized as well, effectively hiding the real
email of remote users.
* fix merge conflict
---------
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
* require regenerate invite id to have invite permission (#27427)
* [MM-59061] Remove redundant index route for Root.tsx (#27441)
* [MM-59047] Keyboard Shortcuts Modal Improvements (#27443)
* [MM-59064] Close Icon is not in line with toast text of "search this channel" when RHS threads panel is open (#27464)
* Add support packet metadata (#27465)
* removed offending line that hid threads view on mobile (#27428)
Automatic Merge
* chore(deps): pin whatwg-url to 12.0.0+ in /api (#27463)
to suppress warnings from whatwg-url 5.0.0 (through 11.0.0)
on `make build` or `make run` in /api.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Fix concurrency for daily tests (#27480)
* MM-59254 Fix EnableClientMetrics setting being hidden (#27483)
Automatic Merge
* MM-58854 Update how Compass icons are referenced by AnnouncementBar (#27461)
Automatic Merge
* MM-57375: Update to latest minio image (#27475)
* test with latest minio image
* Update the KMS key
- Also use latest config settings. The older ones were deprecated.
* MM-58496 - Updating channel font size (#27445)
* MM-58496 - Updating channel font size
* Updating lineheight
* MM-54416: Channel Bookmarks Web UI (#25889)
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
* [MM-58405] Migrate tooltips of 'components/announcement_bar/default_announcement_bar/announcement_bar' to WithTooltip (#27244)
* Migrate tooltips of 'components/announcement_bar/default_announcement_bar/announcement_bar' to WithTooltip
* Review fixes
* Review fix
* Fix imports
* Update snapshots
* Test fix
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-58509] Migrate tooltips of "components/admin_console/user_grid/user_grid_role_dropdown.tsx" to WithTooltip (#27242)
* chore: update package metadata for API reference (#27462)
* [MM-58840] Add routing restrictions (#27482)
* require Permission to user to mark channels as read (#27468)
* chore(api redoc): remove api/redoc-static.html (#27500)
The orphaned file unexpectedly introduced in the old PR in 2020
can now be removed as it originally is orphaned and not referenced
at all.
- mattermost/mattermost-api-reference PR 503
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Print panic message when mmctl panics (#27390)
* Update latest minor version to 9.11.0 (#27496)
Automatic Merge
* fix panic in migrations (#27494)
* [chore] migration of plugin-store (#27506)
Plugin store is gradually migrated from:
- https://plugins-store.test.mattermost.com
to
- https://plugins.releases.mattermost.com
We reflect that change here
Note: Currently both CDN's are working as expected, to facilitate the mgiration. Upon succesfull migration, https://plugins-store.test.mattermost.com will be decomissioned
* MM-56774: Delete file along with bookmark (#27495)
* [MM-58686] Adjust text alignment on custom status tooltip (#27353)
* Change: Adjust text alignment on custom status tooltip
Change: Update 'Today' expiry time calculation on custom_status_modal
* Change: Use display inline-block instead of flex for custom-status class
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Translations update from Mattermost Weblate (#27507)
* Translated using Weblate (German)
Currently translated at 100.0% (2510 of 2510 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/
* Translated using Weblate (German)
Currently translated at 100.0% (5775 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/
* Translated using Weblate (Polish)
Currently translated at 100.0% (2510 of 2510 strings)
Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/
* Translated using Weblate (Polish)
Currently translated at 100.0% (5775 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/
* Translated using Weblate (Dutch)
Currently translated at 99.9% (5771 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/
* Translated using Weblate (Serbian)
Currently translated at 10.5% (611 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sr/
* Translated using Weblate (Norwegian Bokmål)
Currently translated at 6.3% (369 of 5775 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/
* Translated using Weblate (German)
Currently translated at 100.0% (5801 of 5801 strings)
Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/
---------
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: homerCOD <anicin.goran@gmail.com>
Co-authored-by: Frank Paul Silye <frankps@uio.no>
* MM-58771 - Make manage_server permission, non updatable (#27481)
* make manage_server, non updatable
* remove blank line
* Update ISSUE_TEMPLATE.md (#27538)
Automatic Merge
* [MM-57942] Fix a panic on password is too long (#27449)
* return error from bcrypt, handle gracefully; remove dead code
* linting
* linting
* i18n
* fix test
* fill out translations
* Adds Remote Cluster related API endpoints (#27432)
* Adds Remote Cluster related API endpoints
New endpoints for the following routes are added:
- Get Remote Clusters at `GET /api/v4/remotecluster`
- Create Remote Cluster at `POST /api/v4/remotecluster`
- Accept Remote Cluster invite at `POST
/api/v4/remotecluster/accept_invite`
- Generate Remote Cluster invite at `POST
/api/v4/remotecluster/{remote_id}/generate_invite`
- Get Remote Cluster at `GET /api/v4/remotecluster/{remote_id}`
- Patch Remote Cluster at `PATCH /api/v4/remotecluster/{remote_id}`
- Delete Remote Cluster at `DELETE /api/v4/remotecluster/{remote_id}`
These endpoints are planned to be used from the system console, and
gated through the `manage_secure_connections` permission.
* Update server/channels/api4/remote_cluster_test.go
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
* Fix AppError names
---------
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Skips flaky test on the remote cluster API (#27547)
* Skips flaky test on the remote cluster API
* Adds ticket link to the `t.Skip`
* Revert "Added GetPluginID method and tests (#27281)" (#27540)
This reverts commit 4acc4796edb2c1ff93e861b4732c1c758ac76371.
* [MM-58443] Migrate tooltips of 'components/global_header/right_controls/saved_posts_button/saved_posts_button.tsx' to WithTooltip (#27185)
* add withtooltip handling
* add withtooltip handling
* placed icon inside tooltip
* Update saved_posts_button.tsx
* Update saved_posts_button.tsx
* Update saved_posts_button.test.tsx.snap
* Update saved_posts_button.tsx
---------
Co-authored-by: surajanthwal <surajanthwal2010@gmail.com>
Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update Packet metadata generation based on feedback (#27490)
* Add platform information for push notification metrics (#27460)
* Add platform information for push notification metrics
* Address feedback
* Add the client platform returned by the devices to the normalize function
* Add "no platform" platform label to distinguish from unknown
* Orders results of the GetAll remote clusters store method (#27548)
* MM-57824: Export/import custom status (#27361)
https://mattermost.atlassian.net/browse/MM-57824
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* chore: improvements to keycloak local development (#26518)
* update keycloak docker image
* update realm file with a compatible realm
* import realm on start-docker command
Since bitnami's image does not support importing directly, the import of the test realm is done in the make file start-docker action
* Use official image from quay
* updated realm keycloak config
* final note about nickname attrib for saml
* add admin user
* update realm
* Updated from master
* Updated docs
* local typo
* use jq for ldap and saml
* updated readme
* Correctly merge plugin configuration on mmctl config patch (#26647)
* Adds a step to the config patch command to merge plugin configurations
* Fix linter
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Translations update from Mattermost Weblate (#27586)
Automatic Merge
* [MM-58856] Migrate tooltips of "components/copy_button.tsx" to WithTooltip (#27433)
* [MM-58003] Allow setting AdvancedLoggingJSON via mmctl (#27388)
* [MM-57963] Log Name and DisplayName of groups (#26836)
* [MM-58004] Update logged fields of users (#26860)
* [MM-56339] Audit logs: on login add UserId and SessionId to audit's Actor field (#27446)
* on login add UserId and SessionId to audit's Actor field to match logout
* lint
* simplify to add only userId and sessionId
* AddToEventActor -> AddUser/SessionToEventActor
* fill in missing session data when logging the audit record
* why did it bump that? reverting.
* make modules-tidy
* trigger build
* add more context to the comment
* Bump prepackage Github plugin version to 2.3.0 (#27572)
* Don't modify global variables in TestNoticeValidation (#27591)
* Remove dup stylelint depdendencies in webapp/channels (#27499)
* add hover state to accordions and tweaks styles (#27577)
* MM-58548 Remove manage_team permissions from System Console Ancillary permissions (#27395)
* remove manage team permissions from sysconsole_write_user_management_chanels and sysconsole_write_user_management_groups
* update migrations, add unit tests
* run migrations-extract
* make updating ancillary permissions a post
* update file names
* add new api to doc, update body to just be []string
* revert moving ancillary permissions to post
* fix queries after final testing
* Update channel.go
* Update channel.go
* Update 000124_remove_manage_team_permission.up.sql
* Update 000124_remove_manage_team_permission.up.sql
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58535 Add more information to LCP and INP metrics (#27484)
* Improve mocking of imported resources in unit tests
We have Webpack configured so that, when code imports an image or other resource, the code gets the URL of that image. Jest now matches that behaviour which is needed because React Testing Library would previously throw an error.
* Polyfill ResizeObserver in all unit tests
* Ensure haveIChannelPermission always returns a boolean value
The previous code could sometimes return undefined. While that should behave the same in practice, it can cause React to print prop type warnings
* MM-58535 Add region label to LCP metrics
* MM-58535 Upgrade web-vitals and add INP attribution
* Change new labels to use snake_case
* Remove replaceGlobalStore option from renderWithContext
I was going to add this in case any tests failed with this option set to false, but after running those tests, that's not the case. I'm going to remove this as an option since it seems more likely than not that anyone using RTL would prefer to have this on.
* [MM-56921] Rendered Latex in Codeblock when rendering disabled (#27060)
* Rendered Latex in Codeblock when rendering disabled
* Fixed Lint error
* Removed render function in Latex Component
* Fix errors preventing LatexBlock unit tests from running
* Updated latex disabled test for Codeblock testing
* Fixed latex_block test lint errors
* Removed Latex disabled test Snapshot
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58776 - Change Ancillary Permissions API to POST (#27504)
* make /ancillary a post
* remove get from client, fix tests
* Update permissions.yaml
* Support release testing (#27587)
* Support release testing
* Merge resolve-ref and generate-test-variables jobs
* Update .server/gitignore to ignore all JSON files under the directory (#27593)
* MM-53962: Adding ES8 dependency (#24399)
* Adding ES8 dependency
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58245 Don't allow patching real email or username for remote users (#27613)
* don't allow patching real email or username for remote users
* add comment
* Fix several re-renders on init (#26361)
* Fix several re-renders on init
* Fix tests
* Address feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-58351 Fix showing LHS scrollbar when moving mouse over on chrome and safari (#27160)
* fixing scrollbar not showing when moving mouse over sidebar
* making scrollbar hidden by default and keep shown when hover over channel list
* updating sidebar_list snapshot
* MM-59378 Skip flaky PerformanceReporter test (#27626)
* [MM-58778] Fixing white screen for GM conversion (#27385)
* fixing white screen for GM conversion
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [feat] adding container image scanning (#27624)
Expanding on our ongoing efforts to enhance security, we are integrating container image scanning into the CI pipeline using Wiz.io
https://docs.wiz.io/wiz-docs/docs/github-pipeline
The policy defined, will be providing internal reports in wiz.io for our teams to review. Will not enforcing CI failure at this point.
* Sysadmin manage user settings (#27583)
* Opened modal from system console
* WIP
* WIP
* WIP
* Handled saving user
* Successfully updated user based settings
* WIP
* WIP
* All settings are updating well
* Fixed modal style
* Added admin mode indicators in modal
* Added confirmation dialog
* Lint fixes
* Added license check
* Added permission check
* Fixed i18n file order
* type fix
* Updated snapshots
* Handled performance debugging setting
* Some styling tweaks
* Fixed text alighnment
* Updated license required from professional to enterprise
* Handled long user names
* review fixes
* Added manage setting option in user list page context menu
* Added loader
* Minor reordering
* Removed confirm modal
* Updated snapshots for removed modal
* Added some tests
* Lint fix
* Used new selector in user detail page
* Used new selector in user list page
* Updated tests
* Fixed an incorrect default test
* [fix] ci container image scanning (#27631)
Fixup on https://github.com/mattermost/mattermost/pull/27624
Exposing the tag variable to be used in the scanning step.
Ticket: https://mattermost.atlassian.net/browse/CLD-8041
Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
* Updated required role for user report page GET API (#27529)
* Updated required role for user report page GET API
* Updated permission in error message
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update npm packages versions for release-9.11
* [MM-58750] Update prepackage calls to v0.29.0 for MM v9.11 (#27642) (#27643)
Automatic Merge
* Automated cherry pick of #27571 (#27647)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Automated cherry pick of #27573 (#27651)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Update Copilot plugin prepackaged version to 0.8.3 (#27645) (#27658)
(cherry picked from commit fa8269e4ab0c9e2986ef3dd505363a3bc5ab8a52)
Co-authored-by: Christopher Speller <crspeller@gmail.com>
* chore: Update NOTICE.txt file with updated dependencies (#27655) (#27659)
Automatic Merge
* MM-59416 Don't request notification permissions when we already have them (#27629) (#27672)
Automatic Merge
* MM-59099 Show invalid emoji text with its original case (#27603) (#27673)
Automatic Merge
* [MM-59083] Handle permissions in user management options (#27668) (#27679)
Automatic Merge
* Code enhancements to feature - Sysadmin manage user settings (#27636) (#27680)
Automatic Merge
* MM-58847 Sanitize User (#27471) (#27682)
Automatic Merge
* fix wrong property set (#27625) (#27690)
Automatic Merge
* [MM-59296] Can't open web client on iOS Safari (#27607) (#27697)
Automatic Merge
* Updated minimum supported Edge and Chrome versions (#27691) (#27698)
Automatic Merge
* MM-58772 Fix counter metrics not using Date.now (#27702) (#27731)
(cherry picked from commit a773e6828cdadf6877c0cbc0fbf277a9f1175e74)
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* [MM-59825] Fix linter error found by updated govet (#27715) (#27748)
Automatic Merge
* Update prepackage calls to v0.29.1 for MM v9.11 (#27706) (#27741)
Automatic Merge
* MM-59835: Prevent unnecessary channel bookmarks request causing console 404 (#27745) (#27749)
Automatic Merge
* MM-59026: Update reserved IP ranges (#27751) (#27767)
Automatic Merge
* Fixed bug around channel file sidebar (#27705) (#27770)
* Fixed the issue for DB layer, ES to go
* Handled channel bookmarks
* Handled Bleve
* Lint fix
* Added channel bookmark test
* Skip bleve test
* Used common function
* SKipping ES as indexing logic in unavailable in test
(cherry picked from commit eb6336ce7a34f84e0787e8bf438b042f2d206d73)
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
* MM-57354: Fix elastic search e2e tests (#27670) (#27799)
Automatic Merge
* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel (#27409) (#27815)
* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel
* Fix lint, add ChannelId to uploads
* Fix MMCTL tests and remove unnecessary check for the error message that doesn't work anyways
* Include channel map for getting flagged posts
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit aa85a13c8f0d6a5cfd24f90e7b529076055d2638)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Update latest patch version to 9.11.1 (#27844)
Automatic Merge
* CLD-5783 Implement rolling upgrade tests (#27842) (#27865)
* Make server.prepare idempotent, don't cleanup containers on server.start
* Implement rolling upgrade E2E tests
* Apply Akis' suggestions from code review
* Apply Saturn's suggestions from review
* Communicate RollingRelease on GHA and test automation results channel
* Implement E2E test case versioning for rolling release tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
(cherry picked from commit 39ca104688d634d794d31ffea3f372057d1400f5)
Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
* [MM-58492] Remove subsequent check for team permissions on open channels (#27827) (#27866)
* [MM-58492] Remove subsequent check for team permissions on open channels
* Removed extra check for open channel for webhooks as well
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 6ae03a098e5c4ebdecec7ef58b6d270ce840ccc2)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Cleanup post embed for WebSocket payload (#27763) (#27878)
Automatic Merge
* MM-58793 Apply EnableUserCreation to signup.tsx (#27692) (#27974)
Automatic Merge
* Automated cherry pick of #27903 (#27977)
* [MM-60026] Add playbooks <v2 in the transitionaslly packaged list (#27903)
(cherry picked from commit 5f19d8513b6253cc6d641712c04d9da843c01773)
* add missing method and variable
---------
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Julien Tant <julien@craftyx.fr>
* CLD-7841 Optimize E2E testing costs (#27883) (#27997)
Automatic Merge
* Update latest patch version to 9.11.2 (#28021)
Automatic Merge
* Added User Survey Plugin to prepackaged plugins (#28031)
Automatic Merge
* [MM-58549] Desktop login (#27732) (#28071)
Automatic Merge
* bump prepackaged playbooks versions (#28026) (#28075)
Automatic Merge
* MM-58529 Fix for AdditionalValues in SystemConsole (#27614) (#28147)
Automatic Merge
* Add SBOM generation on release (#27733) (#28149)
Automatic Merge
* Use Reusable SBOM Workflow (#28161) (#28171)
Automatic Merge
* [MM-59069] Make sure OTP are actual One Time Password (#28074) (#28223)
Automatic Merge
* Add MobileExternalBrowser to client config (#28180) (#28228)
Automatic Merge
* MM-60240 Sanitize Channels based on user permissions (#28086) (#28231)
Automatic Merge
* Prepackage Calls v0.29.2 (#28236)
Automatic Merge
* Automated cherry pick of #28195 (#28252)
* [MM-60307] Fix racy use of session in NewWebConn (#28195)
(cherry picked from commit 40d2ae97f1b1a5fab53ba3933860fd08f2a03c29)
* Check if session is nil before calling UpdateLastActivityAtIfNeeded
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Checkout latest stable pgloader release (#28251) (#28258)
Automatic Merge
* Bump yuin/goldmark to v1.7.4 (#28267)
* Manual cherry pick of #28270 on release-9.11 (#28307)
Automatic Merge
* [MM-60307] Check if session is nil before calling UpdateLastActivityAtIfNeeded (#28254) (#28321)
(cherry picked from commit 20ed58906adcc1405cb13690b2a02bf27241d273)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Update latest patch version to 9.11.3 (#28327)
Automatic Merge
* add reuse check on update MFA (#28304) (#28338)
Automatic Merge
* MM-60351 Use oEmbed for YouTube links (#28312) (#28374)
Automatic Merge
* cherry pick of #28065 (#28487)
* Automated cherry pick of #28300 (#28576)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Enhance reporting, add shellcheck (#28240) (#28665)
* Enhance reporting, add shellcheck
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 60b38bb91a839654317fca62001f11d788093d8d)
Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
* Update latest patch version to 9.11.4 (#28686)
Automatic Merge
* MM-60722 - don't allow multiple '@' in email (#28481) (#28799)
Automatic Merge
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership (#27846) (#28915)
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership
* Fix redundant JSON serializing
(cherry picked from commit 90884172ae6920a5843694efe40b5101680585be)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
* Update latest patch version to 9.11.5 (#28991)
Automatic Merge
* Prepackage Calls v0.29.3 (#28982)
* [MM-61213] Limit file size for slack import file uploads (#28904) (#28996)
Automatic Merge
* [MM-37585] (#28634) (#29117)
Automatic Merge
* Prepackage Calls v0.29.4 (#29231)
Automatic Merge
* Update latest patch version to 9.11.6 (#29271)
Automatic Merge
* MM-59540 Ensure user has invite team permission in order to change setting (#28670) (#29383)
Automatic Merge
* Prevent HEAD requests to a sub-path from infinite redirects (#28285) (#29384)
Automatic Merge
* Add post props validation (#29017) (#29394)
Automatic Merge
* MM-61297 - remove unused code (#29354) (#29410)
Automatic Merge
* Fix MM-61710 (#29248) (#29420)
Automatic Merge
* Prepackage Calls v0.29.5 (#29455)
Automatic Merge
* Fix server update message not handling mutli-digit version numbers (#29436) (#29469)
Automatic Merge
* Prepackage Calls v0.29.6 (#29480)
* Update latest patch version to 9.11.7 (#29536)
Automatic Merge
* [MM-62086] Don't include deleted DMs/GMs when returning archived channels (#29572) (#29598)
* MM-59952/MM-61438 Fix web app not responding to WS events for status (#29371) (#29622)
* MM-59952/MM-61438 Fix web app not responding to WS events for status
* Add E2E tests
* httpservice: improve validation of proxied URLs (#29600) (#29762)
Automatic Merge
* MM-62188 - Revoke user sessions when converted to bot (#29573) (#29752)
Automatic Merge
* Bugfix - Enforce URL length check in LinkMetadata before attempting to insert to database (#29589) (#29794)
Automatic Merge
* fixed issue where it automatically scroll to top when custom emoji are loaded (#29608) (#29824)
Automatic Merge
* Update latest patch version to 9.11.8 (#29863)
Automatic Merge
* Use "transform: scale" to resize emoticons, and "zoom" when supported (#29276) (#29885)
Automatic Merge
* fix merge conflict (#29912)
Automatic Merge
* Prepackage Calls v0.29.7 (#29951)
Automatic Merge
* Updated board prepackaged version to v9.0.5 (#29966)
* [MM-60888] Fix: Retention can cause unrelated files to be deleted (#29897) (#29971)
Automatic Merge
* [MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update latest patch version to 9.11.9 (#29981)
Automatic Merge
* restrict access to channel converstion to public for non team admin+ (#29819) (#30000)
Automatic Merge
* Updated board prepackaged version to v9.0.6 (#30010)
* [MM-62515] Fix: Compliance exports fail when missing s3 file attachment (#29936)
* Permission changes (#29570) (#30024)
Automatic Merge
* Cherry pick of #29880 to v9.11 (#30035)
Automatic Merge
* MM-62500 - Apply Delete check on commands (#29896) (#30067)
Automatic Merge
* Prompt Team Admin before joining private channel (#29955) (#30068)
Automatic Merge
* Upgraded boards prepackaged version to v9.1.0 (#30076)
Automatic Merge
* MM-61751 -Enforce permissions on role detail form. (#29361) (#30113)
Automatic Merge
* Upgraded board version to v9.1.1 (#30153)
Automatic Merge
* MM-62862: CP: Bump dependencies (x/net/html) (#30176)
https://mattermost.atlassian.net/browse/MM-62862
```release-note
NONE
```
* Bump katex for release 9.11 (#30192)
Automatic Merge
* [Cherry-pick] [AI assisted]: MM-62914: Added MFA authentication for plugin requests as well (#30160) (#30238)
* [Cherry-pick] [AI assisted]: MM-62914: Added MFA authentication for plugin requests as well (#30160)
We wipe the token if MFA authentication is enabled. Also added a test case
to lock in the functionality.
https://mattermost.atlassian.net/browse/MM-62914
```release-note
NONE
```
* fix issues
```release-note
NONE
```
* server/Makefile: pin dbcmp (#30245) (#30248)
(cherry picked from commit 3da6e7a75dd2151380945aa9193d7329088fcb97)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* MM-62050: restrict channel bookmarks in archived channels (#29490) (#30229)
* v9.11 cherry-pick of MM-62191 (#30264)
Automatic Merge
* Update latest patch version to 9.11.10 (#30272)
Automatic Merge
* MM-62371 Add additional error handling to PerformanceReporter (#29774) (#30278)
Automatic Merge
* MM-61375: Update file handling for bookmarks (#30034) (#30283)
Automatic Merge
* [AI assisted] MM-62837: (#30268) (#30288)
Automatic Merge
* MM-63195: Enforce MFA requirement for non-self requests (#30290) (#30302)
Automatic Merge
* Fix for draft and scheduled post section not scrolling (#29811) (#30307)
Automatic Merge
* MM-62760 - Allow Team Admins to view team email (#30170) (#30328)
Automatic Merge
* [MM-62687] Patch permission check to avoid modifying the system admin (#30292) (#30351)
Automatic Merge
* MM-62866 Update axios dependency (#30265) (#30316)
* MM-62866 Update axios dependency (#30265)
* Further mess with the lockfile
* Backport additional change from #28999 to fix build
* [MM-62798][MM-63193] Restrict channel permissions on archived channels when viewing archived channels is disabled (#30314) (#30378)
Automatic Merge
* Prepackage Calls v0.29.8 (#30436)
* Update latest patch version to 9.11.11 (#30499)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* Update playbooks to v1.41.0 (#30516)
* MM-63350 Add tests for inviting guest users to teams (#30448) (#30527)
* MM-63350 Add tests for inviting guest users to teams
* Fix style issue
* Fix one more issue
* Update latest patch version to 9.11.12 (#30555)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-61707 release-9.11 (#30560)
* conflicts
* layers
* cherry pick and fix conflicts (#30652)
* [MM-63693] Don't log PING websocket events (#30669) (#30706)
(cherry picked from commit f53625d59f9d1a80ae72911d21e5dee63cff283d)
Co-authored-by: David Krauser <david@krauser.org>
* Update latest patch version to 9.11.13 (#30751)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* [MM-63480] Remove user cache early when deactivating user (#30571) (#30660)
* remove user cache early when deactivating user
* add e2e test
* fix test style
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63590 - validate user has proper permission when updating team privacy (#30650) (#30762)
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 02c76784380acb6802601bd24c205553b9a5a1be)
Co-authored-by: Pablo Vélez <pablovv2012@gmail.com>
* MM-63342:Bot accounts OAuth gating (#30466) (#30766)
(cherry picked from commit 04676582cdd26f4fdfa78fcf60a7f8745e6b27f5)
Co-authored-by: catalintomai <56169943+catalintomai@users.noreply.github.com>
* MM-63316: Guest access to channel (#30467) (#30768)
(cherry picked from commit c23f44fe8ed02f71d506f99adc30ad34c58c89d1)
Co-authored-by: catalintomai <56169943+catalintomai@users.noreply.github.com>
* MM-63378: Test and fix permission issues with System Manager team access (#30672) (#30770)
* test PermissionView semantics
* change required ancillary permissions
`PermissionSysconsoleReadReportingTeamStatistics` doesn't strictly need `PermissionViewTeam`, but can work with whatever teams the user has access to.
* remove unnecessary timeouts
* remove redundant comment
* update snapshots
* Update e2e-tests/playwright/specs/functional/system_console/permissions/team_access.spec.ts
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 6f33b721de76b39a7714bfe0d5e9c1306869a3e3)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* [MM-63436] Cherry-pick to `release-9.11` (#30811)
* [MM-63436] Replace Exif parser dependency (#30479)
* Replace Exif parser dependency
* Improve forward seeking logic
* Fix linting
* Stop decoding upon finding tag
* Use latest version of imagemeta dependency
* Don't skip TIFF reader tests
* Log improvements
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update layers
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update latest patch version to 9.11.14 (#30869)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-63791: guest permissions to teams (#30789) (#30874)
* improve th.CreateGuestAndClient
* test coverage for guest user access to teams
* restrict guest access to public teams unless a member
(cherry picked from commit 701ddc896a107b13f457fbdbe229bce5019fc516)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* MM-62930: Add validation of LDAP attribute values. (#30419) (#30823)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Revert "[MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)" (#30939)
This reverts commit 968fc9abd56d51d32880bca2f7cbcdff8c1af68c.
* Update latest patch version to 9.11.15 (#30940)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* [CP] MM-63756: Added index to sidebarchannels table (#30724) (#30932)
The (s SqlChannelStore) getSidebarCategoriesT gets called quite frequently.
- Team switch
- WS reconnect
- Category created
- Category updated
- Category deleted
Of these 1 and 2 are probably the most commonly called sources. Based on that,
the sidebarChannels table is not that well-optimized. Even though
the query time might be reasonable, without an index, it has to churn a lot of
DB CPU for a sequential scan.
We add a new index to optimize this.
CREATE INDEX idx_sidebarchannels_categoryid ON sidebarchannels(categoryid);
```
Before:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=40854.18..40854.19 rows=4 width=193) (actual time=251.635..251.646 rows=204 loops=1)
Sort Key: sidebarcategories.sortorder, sidebarchannels.sortorder
Sort Method: quicksort Memory: 65kB
Buffers: shared hit=1203 read=23668
-> Nested Loop (cost=8.87..40854.14 rows=4 width=193) (actual time=251.345..251.455 rows=204 loops=1)
Buffers: shared hit=1203 read=23668
-> Nested Loop (cost=0.41..9.47 rows=1 width=54) (actual time=0.068..0.074 rows=1 loops=1)
Buffers: shared hit=5
-> Seq Scan on teams (cost=0.00..1.03 rows=1 width=27) (actual time=0.024..0.026 rows=1 loops=1)
Filter: (((id)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1
-> Index Scan using teammembers_pkey on teammembers (cost=0.41..8.43 rows=1 width=27) (actual time=0.039..0.043 rows=1 loops=1)
Index Cond: (((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (deleteat = 0)
Buffers: shared hit=4
-> Hash Right Join (cost=8.45..40844.62 rows=4 width=193) (actual time=251.274..251.361 rows=204 loops=1)
Hash Cond: ((sidebarchannels.categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=1198 read=23668
-> Seq Scan on sidebarchannels (cost=0.00..37514.77 rows=1265277 width=100) (actual time=0.043..99.345 rows=1265444 loops=1)
Buffers: shared hit=1194 read=23668
-> Hash (cost=8.44..8.44 rows=1 width=158) (actual time=0.047..0.047 rows=6 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 10kB
Buffers: shared hit=4
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=158) (actual time=0.029..0.037 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
Planning:
Buffers: shared hit=9
Planning Time: 1.215 ms
Execution Time: 251.755 ms
(31 rows)
After:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=1544.53..1544.54 rows=4 width=192) (actual time=0.834..0.859 rows=204 loops=1)
Sort Key: sidebarcategories.sortorder, sidebarchannels.sortorder
Sort Method: quicksort Memory: 65kB
Buffers: shared hit=58
-> Nested Loop Left Join (cost=8.53..1544.49 rows=4 width=192) (actual time=0.066..0.252 rows=204 loops=1)
Buffers: shared hit=58
-> Nested Loop (cost=0.83..17.93 rows=1 width=157) (actual time=0.042..0.098 rows=6 loops=1)
Buffers: shared hit=34
-> Nested Loop (cost=0.42..9.48 rows=1 width=157) (actual time=0.030..0.049 rows=6 loops=1)
Buffers: shared hit=10
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=157) (actual time=0.018..0.022 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
-> Seq Scan on teams (cost=0.00..1.03 rows=1 width=27) (actual time=0.002..0.003 rows=1 loops=6)
Filter: (((id)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=6
-> Index Scan using teammembers_pkey on teammembers (cost=0.41..8.43 rows=1 width=27) (actual time=0.007..0.007 rows=1 loops=6)
Index Cond: (((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (deleteat = 0)
Buffers: shared hit=24
-> Bitmap Heap Scan on sidebarchannels (cost=7.69..1522.35 rows=421 width=100) (actual time=0.012..0.017 rows=34 loops=6)
Recheck Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Heap Blocks: exact=6
Buffers: shared hit=24
-> Bitmap Index Scan on idx_sidebarchannels_categoryid (cost=0.00..7.58 rows=421 width=0) (actual time=0.010..0.010 rows=34 loops=6)
Index Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=18
Planning:
Buffers: shared hit=18
Planning Time: 0.543 ms
Execution Time: 0.968 ms
(32 rows)
```
I have also looked at potentially re-ordering the JOINs to make
sidebarchannels and sidebarcategories JOIN earlier, but that didn't give
a major benefit.
Also looked at adding a compound index with (categoryid, sortorder) to improve
sorting performance, but that didn't give a major benefit from what the single
column index already gives.
The `completePopulatingCategoryChannelsT` query also partially benefits
from this. But the Postgres optimizer sometimes selects the index on categoryId
and sometimes on ChannelId, both giving equivalent performance. So there's no major
improvement there, but at the same time, no regression as well.
```
Original:
[bigdb] # EXPLAIN (ANALYZE, BUFFERS) SELECT Id FROM ChannelMembers LEFT JOIN Channels ON Channels.Id=ChannelMembers.ChannelId WHERE (ChannelMembers.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND Channels.Type IN ('D'
,'G') AND Channels.DeleteAt = 0 AND NOT EXISTS ( SELECT 1 FROM SidebarChannels JOIN SidebarCategories on SidebarChannels.CategoryId=SidebarCategories.Id WHERE (SidebarChannels.ChannelId = ChannelMembers.ChannelI
d AND SidebarCategories.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND SidebarCategories.TeamId = '3ee5y5ok6jgxicrmqstdnghmfr') )) ORDER BY DisplayName ASC;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=5864.68..5865.84 rows=463 width=40) (actual time=9.008..9.022 rows=39 loops=1)
Sort Key: channels.displayname
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=2112
-> Nested Loop Anti Join (cost=1.96..5844.18 rows=463 width=40) (actual time=0.188..8.932 rows=39 loops=1)
Buffers: shared hit=2112
-> Nested Loop (cost=0.99..3476.66 rows=463 width=67) (actual time=0.159..7.952 rows=39 loops=1)
Buffers: shared hit=1956
-> Index Only Scan using idx_channelmembers_user_id_channel_id_last_viewed_at on channelmembers (cost=0.56..40.78 rows=470 width=27) (actual time=0.036..0.467 rows=437 loops=1)
Index Cond: (userid = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Heap Fetches: 45
Buffers: shared hit=208
-> Memoize (cost=0.43..7.69 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=437)
Cache Key: channelmembers.channelid
Cache Mode: logical
Hits: 0 Misses: 437 Evictions: 0 Overflows: 0 Memory Usage: 42kB
Buffers: shared hit=1748
-> Index Scan using channels_pkey on channels (cost=0.42..7.68 rows=1 width=40) (actual time=0.015..0.015 rows=0 loops=437)
Index Cond: ((id)::text = (channelmembers.channelid)::text)
Filter: ((type = ANY ('{D,G}'::channel_type[])) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1748
-> Nested Loop (cost=0.97..5.10 rows=1 width=27) (actual time=0.023..0.023 rows=0 loops=39)
Buffers: shared hit=156
-> Index Only Scan using sidebarchannels_pkey on sidebarchannels (cost=0.55..4.56 rows=1 width=92) (actual time=0.022..0.022 rows=0 loops=39)
Index Cond: (channelid = (channelmembers.channelid)::text)
Heap Fetches: 0
Buffers: shared hit=156
-> Index Scan using sidebarcategories_pkey on sidebarcategories (cost=0.42..0.48 rows=1 width=65) (never executed)
Index Cond: ((id)::text = (sidebarchannels.categoryid)::text)
Filter: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Planning:
Buffers: shared hit=48 dirtied=1
Planning Time: 2.222 ms
Execution Time: 9.142 ms
(35 rows)
New:
[bigdb] # EXPLAIN (ANALYZE, BUFFERS) SELECT Id FROM ChannelMembers LEFT JOIN Channels ON Channels.Id=ChannelMembers.ChannelId WHERE (ChannelMembers.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND Channels.Type IN ('D'
,'G') AND Channels.DeleteAt = 0 AND NOT EXISTS ( SELECT 1 FROM SidebarChannels JOIN SidebarCategories on SidebarChannels.CategoryId=SidebarCategories.Id WHERE (SidebarChannels.ChannelId = ChannelMembers.ChannelId AND SidebarCategories.UserId = 'tc3p1yqw67d8idcp3g98awexqe' AND SidebarCategories.TeamId = '3ee5y5ok6jgxicrmqstdnghmfr') )) ORDER BY DisplayName ASC;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=5059.95..5061.11 rows=463 width=40) (actual time=12.072..12.086 rows=39 loops=1)
Sort Key: channels.displayname
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=1984
-> Nested Loop Anti Join (cost=9.10..5039.45 rows=463 width=40) (actual time=0.751..12.009 rows=39 loops=1)
Join Filter: ((sidebarchannels.channelid)::text = (channelmembers.channelid)::text)
Rows Removed by Join Filter: 7839
Buffers: shared hit=1984
-> Nested Loop (cost=0.99..3476.66 rows=463 width=67) (actual time=0.161..7.579 rows=39 loops=1)
Buffers: shared hit=1956
-> Index Only Scan using idx_channelmembers_user_id_channel_id_last_viewed_at on channelmembers (cost=0.56..40.78 rows=470 width=27) (actual time=0.036..0.449 rows=437 loops=1)
Index Cond: (userid = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Heap Fetches: 45
Buffers: shared hit=208
-> Memoize (cost=0.43..7.69 rows=1 width=40) (actual time=0.016..0.016 rows=0 loops=437)
Cache Key: channelmembers.channelid
Cache Mode: logical
Hits: 0 Misses: 437 Evictions: 0 Overflows: 0 Memory Usage: 42kB
Buffers: shared hit=1748
-> Index Scan using channels_pkey on channels (cost=0.42..7.68 rows=1 width=40) (actual time=0.014..0.014 rows=0 loops=437)
Index Cond: ((id)::text = (channelmembers.channelid)::text)
Filter: ((type = ANY ('{D,G}'::channel_type[])) AND (deleteat = 0))
Rows Removed by Filter: 1
Buffers: shared hit=1748
-> Materialize (cost=8.11..1535.03 rows=4 width=27) (actual time=0.003..0.046 rows=201 loops=39)
Buffers: shared hit=28
-> Nested Loop (cost=8.11..1535.01 rows=4 width=27) (actual time=0.099..0.383 rows=201 loops=1)
Buffers: shared hit=28
-> Index Scan using idx_sidebarcategories_userid_teamid on sidebarcategories (cost=0.42..8.44 rows=1 width=65) (actual time=0.047..0.057 rows=6 loops=1)
Index Cond: (((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text) AND ((teamid)::text = '3ee5y5ok6jgxicrmqstdnghmfr'::text))
Buffers: shared hit=4
-> Bitmap Heap Scan on sidebarchannels (cost=7.69..1522.35 rows=421 width=92) (actual time=0.028..0.040 rows=34 loops=6)
Recheck Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Heap Blocks: exact=6
Buffers: shared hit=24
-> Bitmap Index Scan on idx_sidebarchannels_categoryid (cost=0.00..7.58 rows=421 width=0) (actual time=0.023..0.023 rows=34 loops=6)
Index Cond: ((categoryid)::text = (sidebarcategories.id)::text)
Buffers: shared hit=18
Planning:
Buffers: shared hit=51
Planning Time: 2.240 ms
Execution Time: 12.210 ms
(42 rows)
```
Analysis on MySQL for completion:
```
Before:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Sort: SidebarCategories.SortOrder, SidebarChannels.SortOrder (actual time=277.675..277.675 rows=4 loops=1)
-> Stream results (cost=138558.36 rows=1287808) (actual time=242.506..277.650 rows=4 loops=1)
-> Left hash join (<hash>(SidebarChannels.CategoryId)=<hash>(SidebarCategories.Id)), extra conditions: (SidebarChannels.CategoryId = SidebarCategories.Id) (cost=138558.36 rows=1287808) (actual time=242.498..277.626 rows=4 loops=1)
-> Index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='qdggj9pyobgkjpj8htwzizks1r', TeamId='xmh7bupzajnudqf3h4mm76qapy') (cost=1.40 rows=4) (actual time=0.092..0.094 rows=4 loops=1)
-> Hash
-> Table scan on SidebarChannels (cost=8394.55 rows=321952) (actual time=0.123..106.334 rows=300002 loops=1)
|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After:
----------------------------------------------------------------+
| -> Sort: SidebarCategories.SortOrder, SidebarChannels.SortOrder (actual time=0.739..0.742 rows=4 loops=1)
-> Stream results (cost=6.80 rows=7) (actual time=0.468..0.703 rows=4 loops=1)
-> Nested loop left join (cost=6.80 rows=7) (actual time=0.456..0.673 rows=4 loops=1)
-> Index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='qdggj9pyobgkjpj8htwzizks1r', TeamId='xmh7bupzajnudqf3h4mm76qapy') (cost=4.38 rows=4) (actual time=0.302..0.313 rows=4 loops=1)
-> Index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=0.48 rows=2) (actual time=0.085..0.087 rows=0 loops=4)
|
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```
Timing wise, it takes around 2s to add the index on a table with 1.2M rows
for Postgres. And it takes around 5s on MySQL on a table with 300K rows.
It looks like it takes longer on MySQL, but since both migrations are
non-locking, it should be fine.
https://mattermost.atlassian.net/browse/MM-63756
```release-note
NONE
```
* MM-64209: Optimize completePopulatingCategoryChannelsT for MySQL (#30963) (#30967)
For our MySQL customers, we have discovered that the query is not
able to choose the right plan by itself without adequate hints.
This is only for MySQL as we have confirmed from multiple customers
that Postgres takes the right index idx_sidebarcategories_userid_teamid
for the sidebarCategories table. And if it doesn't, then a VACUUM ANALYZE
fixes it.
But for MySQL, we have to do two things:
- Pass an index hint to let it use idx_sidebarcategories_userid_teamid.
- Pass an optimizer hint to materialize the sub-query. This is used
to materialize the doesNotHaveSidebarChannel sub-query into a temporary
table, letting MySQL reuse the contents of the table for further processing
in the parent sections of the query.
I have confirmed both locally and in the customer environment
that it gives a clear benefit.
*LOCAL*
OLD:
```
| -> Nested loop antijoin (cost=2889.85 rows=19767) (actual time=3.355..38.033 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.410..1.689 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.394..0.886 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.389..0.793 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.003 rows=1 loops=220)
-> Nested loop inner join (cost=4967.50 rows=180) (actual time=0.165..0.165 rows=1 loops=220)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=Channels.Id) (cost=7.86 rows=180) (actual time=0.055..0.062 rows=13 loops=220)
-> Filter: ((SidebarCategories.TeamId = 'team01') and (SidebarCategories.UserId = 'user000')) (cost=44.93 rows=1) (actual time=0.008..0.008 rows=0 loops=2881)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=SidebarChannels.CategoryId) (cost=44.93 rows=1) (actual time=0.006..0.006 rows=1 loops=2881)
|
```
NEW:
```
| -> Nested loop antijoin (cost=5879.73 rows=58021) (actual time=1.544..3.135 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.421..1.778 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.405..0.945 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.400..0.859 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.004 rows=1 loops=220)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=Channels.Id) (cost=130.37..130.37 rows=1) (actual time=0.006..0.006 rows=1 loops=220)
-> Materialize with deduplication (cost=130.35..130.35 rows=527) (actual time=1.118..1.118 rows=205 loops=1)
-> Filter: (SidebarChannels.ChannelId is not null) (cost=77.61 rows=527) (actual time=0.059..0.851 rows=523 loops=1)
-> Nested loop inner join (cost=77.61 rows=527) (actual time=0.058..0.786 rows=523 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='user000', TeamId='team01') (cost=2.81 rows=15) (actual time=0.025..0.031 rows=15 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=1.70 rows=35) (actual time=0.032..0.046 rows=35 loops=15)
```
Performance improvement from 38ms to 3ms.
*CUSTOMER ENV* (with sensitive data wiped off)
OLD:
```
| -> Sort: channels.DisplayName (actual time=512..512 rows=5 loops=1)
-> Stream results (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop antijoin (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.025..0.0878 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0146..0.023 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00999..0.0102 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.00778..0.00785 rows=1 loops=6)
-> Nested loop inner join (cost=2.85 rows=4.81) (actual time=102..102 rows=0 loops=5)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=channelmembers.ChannelId) (cost=2.01 rows=4.81) (actual time=0.0125..13.8 rows=24134 loops=5)
-> Filter: ((sidebarcategories.TeamId = '') and (sidebarcategories.UserId = '')) (cost=1.54 rows=1) (actual time=0.00359..0.00359 rows=0 loops=120671)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=sidebarchannels.CategoryId) (cost=1.54 rows=1) (actual time=0.00316..0.00319 rows=1 loops=120671)
```
NEW:
```
Here is the output
| -> Sort: channels.DisplayName (actual time=0.12..0.12 rows=5 loops=1)
-> Stream results (cost=3.45 rows=4.01) (actual time=0.0797..0.11 rows=5 loops=1)
-> Nested loop antijoin (cost=3.45 rows=4.01) (actual time=0.0769..0.106 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.0291..0.0555 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0145..0.0162 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00611..0.00619 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.0053..0.00534 rows=1 loops=6)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=channelmembers.ChannelId) (cost=7.01..7.01 rows=1) (actual time=0.00956..0.00956 rows=0 loops=5)
-> Materialize with deduplication (cost=7..7 rows=13.4) (actual time=0.0451..0.0451 rows=0 loops=1)
-> Filter: (sidebarchannels.ChannelId is not null) (cost=5.66 rows=13.4) (actual time=0.0441..0.0441 rows=0 loops=1)
-> Nested loop inner join (cost=5.66 rows=13.4) (actual time=0.0439..0.0439 rows=0 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='', TeamId='') (cost=0.592 rows=3) (actual time=0.0105..0.0134 rows=3 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=sidebarcategories.Id) (cost=1.39 rows=4.46) (actual time=0.00999..0.00999 rows=0 loops=3)
```
Performance improvement from 512ms to 0.12ms.
https://mattermost.atlassian.net/browse/MM-64209
```release-note
NONE
```
(cherry picked from commit 0ebd3e808507d948b1ef83425b2f05723e1102c1)
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
* Revert "Revert "[MM-61361] Force reconnect handler to fetch channel categories on reconnect (#29010) (#29978)" (#30939)" (#30964)
This reverts commit 97e6d3231a80107e0c9098f22617900d78c3a1c8.
* Update latest patch version to 9.11.16 (#30973)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* Fix potential nil dereference in app.isChannelArchivedAndHidden (#30628) (#30987)
(cherry picked from commit 7250095f861772bee5204874793cab484fd82c3d)
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
* MM-64336: simplify doc extractor (#31103) (#31109)
* MM-64336: simplify doc extractor
Avoid creating a whole temporary directory when a single temporary file suffices.
Fixes: https://mattermost.atlassian.net/browse/MM-64337
* clarify -* semantics
(cherry picked from commit 65aec10162f612d98edf91cc66bf7e781868448b)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* Update latest patch version to 9.11.17 (#31143)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-64226: improved post deduplication (#31004) (#31217)
Require access to a post before allowing PendingPostId to deduplicate.
Fixes: https://mattermost.atlassian.net/browse/MM-64226
* [MM-64402] Improve validation of imported attachments (#31201) (#31273)
* Improve validation of imported attachments
* Simplify multiple errors handling
* Improve logic
* Fix abs paths in tests
* Remove redundant clean
* Implement additional validation
* Fix absolute paths in test
* Add additional tests
---------
Co-authored-by: Lorenzo Gallegos <1328683+enzowritescode@users.noreply.github.com>
* Improves the invite mechanism for remote clusters (#31025) (#31318)
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
* bump playbooks 1.41.1 (#31276) (#31321)
* Updated board prepackaged version to v9.1.3 (#31302)
* Update gosaml2 to latest v0.10.0 (#31381)
* Update latest patch version to 9.11.18 (#31728)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
* MM-64610: Res…

Summary
Fixes a CSS issue in an upcoming Firefox version. Currently, a
-mozprefixedtransform: scaleis applied together with non-standardzoomrule, causing them to be both applied at the same time, which makes emoticon sprites too small on Firefox 133.Instead of the vendor-prefixed standard rule combined with a non-standard one, it is better to use the standard counterpart of
zoom, which istransform: scale.Original context of the issue can be found here. However, as of the latest version of Chrome and Firefox, there does not seem to be a noticeable difference between
transform: scaleandzoomin terms of "blurriness", so non-standardzoomrule can probably be replaced withtransform: scale.Ticket Link
Fixes #29114
Jira https://mattermost.atlassian.net/browse/MM-61527
Release Note