Due to the recent changes in error wrapping, the DetailedError
field does not contain the full info of all the wrapped errors.
Therefore, while printing the error, we display the stringified
representation instead of only the DetailedError field.
```release-note
NONE
```
Summary
We need a pointer to a pointer to set the original pointer to nil
The original task was not being set to nil (the local variable containing the pointer was being set to nil). The cancel function was being called even though the task had already been cancelled. This repeated cancellation was causing a panic because we were trying to close a channel that had already been closed the first time the task was cancelled.
Ticket Link
https://mattermost.atlassian.net/browse/MM-46402
* re-assign cluster interface after initializing enterprise interfaces
* add a unit test to check if cluster is triggered
* remove env overrides
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* [fix] Dockerfile using Debian instead of Alpine
We are switching to building docker container for Matermmost-server & enterprise
from Alpine Linux(unsupported) to Debian(supported)
This image is used for e2e testing.
Rationalle:
Alpine is actually unsupported distro for Mattermost-server. https://docs.mattermost.com/install/software-hardware-requirements.html#mattermost-server-operating-system
On top of that, Alpine linux uses musl libc vs glibc, which can cause several issues when testing
Finally We got to a point of being unable to run Alpine based mattermost instances with: `Error relocating ./mattermost: fcntl64: symbol not found`
Details @ https://github.com/mattermost/mattermost-server/pull/20735
Specifically the following changes are introduced:
- switching to using Debian Buster as being a supported linux flavor for Mattermost
- pinning the Debian base image with SHA hash
- defining Shell as bash, and enabling pipefail
- pinning additional packages installed using apt
- removing unused cache
- improving MM_PACKAGE variable checking logic introducing non zero exit code (127) when failing
- migrating adduser and addgroup command, to debian compatible
- removing unused chown dirs
Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
* [fix] Using bash as a more capable shell
* [fix] Installing optional packages needed for tests
These packages are needed to perform succesfull end to end testing.
Relevant documentation:
https://docs.mattermost.com/configure/file-storage-configuration-settings.html#enable-document-search-by-content
Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
* [feat] essential multi-product architecture changes
This takes care of aligning mattermost-server CircleCI pipeline to the mutlti-product architecture.
Specifically the following are performed:
- seperation of mattermost-server and mattermost-webapp clone/setup stages
- introduction of clone/setup stage for focalboard
- change to using cimg/base image instaed of mattermost/mattermost-build-webapp when cloning/setup mattermost-server
- introduction of `configure-multirepo` stage, in which multi-module workspaces (golang) configuration is being performed for mattermost-server and focalboard
- introduction of parallel build of focalboard along with mattermost-server
- reorganisation of step dependencies, to accomodate `configure-multirepo` step
Ticket: https://mattermost.atlassian.net/browse/CLD-3801
Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
* MM-45120: Starts tracking team join time. Adds API to retrieve team members who joined after a given time.
* MM-45120: Updates json casing to match model.User.
There were lots of cases where we were using the code 501
in an incorrect manner, and since 5xx codes are considered
as SLO violations, these were flagged by our monitoring incorrectly.
These were the guidelines to change the codes:
1. Any case of missing license or config not correctly enabled
is set as Forbidden. The logic is that the user is correctly
authenticated with a session, but does not have enough privileges
to have the higher license, or hasn't changed the config correctly.
2. Any case of incorrectly formed request is obviously a 400.
https://mattermost.atlassian.net/browse/MM-43202
```release-note
NONE
```
During attaching an object to a websocket message, we would
marshal it to json and attach the string output. But if the
marshalling failed, we would just log a warning and move on.
This would add an empty string to the message. But the client
assumes that the object is correctly attached and would
fail silently if it cannot find it.
So we become more strict and return the error so that
it reaches the caller.
https://mattermost.atlassian.net/browse/MM-45993
```release-note
NONE
```
The method a.postRemoveFromChannelMessage was being called
from a goroutine. Therefore, when SystemAdminClient.GetFlaggedPostsForUser
was being called later in the test with a mock post store,
it would naturally fail because the store would now be a
different store but the goroutine was supposed to be finished.
A hacky solution would be to add a sleep before
starting the mocked API call. But a deeper question
is why was the method run in a goroutine in the first place.
Removing a user from a channel is not a very common operation
and even if we look at the method, if the user is trying to
remove themselves, that message happens synchronously, but if
they are removing another user, that runs in a goroutine.
This seems like a very weird behavior. Therefore, to be consistent
I have just removed the goroutine and made everything synchronous.
The next step would be to stop logging an error and just return
the error upwards instead. Because that's what happens in the other
condition. But that would be exceeding the scope too much. Maybe
in a separate PR.
https://mattermost.atlassian.net/browse/MM-45021
```release-note
NONE
```
* Revert "Revert "MM-43828: Pass object length for some image operations (#20711)" (#20740)"
This reverts commit c7ae090dad.
* Fix to work in bifrost mode
```release-note
NONE
```