* MM-49564: Upsert in the Store vs App layer
Refactor drafts so that Upserting a draft would happen in the DB and not
in the app layer.
* Fixes mocks
* Fixes tests
* Fixes translations
* Fixes tests
* Update tests
* Fixes tests
* Addresses review comments
- renames Save => Upsert
- removes Sleep from tests
* Fixes flaky test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* remove Boards feature flag from server, makefile, and docker
* Update server/boards/server/boards_service_util.go
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
---------
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
* Add new trial form to enrich trial requests with more customer info
* Update snapshots
* One more addition
* Fixes from PR feedback
* Fix types, i18n, update e2e tests
* Fix linter
* Fix i18n?
* Fix blank translation
* update snapshot
* Update snapshot properly
* Remove inapplicable test
* Fix business email validation only happening once
* UX Feedback
* Fix linter
* Fix linter again, not working locally
* FIX LINTER
* Move isvalid check until after some fields are set
* Fix for overlapping modals
* Fix linter
* UX feedback
* UX Feedback
* Fix typo in error modal
* [MM-51551] Add new Trial Form to Playbooks trial requests (#22650)
* Playbooks start trial entrypoints opens new trial form modal
* Fix style
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-51347] Trial form error modal for embargoed and air gapped entities (#22656)
* Playbooks start trial entrypoints opens new trial form modal
* Add support for air gapped environments when making trial requests
* Add specific handling for embargoed entities
* undo some code
* Fix linter
* Fix types
* Fix style
* Updates because TE has to upgrade to E0 before it can activate a trial
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-45956: Optimize FileInfo stats query
We Denormalize Post.ChannelId on FileInfo.ChannelId
```release-note
The file info stats query is now optimized by denormalizing the channelID column into the table itself. This will speed up the query to get the file count for a channel on clicking the RHS.
Migration times:
On a MySQL 8.0.31 DB with
1405 rows in FileInfo and 11M posts, it took around 0.3s
On a Postgres 12.14 DB with
1731 rows in FileInfo and 11M posts, it took around 0.27s
```
https://mattermost.atlassian.net/browse/MM-45956
* Refactor audit log application.
* Fix incorrect API Usage for Auditing
* Fixups.
* Rename Object audit to Auditable. Some small fixes.
---------
Co-authored-by: Daniel Schalla <daniel@schalla.me>
fmt.Sprintf was badly optimized and in cases of heavy traffic,
it was in the hot path and caused a lot of allocations.
We sacrifice readability for performance here.
```
10:46:40-~/mattermost/mattermost-server/model] benchstat base.txt new.txt
goos: linux
goarch: amd64
pkg: github.com/mattermost/mattermost-server/v6/model
cpu: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
│ base.txt │ new.txt │
│ sec/op │ sec/op vs base │
EncodeJSON-8 2.061µ ± 1% 1.588µ ± 2% -22.93% (p=0.000 n=10)
│ base.txt │ new.txt │
│ B/op │ B/op vs base │
EncodeJSON-8 545.0 ± 0% 472.0 ± 0% -13.39% (p=0.000 n=10)
│ base.txt │ new.txt │
│ allocs/op │ allocs/op vs base │
EncodeJSON-8 6.000 ± 0% 3.000 ± 0% -50.00% (p=0.000 n=10)
```
```release-note
Writes to websocket now take 13% less memory
and also 22% faster per message.
```
* Adding debugbar layer
* Adding sql debugbar info
* Make duration consistent across the debugbar lines
* Adding the debugbar/systeminfo endpoint
* Adding logs to the debugbar
* Improve the debugbar logger fields info
* Improving the debug bar architecture
* Allow to enable/disable debugbar in the backend
* Exposing the Debug Bar enable in the client config
* Adding more system information to the debugbar
* Adding params info to the store layer
* Organizing a bit the debugbar code in the server and adding some extra data to the system info api
* Adding debugbar email traces
* Changing the socket event name to 'debugbar'
* Adding explain support for the debugbar
* Adding missed file
* Omitting data related to the debugbar itself
* Removing unneeded functions
* Avoid arbitrary execution in explain api
* Moving debugbar inside the platform directory
* Replacing debugbar logger with a new logger Target
* Removed uneeded changes
* Fixing some linter errors
* Adding a debugbar log level to use it later for log events strictly related to the debug bar
* Fixing linter errors
* Fixing tests
* Adding i18n strings
Instead of being completely hardcoded, public key is now set at build time according to build tag (test key if `testlicensekey` tag is passed to go build, production key otherwise). A `isProdLicensePublicKey` is also available for determining if the prod license key is being used. It is needed for choosing whether to point to production or test environment CWS.
The test license key and CWS url values in this value are set to production values in this PR, but will be updated to the test values once we are ready to do the necessary updates to test environment spinwicks.
* [MM-50534] - Renew email adds portal link when not eligible for self-serve renewal
* fix translations
* make more checks
* improve endpoint to make checks
* use new checks
* fix translations
* fix lint
* add meaningful names
* rename struct
* rename endpoint
The webapp needs to construct the full message because
the team_name needs to be inserted into the permalink.
So we need to send everything in the metadata for the
client to construct the message.
Also, we set a custom post type for the client to easily
add a custom condition.
```release-note
NONE
```
* MM-48246 - AB test open RHS with linked board
* fix linter
* fix go vet complain
* implement pr feedback
* fix mispelling
* remove unnecesary comment
* add pr feedback
* fix translation texts
* fallback for the first system stored value
* implement PR feedback
* prevent calling property from potential null object
* use the default hash id for welcome to boards template
* MM-49048: do not omit needed wsbroadcast vars
It seems that we are omitting ContainsSanitizedData, and
ContainsSensitiveData variables in WebsocketBroadcast.
This created a bug in cluster mode, in which we were sending duplicate
events to users whereas normally they would have access to only one of those.
Co-authored-by: Mattermost Build <build@mattermost.com>