Commit graph

288 commits

Author SHA1 Message Date
Doug Lauder
8be71b1498
Don't insert nulls into blocks_history table. (#1890)
Ensure all fields are non-NULL when inserting into blocks_history (on block delete).
2021-12-03 12:32:57 -05:00
Chen-I Lim
ed2c916afa
Update to v0.12 (#1904) 2021-12-01 14:55:47 -08:00
Jesús Espino
2f08c67827
Adding explict logout logic (#1895)
* Adding explict logout logic

* Fixing golangci-lint errors
2021-12-01 10:21:31 +01:00
Chen-I Lim
91dc9def9b
Update version to 0.11.0 (#1859) 2021-11-22 16:15:03 -08:00
PrasannaSudharsan R
09f0f0717c
425|Added unit tests for workspaces.go (#1800) 2021-11-22 01:46:51 -05:00
Miguel de la Cruz
e7c38c8822
Adds data migrations and the unique IDs migration (#1776)
* Adds data migrations and the unique IDs migration

* Adds GetSystemSetting tests

* Add log statements to data migrations

* Move migrations to the store and ensure they follow an order mixing database and data migrations

* Fix system settings

* Add tests for unique id migration

* Small comment change

* Make a couple of methods private and wrap the migration in a transaction

* Update public methods

* Add database mutex to data migrations

* Create server params and pass a mutex factory to the store

* Fix plugin linter

* Make isPlugin private

* Fix comment typo

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

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2021-11-11 17:01:43 +01:00
Scott Bishel
f74eea11ba
Fix for feature flag handling (#1753)
* fix for handling feature flags changing

* update tests

* fix tests

* lint fixes

* feedback updates

* use getConfig instead

* linter fix

* more linter

* revert changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-09 07:56:04 -07:00
Miguel de la Cruz
fa36e092bb
Server generated ids (#1667)
* Adds server ID generation on the insert blocks endpoint

* Fix linter

* Fix server linter

* Fix integration tests

* Update endpoint docs

* Update code to use the BlockType2IDType function when generating new IDs

* Handle new block ids on boards, templates and views creation

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-05 11:54:27 +01:00
Miguel de la Cruz
751f632c36
Modify store creation not to fail on template initialization failure (#1722) 2021-11-03 19:10:32 +01:00
Doug Lauder
849cc5c195
Move BlockType2IDType from utils to model (#1744) 2021-11-03 12:01:39 -04:00
Miguel de la Cruz
59413a9fc4
Changed server not bind to any port to debug, as it's a plugin only option (#1743) 2021-11-03 15:24:31 +01:00
Doug Lauder
c3a08c3418
utils.BlockType2IDType (#1715) 2021-11-02 09:17:53 +01:00
Scott Bishel
9b9682f626
Create FeatureFlags in configurations (#1622)
* create FeatureFlags in configurations

* update for unit tests

* update unit tests, go.mod

* update go.sum

* fix lint errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-01 19:12:43 -06:00
Doug Lauder
c9a629d135
typed block type (#1672) 2021-10-26 21:11:19 -04:00
Archit Mathur
5848ea1c07
[GH-1256] feat: config file flag (#1418)
* feat: adds support for --config

* feat: adds support for configFilePath in startServer

* chore: removes ugly spacing
2021-10-26 17:49:20 +05:30
Harshil Sharma
1eb5c22571
Removed nullability of block created by and modified by fields: (#1603)
* Rmeoved nullability of block created by and modified by fields:

* Fixed incorrect column name in migration
2021-10-25 19:50:38 +05:30
Chen-I Lim
ae552e260c
Update to v0.10 (#1633) 2021-10-22 13:59:05 -07:00
Hossein
eed1f86c15
Unfurl Focalboard Link (#1081) 2021-10-22 12:13:31 -04:00
Miguel de la Cruz
8666bc833a
Adds a generator that wraps store methods with transactions and migrates implementations to use transactions (#1440)
* Adds a generator that wraps store methods with transactions and migrates implementations to use transactions

* Remove OpenTracing parameters from the generator

* Remove unused template methods

* Generate transactional methods only for those labelled as so

* Fix linter
2021-10-22 12:48:53 +02:00
Scott Bishel
d0083f6ed0
GH-1489: Add Telemetry for Shared Boards (#1610)
* add telemetry for shared boards

* move where setting view out of Routes

* add for configuration setting

* fix spacing

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-10-21 11:17:31 -06:00
Doug Lauder
4b5436696f
don't allow notifications for import (#1565) 2021-10-15 15:09:43 -06:00
Scott Bishel
a756b7e1c6
remove connection string from log (#1564) 2021-10-14 13:04:35 -04:00
Miguel de la Cruz
a184206395
Change the unregistered connection logline to debug level (#1494) 2021-10-08 11:59:21 +02:00
Doug Lauder
db8d91f889
use milliseconds for all timestamps (server) (#1447) 2021-10-07 07:51:01 -04:00
Doug Lauder
4feafb9806
Channels style UUID (#1369)
* server channels style uuids
* webapp channels style uuids
2021-10-05 09:52:59 -04:00
Doug Lauder
1a59052f0c
Update migrate.go (#1396)
Remove left-over debugging line.
2021-10-04 10:06:01 +05:30
Miguel de la Cruz
ce98ec55fc
Recovers inactive websockets connections on reconnect in plugin mode (#1324)
* Stores a cache of inactive connections so their subscriptions are recovered on reconnections

* Adds test for getUserIDsForWorkspace and simplify messages through helpers

* Make the plugin websocket client more resilient

* Remove missed event callback and limit ws state polling to one at a time

* Add read lock for the plugin adapter and guarantee atomic ops on inactiveAt

* Add mutex to the plugin adapter client and tests to cover for races

* Split plugin adapter mutex in two and use them to lock only on data access

* Group plugin adapter fields by the mutex that's guarding them
2021-09-29 18:19:34 +02:00
Harshil Sharma
e40424e319
Handled the case of missing user (#1367) 2021-09-29 11:27:21 +05:30
Miguel de la Cruz
a8da028bc7
Adds workspaceID to blocks and makes board page only reacts to the workspace updates (#1299) 2021-09-22 13:57:00 -06:00
Miguel de la Cruz
9086246fb5
Adds modd based targets that watch both server and webapp (#1257)
* Adds modd based targets that watch both server and webapp

* Add modd precheck to related targets
2021-09-22 15:40:04 +02:00
Harshil Sharma
950a88be5e
Added MySQL migration for applying column level collation (#1297) 2021-09-22 09:23:02 +05:30
Scott Bishel
9c94bbb19a
disable flakey test (#1306) 2021-09-21 13:25:45 -04:00
Doug Lauder
6daaf3ef59
ensure @mentions only sent to team members (#1216) 2021-09-20 17:32:47 -04:00
Harshil Sharma
5faa669739
Workspace switcher query Mysql issue resolved (#1252)
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-09-20 14:14:19 +05:30
Chen-I Lim
33e717d9bc Update version to v0.9.1 2021-09-17 12:56:47 -07:00
Scott Bishel
838c6f90b7
Config for share board (#1187)
* initial commit for setting shared board configuration

* add unit test

* working again

* update default config

* initial commit for setting shared board configuration

* add unit test

* working again

* update default config

* add unit tests, some clean up

* more cleanup

* more clean up

* remove header text for GH-1105

* remove unnecessary logs

* update text

* fix lint errors

* more lint fixes

* webapp lint fixes

* Update mattermost-plugin/plugin.json

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>

* Update mattermost-plugin/plugin.json

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>

* update for review, sync with main

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
2021-09-16 13:31:02 -06:00
Miguel de la Cruz
f7946821a0
Propagate block changes to all of the cluster nodes in plugin mode (#1213)
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-09-16 12:18:11 +02:00
Doug Lauder
a76385268e
MM-38342 plugin logging (#1193)
- bump chat server version
- plugin logging adapter
2021-09-15 09:01:05 -04:00
Doug Lauder
8425f53b2a
@mention support (#1147) 2021-09-13 15:36:36 -04:00
Harshil Sharma
20aafbc376
Displayed channels names for DMs in user workspace list (#1179) 2021-09-13 17:42:32 +05:30
Harshil Sharma
bb4b463a4f
Workspace Switcher - include channels with no workspaces and boards (#1158)
* API WIP

* WIP

* Finished changes

* Fixed colors:

* Don't enforce charset adn collation in migration, pick from database DSN

* Added MySQL query

* Updated mocks

* Added tests

* Lint fixes

* Fixed typo and removed unsed style

* Checked in a snapshot

* Updated snapshot

* Updated Cypress test

* Updated Cypress test

* Updated Cypress test

* Fixed review comments

* Fixed tests

* Added default collation for MySQL

* Added documentation for ensuring correct database collation

* Updated migrations

* Fixed a bug with collation

* Fixed lint errors

* Used correct collation

* debugging

* Updating css

* Minor UI changes

* USe inbuilt default collation

* Used only charset for mysql

* Fixed linter issue:

* Added migration for matching collation

* Reverted local config changes

* Reverted local config changes

* Handled the case of personal server running on MySQL

* WIP

* Now running collation matching migration onlyt for plugins

* Minor optimization

* Multiple review fixes

* Added group by clause to primary query

* Supported for subpacth

* Displayed all channels in workspace switcher

* Included channels without a Focalbaord workspaces in worksapce switcher as well

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-09-09 16:18:07 +05:30
Harshil Sharma
08db4fed61
Workspace switcher (#1052)
* API WIP

* WIP

* Finished changes

* Fixed colors:

* Don't enforce charset adn collation in migration, pick from database DSN

* Added MySQL query

* Updated mocks

* Added tests

* Lint fixes

* Fixed typo and removed unsed style

* Checked in a snapshot

* Updated snapshot

* Updated Cypress test

* Updated Cypress test

* Updated Cypress test

* Fixed review comments

* Fixed tests

* Added default collation for MySQL

* Added documentation for ensuring correct database collation

* Updated migrations

* Fixed a bug with collation

* Fixed lint errors

* Used correct collation

* debugging

* Updating css

* Minor UI changes

* USe inbuilt default collation

* Used only charset for mysql

* Fixed linter issue:

* Added migration for matching collation

* Reverted local config changes

* Reverted local config changes

* Handled the case of personal server running on MySQL

* WIP

* Now running collation matching migration onlyt for plugins

* Minor optimization

* Multiple review fixes

* Added group by clause to primary query

* Supported for subpacth

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
2021-09-08 10:22:03 +05:30
Scott Bishel
94e6e8a9f7
Plugin telemetry (#1069)
* implement webapp telemetry

* cleanup

* remove imports, update events

* change event title

* update for lint

* add test, update filename

* linter fix

* fix field name

* revert changes

* fix test

* update builds

* fix workflows

* fix workflows

* fix workflow

* temp checkin

* remove log lines

* updates from peer review
2021-09-01 15:53:27 -06:00
PrasannaSudharsan R
59b8ae4517
423 | Added unit tests for files.go (#1119)
* 423 | Added unit tests for files.go

* 423| Fixed linting errors

* 423 | Fixed linting errors in files_test.go

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2021-08-31 16:08:18 -06:00
dave
414d651d2c
[GH-432] Add unit tests for ./services/telemetry/telemetry.go (#1091)
* Add unit tests  for ./services/telemetry/telemetry.go

* make ci happy

* Update server/services/telemetry/telemetry_test.go

Update imports

* Update server/services/telemetry/telemetry_test.go

* Update server/services/telemetry/telemetry_test.go

* Update server/services/telemetry/telemetry_test.go

* Update server/services/telemetry/telemetry_test.go

Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2021-08-30 20:16:47 -06:00
Miguel de la Cruz
e10229031f
Add a plugin adapter to reuse MM websocket in plugin mode (#1079)
* Add a plugin adapter to reuse MM websocket in plugin mode

* Remove development replace

* Switch all go.mod files to use 1.16

* Fix linter issues

* Fix linter

* Update server version to contain the new hooks
2021-08-27 10:59:14 +02:00
Jesús Espino
e834c15ce7
Only run the sessions clean up on plugin mode (#1043)
* Only run the sessions clean up on plugin mode

* fix error
2021-08-26 11:33:34 +02:00
Doug Lauder
b58497e2ea
Replace mlog with server v6 mlog (#1088)
* replace mlog with server v6 mlog
* remove FB mlog from plugin
2021-08-25 16:08:01 -04:00
Miguel de la Cruz
f9c76d8129
Update focalboard to be compatible with mattermost v6 (#1020)
* Update focalboard to be compatible with mattermost v6

* Point to the new plugin API version

* Fix collectors linter issues

* Move all CI jobs to 1.16
2021-08-24 12:13:58 +02:00
Harshil Sharma
0d97b6e281
Table calculations (#761) 2021-08-10 14:19:00 -04:00