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.
* 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>
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
```
* 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
* 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>
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>
* 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>
* 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
```
* 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>
* 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>
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>
* Updated query to support old mysql version
* Added tests
* Using foundation for tests
* Removed unused override params
* Removed unused override params