Commit graph

17 commits

Author SHA1 Message Date
Ben Schumacher
b2df9be70b
Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
catalintomai
7d8b7b5e4a
MM-63930: Lack of MFA enforcement in Websocket connections (#33381) 2025-09-12 08:35:06 +02:00
Ben Schumacher
9add320011
[MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
David Krauser
761584c040
[MM-64244] Add websocket disconnect reason metric (#31032)
We've recently spent some effort improving websocket reconnection logic. With this commit, I've augmented the websocket reconnect metric to include a disconnect reason. This will help us measure the impact of these changes in production.
2025-05-30 08:15:20 -04:00
Claudio Costa
611b2a8e79
[MM-62408] Server Code Coverage with Fully Parallel Tests (#30078)
* TestPool

* Store infra

* Store tests updates

* Bump maximum concurrent postgres connections

* More infra

* channels/jobs

* channels/app

* channels/api4

* Protect i18n from concurrent access

* Replace some use of os.Setenv

* Remove debug

* Lint fixes

* Fix more linting

* Fix test

* Remove use of Setenv in drafts tests

* Fix flaky TestWebHubCloseConnOnDBFail

* Fix merge

* [MM-62408] Add CI job to generate test coverage (#30284)

* Add CI job to generate test coverage

* Remove use of Setenv in drafts tests

* Fix flaky TestWebHubCloseConnOnDBFail

* Fix more Setenv usage

* Fix more potential flakyness

* Remove parallelism from flaky test

* Remove conflicting env var

* Fix

* Disable parallelism

* Test atomic covermode

* Disable parallelism

* Enable parallelism

* Add upload coverage step

* Fix codecov.yml

* Add codecov.yml

* Remove redundant workspace field

* Add Parallel() util methods and refactor

* Fix formatting

* More formatting fixes

* Fix reporting
2025-05-30 13:58:26 +02:00
Claudio Costa
528026d6fb
Use CreateConnectedWebSocketClient test util (#30036) 2025-01-29 07:58:43 -06:00
Arya Khochare
b0cdc51aa4
errcheck issues fixed (#28572)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-10-15 12:46:06 +02:00
Arya Khochare
a040618485
Added log to show which URL is blocked by CORS. (#26347)
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-06 08:25:50 +05:30
Agniva De Sarker
7dcf5f85a5
MM-56071: Track multiple threads (#25775)
We can have 2 types of threads open at the same time. One from
the thread view, and another from RHS.

We add another variable to distinguish between the 2 states.

In future, if we have the ability for more than 2 threads, then
we would need to track by threadID.

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

```release-note
NONE
```
2023-12-21 08:42:58 +05:30
Agniva De Sarker
c42ae47948
MM-56071: Thread presence indicator (#25694)
We also track the channelID of the thread opened.

Additionally on every connection create or re-connect
with an existing queue, we reset the active state to empty
to avoid any edge-cases.

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

```release-note
NONE
```
2023-12-13 13:58:40 +05:30
Agniva De Sarker
e0b5b951f1
MM-56060: Create base scaffolding for websocket pub-sub (#25654)
We create a new websocket action called "presence" which
can contain the active_channel and the active_team for a given
client connection.

On the client side, for every channel or team switch, we send
out this message.

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

```release-note
NONE
```
2023-12-12 08:49:09 +05:30
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
Ben Schumacher
6c82605df0
[MM-49989] Pass a context.Context to Client4 methods (#22922)
* Migrate all method in model/client4.go to accept a context.Context

* Fix th.*Client

* Fix remaining issues

* Empty commit to triger CI

* Fix test

* Add cancellation test

* Test that returned error is context.Canceled

* Fix bad merge

* Update mmctl code

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-06 23:29:29 +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
Jesse Hallam
89f2ebc836
Channels/api4 testing improvements (#22938)
* api4/post_test: fix missing TearDown

* api4/plugin_test: dont test timeout, saving 120s

* api4/channel_test: dont try to delete town square

* api4/channel_test: check public channel names deterministically

* api4/file_test: fix darwin assertions on go files

* api4/notify_admin_test: fix expect/actual order

* api4/team_test: make TestGetAllTeams deterministic

* api4/plugin_test: avoid nested test helpers

* api4/post_test: avoid nested test helpers

* api4/websocket_test: externalize log buffer

* testlib/helper: unset common env

* linting issues

* simplify TestGetFileHeaders

* team_test: leverage ElementsMatch
2023-04-20 09:52:59 -03: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
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
Renamed from api4/websocket_test.go (Browse further)