Commit Graph

24 Commits

Author SHA1 Message Date
Agniva De Sarker
c249ba4a66 MM-52532: Fix golangci warnings (#23709)
https://mattermost.atlassian.net/browse/MM-52532

- Replace golint with revive
- Add makezero linter
- Fix all the required linter failures

Some issues in enterprise and public modules
are yet to be fixed. We send this to expediate things.
2023-06-13 14:08:36 +05:30
Scott Bishel
d0ad46b496 MM-52915 - Remove boards product config setting and system console (#23526)
* Remove boards product config setting and system console

* create config setting to enable/disable playbooks product

* fix to config name

* fix typo

* remove lingering ProductSettings references

* remove lingering ProductSettings references

* revert changes to package-lock.json

* Revert "revert changes to package-lock.json"

This reverts commit 1a7d98ace3.

* revert changes to package-lock.json

* fix build issues

* another fix

* update webap test

* i18n-extract

* Revert "i18n-extract"

This reverts commit c0a98c74ea.

* fix bad i18n-extract

* fix bad i18n-extract

* fix tests from bad merge

* more translation fixes

* more translation fixes

* updates from self-review

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-12 18:52:19 +02:00
Miguel de la Cruz
1215584665 Prevent boards product from being included automatically (#23539)
* Prevent boards product from being included automatically

* Fix config diff test

* Update prepackaged plugin version

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Readd boards/dist to the gitignore

* Does not enable the focalboard plugin by default

* Update plugin version to v7.10.3

---------

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2023-06-12 18:51:43 +02:00
Agniva De Sarker
efaa6264cc MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.

https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.

For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```
2023-06-11 10:54:35 +05:30
Jesse Hallam
305fac6507 Service environment (#23443)
* fix fileutils.TestFindFile on MacOS

* introduce model.ExternalServiceEnvironment

* pick license public key from external service env

* pick Stripe public key from external service env

* pick Rudder key from external service env

* configure Sentry DSN from external service env

* always log external_service_environment, Unsetenv

* clear faked BuildEnv, improve logging

* strip out unset GOTAGS

* fix Sentry tests

* simplify to just ServiceEnvironment

* relocate ServiceEnvironment in client config

* initialize CWS URLs based on service environment

* unset rudder key for boards dev

* harden service environment to avoid accidental production

* fix TestSentry again

* fix DEFAULT -> ENTERPRISE

* s/dev/test when naming playbooks rudder key

* simplify boards rudder key switch

* use uniform rudderKey variable names

* retain compatibility with existing pipeline

* reduce to just production/test

* unit test with valid test license

* simplify Playbooks telemetry initialization

* restore dev service environment

* emit ServiceEnvironment when running e2e tests
2023-06-07 10:15:33 -03:00
Julien Tant
0468e772a9 [MM-52926] Deprecating work templates (#23466)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 18:42:03 -07:00
Ben Peachey
69196b2986 Fix typo in sqlstore migrations guide. (#23481)
Automatic Merge
2023-05-26 02:04:29 +03:00
Alexander Griesser
4bc40e3a0c Small grammar change (#23383)
Spotted it while upgrading my server and checking the logs
2023-05-17 11:10:25 +02:00
Jesse Hallam
bb02b35048 Expose public/ API as submodule (#23345)
* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
2023-05-10 13:07:02 -03:00
Scott Bishel
81ef403230 update import/export for attachments and new file paths (#22915)
* update import/export for attachments and new file paths

* add unit test

* update templates test

* temp checking

* cleanup

* cleanup

* more cleanup

* lint fixes

* cleanup some functions

* cleanup

* fix build breaks

* fix tests for changes

* move function to different file

* more cleanup, code movement

* unit test fixes

* add unit tests

* fix tests

* more unit test fixes

* test fix

* revert package-lock.json

* fixes from code review

* fix export image

* more fixes to remove attachmentId

* change from removed api

* update test

* lint fixes

* update for review comments

* fix tests

* test fix

* lint fix

* remove sprintf from logging, use mlog

* more lint fixes

* Update server/boards/app/files.go

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

* remove code

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2023-04-26 10:01:00 -06:00
Miguel de la Cruz
041cbe2d24 Updates the check for the schema_migrations information (#23032)
The old check was using `sq.Eq`, which replaces its values with
strings, and for the case of `table_schema` we want to call a
function.
2023-04-21 10:44:52 +02:00
Agniva De Sarker
c34a50a6c7 MM-50427: Make MM survive DB replica outage (#22888)
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>
2023-04-19 17:03:18 +05:30
Miguel de la Cruz
067e36c23c Enable products for tests (#22757)
* Enable products for channels tests

* increase unit test timeout; check IsConfigReadOnly

* make app-layers

* Avoid loading boards tempaltes between tests to improve speed

* Fix delete query to be compatible with both databases

* Avoid preserving the templates for boards store tests

* Run all tests in one command

* Revert "Run all tests in one command"

This reverts commit 0330f7cd8f.

* concurrent pkg group tests in CI

* Revert "Revert "Run all tests in one command""

This reverts commit 73892fec77.

* Revert "concurrent pkg group tests in CI"

This reverts commit 550fb6cdd4.

* try testing 3 subsets of packages concurrently to improve time taken

* Revert "try testing 3 subsets of packages concurrently to improve time taken"

This reverts commit 97475f3c4e.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: wiggin77 <wiggin77@warpmail.net>
2023-04-18 13:58:33 +02:00
Agniva De Sarker
b200a07881 v8.0 module release (#22975)
https://mattermost.atlassian.net/browse/MM-52079

```release-note
We upgrade the module version to 8.0. The new module path is github.com/mattermost-server/server/v8.
```


Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2023-04-18 11:05:28 +05:30
Doug Lauder
a80e1e21b9 Remove redundant store APIs for Boards: (#22968)
- getBlocksWithParent
- getBlocksWithParentAndType
- getBlocksWithType
- getBlocksForBoard
2023-04-17 12:33:07 +02:00
Christopher Speller
8c73f092e8 Fix public boards setting not applying properly. (#22921) 2023-04-12 15:11:46 -07:00
Agniva De Sarker
62d758f485 Do not shutdown DB handle from boards product (#22924)
* Do not shutdown DB handle from boards product

```
warn  [2023-04-12 09:16:55.397 +05:30] Failed to save status                         caller="platform/status.go:175" user_id=gt5aricnu7g7xkr4jstfybgmbc error="failed to upsert Status: sql: database is closed"
```

The DB handle is a global object that is finally closed
at a higher layer after all the necessary tasks are finished.
So closing it prematurely, in the boards shutdown phase
is not necessary and can cause failures as observed above.

To fix this, we just remove the shutdown method.

```release-note
NONE
```

* fix tests

```release-note
NONE
```
2023-04-12 15:40:03 +02:00
Miguel de la Cruz
4cc2fed079 Adds support for public routes on shared boards (#22710)
* Adds support for public routes on shared boards

* Fix linter

* Address review comments

* Update playbooks registerProduct call

* Use boards product config for setting

* update additional product locations for parameter changes

* fixes for read-only when logged in

* turn off global header and don't initialize plugin if shared board

* fix unit tests

* revert package-lock.json

* more fixes

* Remove FF check for system console setting for boards

* update tests, Product boards is displayed in system console

* only check products section of config

* update test for config change

---------

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-06 12:24:32 -06:00
Doug Lauder
69657be9f2 Boards: Avoid panic in Boards file request handler when file not found. (#22792)
* Avoid panic in Boards file request handler when file not found.
2023-04-03 12:27:16 -04:00
Doug Lauder
99467c6b68 MM-51792 Replace Boards feature flag with env var (#22739)
* 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>
2023-03-31 10:29:29 -04:00
Jesse Hallam
1cf0cff9c6 Boards: Use custom placeholder for telemetry. (#22623)
Adopt `placeholder_boards_rudder_key` as the replacement value for injecting the telemetry key, allowing Boards to preserve its unique telemetry key.

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-27 13:20:39 -03:00
Harshil Sharma
3e85a9bb3a Updated query to support old mysql version (#22606)
* Updated query to support old mysql version

* Added tests

* Using foundation for tests

* Removed unused override params

* Removed unused override params
2023-03-27 09:53:05 +02:00
Agniva De Sarker
d8d3c6e7a6 MM-51699: Skip flaky test (#22635)
https://mattermost.atlassian.net/browse/MM-51699

```release-note
NONE
```
2023-03-27 10:28:16 +05:30
Doug Lauder
c943ed6859 Mono repo -> Master (#22553)
Combines the following repositories into one:

https://github.com/mattermost/mattermost-server
https://github.com/mattermost/mattermost-webapp
https://github.com/mattermost/focalboard
https://github.com/mattermost/mattermost-plugin-playbooks
2023-03-22 17:22:27 -04:00