* Add ESR upgrade migration and CI job to verify it
The script was generated as a simple concatenation of migrations in the
interval [54, 101] through:
files=`for i in $(seq 54 101); do ls mysql/$(printf "%06d" $i)*up.sql; done`
tail -n +1 $files > ../esrupgrades/esr.5.37-7.8.mysql.up.sql
The CI job runs the migration both through the server and the script,
and for now uploads the dumps generated for manual inspection. An
automatic check for differences is still needed.
* Remove debug print in script
* Fix idx_uploadsessions_type creation
* Ignore tables db_lock and db_migration on dump
* Split workflow in two parallel jobs
* Diff dumps and upload the result
* Add cleanup script
* Use DELIMITER in the script to use mysql CLI
This allows us to remove the complexity of using a different Go script
inside a Docker image.
* Standardize Roles between migrations
Document and cleanup code.
* Upload diff only if it is not empty
* Trigger action only when related files change
* Add a global timeout to the job
* Generalize ESR to ESR upgrade action (#22573)
* Generalize action
* Use logs to ensure migrations are finished
* Add migrations from 5.37 to 6.3
* Remove tables in cleanup script, not through dump
* Add initial-version input to common action
* Add migration from 6.3 to 7.8
* Remove action debug line
* ESR Upgrade: One procedure per table in the v5.37 > v7.8 upgrade script (#22590)
* Squash Users-related migrations in one query
* Squash Drafts-related migrations in one query
* Squash UploadSessions-related migrations in one query
* Squash Threads-related migrations in one query
* Squash Channels-related migrations in one query
* Squash ChannelMembers-related migrations in one query
* Squash Jobs-related migrations in one query
* Squash Sessions-related migrations in one query
* Squash Status-related migrations in one query
* Squash Posts-related migrations in one query
* Squash TeamMembers-related migrations in one query
* Squash Schemes-related migrations in one query
* Squash CommandWebhooks-related migrations in one query
* Squash OAuthApps-related migrations in one query
* Squash Teams-related migrations in one query
* Squash Reactions-related migrations in one query
* Squash PostReminders-related migrations in one query
* Adapt ThreadMemberships migration to unified style
* Adapt LinkMetadata migrations to unified style
* Adapt GroupChannels migration to unified style
* Adapt PluginKVStore migration to unified style
* Adapt UserGroups migration to unified style
* Adapt FileInfo migration to unified style
* Adapt SidebarCategories migration to unified style
* Remove blank line
* Use tabs everywhere
* Wrap every procedure with log statements
* Remove space before parentheses in procedure call
* Remove spurious extra line
* Merge two equal consecutive conditionals
* Avoid the double list of conditions/queries
* Fix variable name
* Remove outdated comment
* Add a preprocess phase with corresponding scripts
* Join all preprocess scripts setting ExpiresAt to 0
This preprocessing is something we should always do, no matter the input
DB, so we can use a common script for all cases instead of repeating the
same code in multiple files.
* Add system-bot if it does not exist
* Cleanup the ProductNoticeViewState table
* Fix SQL
* Move esrupgrades directory under server/
* Update paths in Github action
* Fix trigger path for CI
Building the client package with `es2022`, exposing the optional `.cause` property on Errors effectively allowing us to wrap caught errors in the client package and re-throw with the context from the request, all while preserving a useful backtrace.
This change has potentially material impact to older plugins that attempt to rely on the newer package, but this should only occur at compile time since the webapp doesn't dynamically export this client package.
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-50960 - store system organization name
* restore the preparing workspace plugins and invite screens
* add back the page lines for the design
* add lines back and organize styles
* set back documentation to monorepo style and disable board as a product
* fix organization link and style skip button
* create team on organization name screen continue button click
* make sure there are not already created team and if so just update team name
* update the team display name if team has already been created
* cover error scenarios during team creation
* add pr feedback and add a couple of unit tests
* fix translation server error; make sure only update display name if it has changed in the form
* temp advances
* rewrite unit tests using react-testing library; fix unit tests
* fix translations
* make sure the launching workspace finish in cloud installations
* remove redundant validation
* fix unit tests
* remove unintended config value left after merge conflict
* MM-50550: Filter out threads from "left" channels v2
Currently leaving a channel doesn't affect the thread memberships of
that user/channel combination.
This PR aims to filter out all threads from those channels for the user.
Adds a DeleteAt column in the ThreadMemberships table, and filter out
all thread memberships that are "deleted".
Each time a user leaves a channel all thread memberships are going to be
marked as deleted, and when a user joins a channel again all those
existing thread memberships will be re-instantiated.
Adds a migration to mark all existing thread memberships as deleted
depending on whether there exists a channel membership for that
channel/user.
* Added migration files into list
* Fixes tests
* Fixes case where DeleteAt would be null
* Guard thread API endpoints with appropriate perms
* Deletes ThreadMembership rows upon leaving channel
* Minor style changes
* Use NoTranslation error
* Refactors tests
* Adds API tests to assert permissions on Team
* Adds tests, and fixes migrations
* Fixes test description
* Fix test
* Removes check on DM/GMs
* Change the MySQL query in the migration
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
We monitor the health of DB replicas, and on a fatal error,
take them out of the pool.
On a separate goroutine, we keep pinging the unhealthy replicas,
and on getting a good response back, we add them back to the pool.
https://mattermost.atlassian.net/browse/MM-50427
```release-note
Mattermost is now resilient against DB replica outages and will
dynamically choose a replica if it's alive.
Also added a config parameter ReplicaMonitorIntervalSeconds
whose default value is 5. This controls how frequently unhealthy
replicas will be monitored for liveness check.
```
Co-authored-by: Mattermost Build <build@mattermost.com>
- channel request types removed from fetchMyChannelsAndMembersREST
- removed isMinimumServerVersion check from that above action call, which is adding the query to include the archived channels
This issue involves updating the user picker functionality in the Mattermost web app's app framework. Currently, bot users are being displayed in the user picker for forms, which is not desired. The goal is to hide bot users from the user picker dropdown and only show real users. This can be achieved by filtering out any user that is a bot using the user.is_bot property. The necessary changes have been made in the apps_form_select_field.tsx file, specifically in the loadDynamicUserOptions function, which has been updated to filter out bot users using .filter((user) => !user.is_bot).