Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add targets for linux/darwin arm64 and include those in the package #18491

Merged
merged 3 commits into from Oct 12, 2021

Conversation

cpanato
Copy link
Contributor

@cpanato cpanato commented Sep 30, 2021

Summary

Add targets to build linux and darwin arm64 and include that in the package as well

TODO and not in this PR:

  • build the plugins ARM64 targets
  • build mmctl ARM64 targets
  • update the package here to include those
  • build the container image for linux arm64 as well

Ticket Link

JIRA: https://mattermost.atlassian.net/browse/DOPS-633

Release Note

build: add targets for linux/darwin arm64 and include those in the package

@mm-cloud-bot mm-cloud-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 30, 2021
@cpanato
Copy link
Contributor Author

cpanato commented Sep 30, 2021

@stylianosrigas @spirosoik @jwilander first step in towards to have ARM nodes in the cloud servers to reduce costs :)

@cpanato
Copy link
Contributor Author

cpanato commented Sep 30, 2021

sample screenshot running on AWS ubuntu ARM64

Screenshot 2021-09-30 at 11 20 49

@spirosoik
Copy link
Member

@cpanato great work Carlos!!!

@cpanato
Copy link
Contributor Author

cpanato commented Sep 30, 2021

there are some refactors we can do in the makefile, but the focus of this PR is not to do this kind of things for now

@cpanato cpanato marked this pull request as ready for review October 1, 2021 13:51
@cpanato cpanato added the 2: Dev Review Requires review by a developer label Oct 1, 2021
build/release.mk Outdated Show resolved Hide resolved
build/release.mk Outdated Show resolved Hide resolved
build/release.mk Show resolved Hide resolved
@cpanato cpanato added Setup Cloud Test Server Setup an on-prem test server and removed Setup Cloud Test Server Setup an on-prem test server labels Oct 11, 2021
@mattermost mattermost deleted a comment from mm-cloud-bot Oct 11, 2021
@mattermost mattermost deleted a comment from mm-cloud-bot Oct 11, 2021
@cpanato cpanato requested a review from agnivade October 12, 2021 07:42
Copy link
Member

@agnivade agnivade left a comment

Choose a reason for hiding this comment

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

Nice work on the refactor @cpanato !

Copy link
Contributor

@stylianosrigas stylianosrigas left a comment

Choose a reason for hiding this comment

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

LGTM

@cpanato cpanato added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a developer labels Oct 12, 2021
@cpanato cpanato merged commit e95e0e9 into master Oct 12, 2021
@cpanato cpanato deleted the build-arm64 branch October 12, 2021 09:12
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Oct 12, 2021
isacikgoz added a commit that referenced this pull request Nov 16, 2021
…19000)

* MM-37787: ThreadAutoFollow must be true to enable CollapsedThreads (#18253)

* MM-37787: ThreadAutoFollow must be true to enable CollapsedThreads

* check if defaults are valid

* [MM-38082] Add local-mode handler for config reload endpoint (#18252)

* Add local-mode handler for config reload endpoint

* Remove redundant method

* Mm 37462 add channel split (#18254)

* add AddChannelButton feature

* Skip UserService user creation test in short-testing mode (#17907)

* Don't give up import when importing an attachment fails (#18084)

* MM-37372 Do not autofollow threads started by webhooks/bots for user who created them (#18276)

* Do not autofollow threads started by webhooks/bots for user who created them

* Add test

* security: add dependency track configuration (#18285)

* Bump go.mod and docker go version to 1.16 (#18280)

* Bump go.mod go version to 1.16

* Bump docker build go version to 1.16.7

* Added a sqlXPassThrough layer (#18238)

* Added a sqlXPassThrough layer

This layer embeds the original sqlx object and wraps some
key methods to avoid some boilerplate.

- Add timeout to all methods from the timeout in settings.
- Added trace functionality.
- Added auto-rebind capabilities so that each store method
doesn't need to call rebind every time.
- Added auto-lowering of query string to support NamedExec
for both MySQL and Postgres

All methods are not wrapped as all are likely not to be called
from our code. As and when they are called, support will be added.

```release-note
NONE
```

* fix lint issues

```release-note
NONE
```

* address review comments

```release-note
NONE
```

* incorporate suggestions

```release-note
NONE
```

* Translations update from Weblate (#18303)

* Translated using Weblate (German)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2297 of 2297 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2297 of 2297 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (French)

Currently translated at 94.6% (2174 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (French)

Currently translated at 94.6% (2174 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: wget <william@gathoye.be>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>

* Added Inline Latex support (#18219)

* Added inline latex option to config

* Inline latex setting now defaults to true

* Added inline latex setting to telemetry

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* MM-38132: Improve Auto Responder logic (#18264)

We properly truncate the date part from the createAt time.

The SQL query is improved now to directly return the bool.

Fixed the test to properly test the feature.

https://mattermost.atlassian.net/browse/MM-38132

```release-note
NONE
```

* update add channel button default to by_team_name (#18281)

* MM-35017: order and inclusion of participants (#18235)

* MM-35017: order and inclusion of participants

From now on root poster is not considered a thread participant,
only repliers are participants.

Ordering: A second reply to the thread from the same user should place
the user last at the participants list.

* Fixes shadow

* Fixes tests

* Order By CreateAt for participants of old threads

* Removes unnecessary check on root id

* Removes GetParticipantProfilesByIds it's not needed

At first GetParticipantProfilesByIds was created because GetProfileByIds
gets users by order of username.
This was not needed, we can order by user ids in Go.

This commit removes GetParticipantProfilesByIds and replaces it by
GetProfileByIds as it was done before.

* Fixes participants order for pre CRT threads

Older threads (before CRT) are being converted to CRT threads upon
reply.
This commit considers the order of participants to be inserted to
the new thread.

* Adds tests for thread participants

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37621] Update db schema validation scripts for 6.0 (#18223)

* Fix migration scripts

* Update schema validation scripts

* removes the global header feature flag and default value (#18304)

* [MM-36792] limit number of threads returned from SQL store (#18260)

Summary
Limit the number of threads returned in a single SQL store call by using the per_page query param instead of pageSize. Our param handling code automatically limits the number of records that can be requested. To support older mobile clients we continue to support the pageSize param until version 6.0 of the server is the minimum supported server version on mobile. 

Related PRs:

[MM-36792] Consistent query param names mattermost-webapp#8700
[MM-36792] Consistent query param names mattermost-mobile#5643

Ticket Link
https://mattermost.atlassian.net/browse/MM-36792

* Update schemas to include new indexes (#18313)

* Update schemas to include new indexes

* Increase local usability of gitlab scripts. (#18314)

* Increase local usability of gitlab scripts.

* Fix loading/saving SQL dumps

* Add logging to schema tests.

* Fix adding logs dir.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>

* [MM-24714]  Render markdown in email notifications (#18043)

Automatic Merge

* cleanup some commented out code (#18318)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-22051] Remove To/From JSON (#18070)

* Posts

* Add missing translation

* Fix internal store marshaling

* [MM-22051] Remove To/From JSON (Channels) (#18116)

* Channels

* Channel members

* ChannelSearch

* Channel categories, list, sidebar, stats, view

* Fix conversions

* [MM-22051] Remove To/From JSON (Users) (#18121)

* User related structs

* Fix return

* Team related structures (#18127)

* [MM-22051] Remove To/From JSON (Status, Bot, Reaction, Thread, FileInfo) (#18130)

* Status

* Bot

* Reaction

* Thread

* FileInfo

* Some fixes

* Translations update from Weblate (#18143)

* Translated using Weblate (German)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Bulgarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

* [MM-22051] Remove To/From JSON methods from model (#18138)

* Scheme

* Role

* Session

* Config

* Status

* Fix logic

* Emoji

* GuestsInvite

* Group

* Command

* ClusterInfo

* License

* Job

* System

* Plugin

* Command2

* IncomingWebhook

* OutgoingWebhook

* Fix tests

* Update traslation

* Some fixes

* Add missing return

* Simplify

* Make Config.ToJSONFiltered() return []byte

* Make Busy.ToJSON() return []byte

* Include error in log

* Split logic

* [MM-22051] Remove To/From JSON (final) (#18150)

* SwitchRequest

* PluginEventData

* Permalink

* PushNotification

* SuggestCommand

* PluginsResponse

* WebSocketMessage

* RemoteCluster

* SharedChannel

* PluginStatuses

* InitialLoad

* ClusterDiscovery

* ClusterStats

* MfaSecret

* GroupSyncable

* SAML

* WebSocketRequest

* TypingRequest

* SecurityBulletin

* OAuthApp

* IntegrationAction

* DataRetention

* Preference

* FileInfoList

* Compliance

* Preferences

* FileInfoSearchResults

* TermsOfService

* InstallMarketplacePluginRequest

* GitLabUser

* UploadSessions

* Remove unused helpers

* Fix tests

* [MM-23280] Fix linting for ToJSON/FromJSON (#18153)

* SwitchRequest

* PluginEventData

* Permalink

* PushNotification

* SuggestCommand

* PluginsResponse

* WebSocketMessage

* RemoteCluster

* SharedChannel

* PluginStatuses

* InitialLoad

* ClusterDiscovery

* ClusterStats

* MfaSecret

* GroupSyncable

* SAML

* WebSocketRequest

* TypingRequest

* SecurityBulletin

* OAuthApp

* IntegrationAction

* DataRetention

* Preference

* FileInfoList

* Compliance

* Preferences

* FileInfoSearchResults

* TermsOfService

* InstallMarketplacePluginRequest

* GitLabUser

* UploadSessions

* Remove unused helpers

* Fix tests

* Fix linting for ToJSON/FromJSON

* Fix conversions

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Revert "removes the global header feature flag and default value (#18304)" (#18324)

This reverts commit 9fb8de731822a8278e54490ad987eba61ee8ae6b.

* Fix test schema docker-compose exec exit problem  (#18327)

* Fix schema tests exiting early by replacing docker-compose exec with docker exec. 

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Use new mattermost-govet (#18329)

```release-note
NONE
```

* Update en.json (#18305)

Automatic Merge

* Migrating bot store to use sqlx (#18300)

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=5da060fd-8fbc-449d-8219-c73a9dd0bd7c

```release-note
NONE
```

* [MM-38321] Fix possible panics during license validation (#18333)

* Fix possible panics during license validation

* Return error if non 2xx code is returned by trial request server

* Gh 13908 fix bot missing username error (#17854)

Automatic Merge

* Fix trap (#18338)

* Fix trap

* Fix trap by removing trap.

* Translations update from Weblate (#18344)

* Translated using Weblate (Russian)

Currently translated at 96.7% (2223 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ru/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2297 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 99.8% (2297 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

Translated using Weblate (English (Australia))

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (French)

Currently translated at 94.3% (2170 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Co-authored-by: Vladislav Moiseev <v.moiseev94@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>

* Fix stopping mattermost server (#18337)

* Adjust values waiting for webapp. (#18345)

* Check curl version

* Add todo for future curl version. Fix the command.

* Implement proper looping so npm build case could be executed. And test it.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Fix flaky TestCreateDefaultMemberships (#18330)

* Fix possible race (#18328)

* remove feature flag (#18350)

* MM-38093: updates notifications copy on CRT replies (#18332)

MM-38093: updates notifications copy on CRT replies

Updates texts form push and email notifications when the user has CRT "on"
and the post is a reply to a thread.

Email batches text aware of CRT threads

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Update Node and NPM minimum versions (#18367)

* Translations update from Weblate (#18369)

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 99.7% (2300 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.3% (2290 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2302 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>

* Bump Post.Props size limits (#18370)

* Migrating OAuthStore to sqlx (#18302)

* Migrating OAuthStore to sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=71efa7c4-53be-4732-87cc-d53726d2cd53

```release-note
NONE
```

* Fixing some broken tests

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fix plugin logging missing context fields

Fix an issue where context fields logged by server on behalf of plugins didn't contain correct name/value pairs:
- bump Logr version to add key/value methods to sugar logger
- expose factory args when configuring logging with custom target types (needed for FocalBoard to create log target adapter that converts typed fields into slices of interface{} as per plugin logging API)

* add prewritten message A/B test feature flag (#18372)

* Disable admin support status job on server startup (#18341)

* Migrating Emoji store to use sqlx (#18301)

* Migrating Emoji store to use sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=646cee9a-219c-49f3-8e0b-6ec2cff4deba

```release-note
NONE
```

* Incorporate review suggestions

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-36444] Manage config deprecations for 6.0 (#18035)

* removing deprecated stuff

* removing deprecations and marking others for deprecations

* removing some of the configs

* partially remove ExperimentalChannelOrganization

* fixing merge issues

* moving default permissions to defaultroles function

* removing experimentaltownsquare

* removing old tests and remove legacysidebar config

* fixing test

* removing log

* removing unused variables

* MM-36444: Fix for renamed functions.

* MM-36444: go mod tidy and go mod vendor.

* MM-36444: Vendored go modules.

* MM-36444: Removes UseExperimentalGossip config field from model.

* Fix vendors

* fixing test

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Set BuildDate compile flag to dev during development (#18383)

* Set BuildDate compile flag to dev during development

* Addressing review comments

* MM-37721: Add prop for post preview before saving record. (#18361)

* MM-37721: Add prop for post preview before saving record.

* MM-37721: Test fix.

* MM-37721: Adds test.

* MM-37721: Fixes vet.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37730] - Self-managed: Update email template to new branding - Batch Email (#18221)

* [MM-37730] - Self-managed: Update email template to new branding - Batch Email

* batch email fixes

* simplify email title

* More fixes

* fix tests

* fix group message name on card

* fix bracket issue

* style the count

* account for  merged changes

* change truncating rule

* Update to bleve v2 and to use the scorch index (#18266)

Automatic Merge

* MM-37896: thread recency when updating a post (#18363)

When a post is edited we should not update the thread recency
(LastReplyAt).

* Update to use new plugin ID for playbooks. (#18392)

* add feature flag (#18404)

* MM-38081: Fix for disappearing permalink previews (#18400)

* MM-38081: Fix for disappearing previews.

* MM-38081: Update method signature in tests.

* MM-38081: Adds test replicating bug.

* Migrate from gorp to sqlx in store/sqlstore/audit_store.go (#18409)

* MM-38635 - Debug statements for prepareImage errors on community-daily (#18416)

* add debug info to generateMiniPreview error

* linting

* simplify

* Update app/file.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* add channel_id and creator_id to the log statement

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Revert import command deprecation (#18413)

Automatic Merge

* MM-38611 getSharedChannels: only return channels user is member of (#18417)

* getSharedChannels: only return channels user is member of

* Last 4 credit card digits as a string (#17996)

* [MM-36603] - Text is cut-off on the bottom of the 14-day trial 3 day to end of trial email notification (#18421)

* feedback impl

* add test

* Translations update from Weblate (#18420)

* Translated using Weblate (Spanish)

Currently translated at 86.1% (1985 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (German)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 86.1% (1985 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Adolfo García Veytia <adolfo.garcia@mattermost.com>

* [MM-38375] Fix processing bulk import with attachments (#18352)

* Fix improper attachments in replies

* Fix import data path

* Improve errors

* Fix importing attachments directly from zip file

* Add some test cases to cover error paths

* Add debug log for nil referencedPost (#18437)

* add debug log for nil post

* add post id for context

* log other vars that may be nil

* change from Warn to Debug

* MM-38712: Flush logs while exiting from store upgrade (#18438)

Our store upgrade methods used mlog.Critical and then slept
for a second and triggered os.Exit.

First of all, with the new mlog refactor Critical wasn't a standard
log level so it was never to be logged.

And secondly, this completely missed the fact that there already
existed an API method Fatal which did exactly this.

We mark the Critical API as deprecated, and use Fatal for all
occurences.

The choice should be between either to use Error or Fatal.

While here, we also remove the non-standard exit codes which
just confused things further while debugging.

https://mattermost.atlassian.net/browse/MM-38712

```release-note
NONE
```

* MM-38657 - Sentry crash: Fix nil dereference when post not found (#18440)

* Revert "Add debug log for nil referencedPost (#18437)"

This reverts commit e575315275481f5f339455d1b9f40c29667c842b.

* Ignores post not found errors at a higher level

And adds test

```release-note
NONE
```

* [MM-38216] Add API endpoint and adapt search to allow multi-team search (#18371)

* Add API endpoint and adapt search to allow multi-team search

* Refactor handler, refactor sql query to use squirrel, rename app and store functions and add tests

* Fix lint

* Fix search engines and remove unneeded comments

* Fix test

* Remove user from channel after test

* Update base container image from alpine 3.12 to 3.14 (#18450)

* update default mm package to 5.39.0

* update base container image from alpine 3.12 to 3.14

* MM-38774 - partial fix for: Community running out of memory (#18445)

* prevent invalid images from entering generateMiniPreview in the future

* fixing err, err2, imgErr

* linting

* load actual pngs and gifs in tests

* consistent style

* register PreviewPost for RPC connections (#18452)

* Exclude sending file metadata to plugin hooks (#18454)

* Exclude sending file metadata to plugin hooks

A FileInfo object contained a MiniPreview which is
a slice of bytes. This can be particularly costly
while marshalling to plugin hooks.

We avoid this by refactoring the Embeds and Images
population to a separate method and calling that
to prevent posts from getting updated.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=9c0b5413-5401-4ef2-83d5-b9f756585bbc

```release-note
NONE
```

* refactor to separate method

```release-note
NONE
```

* sets global header feature flag to true until the webapp codebase is ready (#18397)

* Translations update from Weblate (#18467)

* Translated using Weblate (German)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.5% (2295 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Polish)

Currently translated at 74.0% (1708 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (French)

Currently translated at 95.2% (2196 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Translated using Weblate (French)

Currently translated at 94.0% (2169 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>

* [MM-38579] Removing some town square permissions stuff (#18464)

* removing some town square permissions stuff

* fixing error

* adding back in channel leave check

* removing tests

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>

* Pre-package Playbooks 1.20.0 (#18477)

Automatic Merge

* [MM-36786] Check channel permissions before thread follow/unfollow (#18460)

* Only consider flagged posts that are on channels you are member of (#18380)

* Only consider flagged posts that are on channels you are member of

* Fix and add tests

* [MM-36472] Fix inconsistencies in Roles columns (#18390)

* Fix inconsistencies in Roles columns

* Add new migrations

* build: set 600 permission to config.json when packagin the app (#18490)

* docker/build: push image to the testing repository (#18488)

* Execute update posts query first (#18524)

* Translations update from Weblate (#18530)

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2303 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Polish)

Currently translated at 79.3% (1828 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 74.5% (1718 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Swedish)

Currently translated at 99.6% (2303 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 100.0% (2303 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Polish)

Currently translated at 79.2% (1831 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Translated using Weblate (Spanish)

Currently translated at 99.4% (2297 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Translated using Weblate (Spanish)

Currently translated at 95.3% (2202 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (French)

Currently translated at 95.0% (2196 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Co-authored-by: Markus Hermann <markus.hermann@uni-marburg.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Aleksander Chromik <achromik@gmail.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>

* Remove searchEngine from App (#18540)

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=c6753a1c-dbbf-4316-8e4e-c58ebb65d6e0

```release-note
NONE
```

* [GH-15744] Remove direct token store access in api4/user module (#18411)

Automatic Merge

* Translations update from Weblate (#18545)

* Translated using Weblate (Polish)

Currently translated at 83.7% (1935 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2306 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>

* MM-38805 - fix contact sales link (#18539)

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>

* Pre-package Channel Export plugin v1.0.0 (#18544)

* Migrate from gorp to sqlx in store/sqlstore/command_webhook_store.go (#18517)

* Migrate from gorp to sqlx in store/sqlstore/command_webhook_store.go

* fixing small things

change `CreatedAt` to `CreateAt` and change GetReplicaX().Select to GetReplicaX().Get

Co-authored-by: Saul Pinales <saul021002@gmai.com>

* Pre-package Playbooks v1.20.1 (#18542)

* [MM-39072] - Run make build-templates on latest master (#18541)

* [MM-39072] - Run make build-templates on latest master

* fix guest template failure

* MM-38497: Fix Sentry crash in PostAction.Equals (#18571)

* MM-38497: Fix Sentry crash in PostAction.Equals

We check for nil pointer before moving ahead.

https://mattermost.atlassian.net/browse/MM-38497

```release-note
NONE
```

* Fix lint errors

```release-note
NONE
```

* Update model/integration_action.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* [MM-38437] - Trial ending soon email refers to Cloud Professional (#18546)

* [MM-38437] - Trial ending soon email refers to Cloud Professional

* feedback impl

* add coma

* MM-38624 Migrate ChannelMemberHistoryStore to sqlx (#18496)

Automatic Merge

* Prepackaged boards to 0.9.1 (#18405)

* update prepackaged boards to 0.9.0

* update to 0.9.1

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Turn focalboard plugin on by default (#18132)

* turn focalboard plugin on by default

* cleanup

* update config diff tests to add new default

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Add index on Jobs table (#18244)

From Grafana charts, GetCountbyStatusandType and
GetNewestJobByStatusesAndType were the two top queries.

Overall, a through look into all job methods leads to
the conclusion of 2 indexes - one on CreateAt, another
a compound index of Status+Type. I have just gone ahead
with the compound index for now. Once the job cleaner
is implemented, I want to take a second look to decide
whether to add the second index or not.

Here is the before-after of the queries:

Query 1:
```
explain analyze select count(*) from jobs where status='error' and type='migrations';
                                                         QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=103.42..103.43 rows=1 width=8) (actual time=0.032..0.034 rows=1 loops=1)
   ->  Bitmap Heap Scan on jobs  (cost=4.54..103.42 rows=1 width=0) (actual time=0.027..0.028 rows=0 loops=1)
         Recheck Cond: ((type)::text = 'migrations'::text)
         Filter: ((status)::text = 'error'::text)
         ->  Bitmap Index Scan on idx_jobs_type  (cost=0.00..4.54 rows=34 width=0) (actual time=0.018..0.019 rows=0 loops=1)
               Index Cond: ((type)::text = 'migrations'::text)

explain analyze select count(*) from jobs where status='error' and type='migrations';
                                                         QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------
Aggregate  (cost=8.31..8.32 rows=1 width=8) (actual time=0.079..0.080 rows=1 loops=1)
   ->  Index Only Scan using jobs_multi on jobs  (cost=0.29..8.30 rows=1 width=0) (actual time=0.072..0.073 rows=0 loops=1)
         Index Cond: ((status = 'error'::text) AND (type = 'migrations'::text))
         Heap Fetches: 0

explain analyze select * from jobs where status='error' and type='migrations' order by createat desc limit 1;
```

Query 2:
```
                                                            QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=8.31..8.32 rows=1 width=187) (actual time=0.037..0.039 rows=0 loops=1)
   ->  Sort  (cost=8.31..8.32 rows=1 width=187) (actual time=0.035..0.036 rows=0 loops=1)
         Sort Key: createat DESC
         Sort Method: quicksort  Memory: 25kB
         ->  Index Scan using idx_jobs_type on jobs  (cost=0.29..8.30 rows=1 width=187) (actual time=0.027..0.027 rows=0 loops=1)
               Index Cond: ((type)::text = 'migrations'::text)
               Filter: ((status)::text = 'error'::text)

explain analyze select * from jobs where status='error' and type='migrations' order by createat desc limit 1;
                                                          QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=8.31..8.32 rows=1 width=187) (actual time=0.065..0.067 rows=0 loops=1)
   ->  Sort  (cost=8.31..8.32 rows=1 width=187) (actual time=0.063..0.064 rows=0 loops=1)
         Sort Key: createat DESC
         Sort Method: quicksort  Memory: 25kB
         ->  Index Scan using jobs_multi on jobs  (cost=0.29..8.30 rows=1 width=187) (actual time=0.021..0.022 rows=0 loops=1)
               Index Cond: (((status)::text = 'error'::text) AND ((type)::text = 'migrations'::text))

```

```release-note
NONE
```

* Move admin advisor to separate file (#18606)

```release-note
NONE
```

* MM-37186: Update dependencies (#18604)

* MM-37186: Update dependencies

The split client libraries were excluded from being upgraded.

See: https://github.com/splitio/go-split-commons/issues/56

https://mattermost.atlassian.net/browse/MM-37186

```release-note
NONE
```

* Ignore staticcheck deprecation warnings

```release-note
NONE
```

* Add new CI step for checking email templates (#18570)

* Add new CI step for checking email templates

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=2c1d9628-675f-4eb6-80bb-db9e4d09b8bf

```release-note
NONE
```

* Pre-install

```release-note
NONE
```

* pinning down to 4.9.0

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Cluster Discovery store sqlx migration (#18605)

Automatic Merge

* Allow webapp to request legacy cloud products. (#18528)

* Change internal getProducts to filter on a set of families instead of a single family.
* Extend /products endpoint to be able to return any of the current four sets of product families.
* Use include_legacy query param to decide which cloud products to request.

* update boards to 0.9.2 (#18616)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Removed PostPreview from MessageHasBeenPosted payload. (#18613)

Automatic Merge

* Creating empty Channels shell (#18611)

* Creating empty Channels shell

This is the first step in moving to a product-based
isolated architecture.

For now, Channels is empty and does not contain anything.

Next step is to change App to contain Channels instead
of Server. Some of the initialization code in NewServer
would need to be moved inside NewChannels.

This would complete the full pass-through mode of accessing
everything.

The last step would be to gradually move Channels related
fields from Server into Channels, keeping Server to be
just the global level struct.

```release-note
NONE
```

* fix vet failure

```release-note
NONE
```

* Move Channels into App (#18623)

* Move Channels into App

In this PR, we make Channels as part of App
instead of Server. This is part of the transition period
of moving fields from Server to Channels.

For now, Channels contains Server. So the hierarchy is

App -> Channels -> Server.

And as a first step, we also move httpService to Channels.

```release-note
NONE
```

* Fixing another test

```release-note
NONE
```

* new method

```release-note
NONE
```

* Translations update from Weblate (#18639)

* Translated using Weblate (Polish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 91.3% (2110 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 87.1% (2014 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 87.0% (2011 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 99.7% (2305 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (French)

Currently translated at 95.1% (2197 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Anne-Laure Gaillard <alaure.gaillard@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Mark E Fuller <fuller@stossrohr.net>

* db: add db upgrade for 5.39 and upgrade to 6 (#18645)

* build: add targets for linux/darwin arm64 and include those in the package (#18491)

* build: add targets for linux/darwin arm64 and include those in the package

* update based on feedback

* store arm64 targets

* jobserver: enable prometheus metrics when running standalone jobserver (#18636)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* restore reset command as db reset (#18449)

* Remove erroneous gosaml submodule (#18660)

```release-note
NONE
```

* fix package name typo (#18665)

* Initial team service implementation (#18279)

* initial service implementation

* reflect review comments

* Unfurl Focalboard Server PR (#18271)

* Allow Embeds editing without editing

* Add focalboard to embed after it being in props

* Fix tests

* change to boards

* remove extra gunk

* Fix tests

* Add Feature Flag

* update boardsunfurl

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Display tableName and columnName for jsonb schema failures (#18672)

These are incredibly helpful during failures and should be there.

```release-note
NONE
```

* New intro, images, and links (#18610)

* Update content and links in Readme

* Add explainer to dev machine setup

* Update README.md

* Update README.md

* Update README.md

* Fix small typo (#18675)

Automatic Merge

* MM-36743: adds last_root_post_at in channels table (#18366)

* MM-36743: adds last_root_post_at in channels table

Channel recency for CRT users should not count replies,
this commit solves that issue by adding a new column to the channels
table: LastRootPostAt.
With that new info CRT users can have recent channels to work as
expected.

* Adds the 'LastRootPostAt' to the SQL scripts

* Fixes tests

* Adds LastRootPostAt migration to v6.1

* Fixes index

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Move ImageProxy inside Channels (#18656)

* Move ImageProxy inside Channels

```release-note
NONE
```

* Move back httpService

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Drop existing default on Users.Timezone prior to column type change (#18669)

* remove timedDND feature flag (#18346)

* update focalboard to 0.9.3 (#18688)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Add functionality to cleanup old jobs (#18646)

* Add functionality to cleanup old jobs

Historically, we never cleaned up old jobs from the DB
leading to them being accumulated forever.

This PR introduces functionality to cleanup old jobs
older than a defined threshold.

The functionality is set to false by default and has
to be enabled for it to work.

```release-note
2 new config settings were added.

JobSettings.CleanupOldJobs: This indicates whether to clean up old jobs
from the DB or not. Default is false.

JobSettings.CleanupJobsThresholdHours: This defines the time gap in hours beyond
which older jobs will be removed. This has no effect if the above config
setting is set to false. Default is -1
```

* fix copy pasta

```release-note
NONE
```

* address review comments

```release-note
NONE
```

* Fix lint

```release-note
NONE
```

* Use single config option for everything

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-39299] Remove outdated translations and update go-i18n library (#18674)

* Remove outdated translations

* update go-i18n dependency

* reflect review comments

* add message count for languages which has two translations for plurals

* Move cloud init back to initEnterprise (#18668)

* Move cloud init back to initEnterprise

```release-note
NONE
```

* Remove debug lines

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Improve API4 initialization (#18680)

* Improve API4 initialization

- Refactored openGraphDataCache to be inside app layer.
- Moved the cache instance from global variable to be inside server.
- Moved out the app instantiation from the global commands package
to be instantiated on every call. Only the server instance is passed.
- Moved InitLocal to be called from inside Init.

```release-note
NONE
```

* Remove commented line

```release-note
NONE
```

* [MM-38996] - Migrate from gorp to sqlx in store/sqlstore/compliance_store.go (#18633)

* migrate from gorp to sqlx in store/sqlstore/compliance_store.go

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax error

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* Fixes

```release-note
NONE
```

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>

* MM-36862: should remove user from participants (#18451)

* MM-36862: should remove user from participants

When deleting a reply in a thread we should also delete the participant
from the participants array. This should happen if they have no other
replies in that thread.

This commit fixes that.

* Adds warning logs

* Delete Post: fetches participants only when needed

* Minor refactor

* Remove participant should check for error in count

* Fixes error when binary_parameters=true

* Fixes: removes ArrayToJSON so we can handle the error

* Satisfies the linter

* Better error handling

* Satisfy govet

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Adding the feature flag to enable/disable calls in the mobile app (#18689)

* Pre-fill CreateAt to let link previews work. (#18698)

* Pre-fill CreateAt to let link previews work.

Because of the fact that getEmbedsAndImages has been now
refactored to work _before_ a post is saved. So the CreateAt
field of a post…
FreedomBen pushed a commit to FreedomBen/mattermost-server that referenced this pull request Jun 14, 2022
…ckage (mattermost#18491)

* build: add targets for linux/darwin arm64 and include those in the package

* update based on feedback

* store arm64 targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants