Commit Graph

171 Commits

Author SHA1 Message Date
Carlos Tadeu Panato Junior
959834aefa update mattermost server build to use go 1.16.6 (#17969)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-07-21 11:19:28 +02:00
Emil Velikov
a78a7c7b54 Split package target into per platform (#17692)
Currently the `package` make target handles all three platforms -
Windows, OSX and Linux. While doing it in surprisingly serial mode.

Split it up in 3, so that things are a bit faster and people can package
only what they need.

v2: Rebase (platform was removed)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Co-authored-by: Emil Velikov <emil.velikov@collabora.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-07-19 14:35:21 +02:00
Mattermod
4ad0193d0a Bump version (#17932)
Co-authored-by: Mmbot <mmbot@mattermost>
2021-07-15 18:17:48 +02:00
Carlos Tadeu Panato Junior
eaa76e9529 go: upgrade builder image to use go1.16 (#17897)
* go: upgrade builder image to use go1.16
2021-07-14 13:39:19 +02:00
Elisabeth Kulzer
0765f27483 Enable e2e testing with docker-compose on GitLab (#17765)
* Make testing with docker-compose work on GitLab.

* Comment heavy jobs.

* Make testing with docker-compose work on GitLab.

* Comment heavy jobs.

* Fix images

* Addressing review.
2021-06-23 15:31:57 +02:00
Mattermod
71ef1c5386 Bump version (#17819)
Co-authored-by: Mmbot <mmbot@mattermost>
2021-06-22 13:08:49 +02:00
Mattermod
d093e102a4 Bump version (#17790)
Automatic Merge
2021-06-16 16:10:22 +02:00
Mattermod
45550d4d2a Bump version (#17716)
Automatic Merge
2021-06-04 11:40:22 +02:00
Ibrahim Serdar Acikgoz
0e42613aef cmd: remove platform binary (#17712) 2021-06-04 10:32:50 +03:00
Claudio Costa
3681cd3688 [MM-32390] Config logic refactor (#17578)
* Replace config generator

* Cleanup

* Some renaming and docs additions to add clarity

* Cleanup logging related methods

* Cleanup emitter

* Fix TestDefaultsGenerator

* Move feature flags synchronization logic out of config package

* Remove unnecessary util functions

* Simplify load/set logic

* Refine semantics and add some test to cover them

* Remove unnecessary deep copies

* Improve logic further

* Fix license header

* Review file store tests

* Fix test

* Fix test

* Avoid additional write during initialization

* More consistent naming

* Update app/feature_flags.go

Co-authored-by: Christopher Speller <crspeller@gmail.com>

* Update config/store.go

Co-authored-by: Christopher Speller <crspeller@gmail.com>

* Update config/store.go

Co-authored-by: Christopher Speller <crspeller@gmail.com>

* Update config/store.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* Move FF synchronizer to its own package

* Remove unidiomatic use of sync.Once

* Add some comments

* Rename function

* More comment

Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2021-05-19 13:30:26 +02:00
Carlos Tadeu Panato Junior
fc75b72bba ci: upgrade inbucket (#17560) 2021-05-12 12:45:03 +02:00
Carlos Tadeu Panato Junior
c90c371fd4 build/package: remove dist/mattermost directory (#17601) 2021-05-11 12:23:25 +02:00
Carlos Tadeu Panato Junior
0cbfc58276 ci: update inbucket to use mattermost/inbucket:release-1.2.0 (#17559) 2021-05-03 15:24:51 +02:00
Jesús Espino
d2ed053b6b Add doc extraction dependencies (#17403)
Automatic Merge
2021-04-19 18:06:05 +02:00
Max Erenberg
869da7a78b [MM-32044] Reset SAML auth data (#17161)
Automatic Merge
2021-04-13 00:46:30 +02:00
Mattermost Build
565f65a0c3 Bump version (#17368)
Co-authored-by: Mmbot <mmbot@mattermost>
2021-04-09 13:32:27 +02:00
Doug Lauder
02196e04fa MM-27493 Shared channels (MVP) (#17301)
Remote Cluster Service
- provides ability for multiple Mattermost cluster instances to create a trusted connection with each other and exchange messages
- trusted connections are managed via slash commands (for now)
- facilitates features requiring inter-cluster communication, such as Shared Channels
Shared Channels Service
- provides ability to shared channels between one or more Mattermost cluster instances (using trusted connection)
- sharing/unsharing of channels is managed via slash commands (for now)
2021-04-01 13:44:56 -04:00
Mattermost Build
9d65b72a3a Bump version (#17195)
Co-authored-by: Mmbot <mmbot@mattermost>
2021-03-22 16:23:11 +01:00
Martin Raymond Kraft
58dce5930e [MM-31094] Replication Lag (#16888)
* MM-31094: Adds tooling to develop and test using a MySQL instance with replication lag. Adds some lazy lookups to fallback to master if results are not found.

* MM-31094: Removes mysql-read-replica from default docker services.

* MM-31094: Switches (store..SessionStore).Get and (store.TeamStore).GetMember to using context.Context.

* MM-31094: Updates (store.UsersStore).Get to use context.

* MM-31094: Updates (store.PostStore).Get to use context.

* MM-31094: Removes feature flag and config setting.

* MM-31094: Rolls back some master reads.

* MM-31094: Rolls a non-cache read.

* MM-31094: Removes feature flag from the store.

* MM-31094: Removes unused constant and struct field.

* MM-31094: Removes some old feature flag references.

* MM-31094: Fixes some tests.

* MM-31094: App layers fix.

* MM-31094: Fixes mocks.

* MM-31094: Don't reparse flag.

* MM-31094: No reparse.

* MM-31094: Removed unused FeatureFlags field.

* MM-31094: Removes unnecessary feature flags variable declarations.

* MM-31094: Fixes copy-paste error.

* MM-31094: Fixes logical error.

* MM-30194: Removes test method from store.

* Revert "MM-30194: Removes test method from store."

This reverts commit d5a6e8529b.

* MM-31094: Conforming to make's strange syntax.

* MM-31094: Configures helper for read replica with option.

* MM-31094: Adds some missing ctx's.

* MM-31094: WIP

* MM-31094: Updates test names.

* MM-31094: WIP

* MM-31094: Removes unnecessary master reads.

* MM-31094: ID case changes out of scope.

* MM-31094: Removes unused context.

* MM-31094: Switches to a helper. Removes some var naming changes. Fixes a merge error.

* MM-31094: Removes SQLITE db driver ref.

* MM-31094: Layer generate fix.

* MM-31094: Removes unnecessary changes.

* MM-31094: Moves test method.

* MM-31094: Re-add previous fix.

* MM-31094: Removes make command for dev.

* MM-31094: Fix for login.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-03-12 12:37:30 -05:00
Elisabeth Kulzer
fa2ecad0a9 Remove Jenkinsfile (#17066) 2021-03-04 16:38:23 +01:00
Jyoti Patel
87f553283a [GH-15906][MM-22844] Redesign welcome and verify email. (#16824)
Automatic Merge
2021-02-26 05:22:26 +01:00
Martin Raymond Kraft
22308ea21c Updates the release version of the osixia/openldap Docker image. (#16893) 2021-02-17 16:10:27 -05:00
Mattermost Build
46b4987873 Bump version (#16952)
Co-authored-by: Mmbot <mmbot@mattermost>
2021-02-17 10:50:21 +01:00
Mattermost Build
c14194d78b Bump version (#16813)
Automatic Merge
2021-01-28 13:15:17 +01:00
Jesse Hallam
f8caa6c841 Job metrics & dynamic Grafana annotations (#16650)
* docker: prometheus and grafana for development

Add prometheus and grafana docker configuration when developing with access to the enterprise repository. This simplifies the setup for developers adding new metrics or even examining events from their development server. The services are disabled by default when no enterprise source is detected.

Grafana is provisioned automatically with the Prometheus datasource, as well as the canonical dashboards used with Mattermost. Furthermore, no authentication is required to access Grafana to simplify access from a development environment. The default home dashboard is customized to automatically show links to the provisioned dashboards. Dashboards can be saved, and login remains available via the default `admin/admin` credentials (which initiates a password reset), but no dashboard or system configuration is (currently) persisted if the container is destroyed.

Linux requires slightly special handling (well, really it's Docker for MacOS/Windows), in that `host.docker.internal` is the canonical way to resolve the host on MacOS/Windows, but on Linux it's usually sufficient to just use `localhost`. Until https://github.com/docker/for-linux/issues/264 is resolved, this PR includes code to customize the Prometheus configuration to point at the required address for the running platform.

* metrics: track active jobs by type

* metrics: active jobs chart

* metrics: server start and job annotations

* Update build/docker-compose.common.yml

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* prometheus: resolve docker host via 172.17.0.1 instead

* skip enabling prometheus and grafana by default

* handle JOB_STATUS_ERROR and JOB_STATUS_CANCELED end states

* handle nil srv.metrics

* lookup job to determine type for metrics

* mocked unit tests for jobs

* goimports lint fixes

* missing license

* add instance to server start tag

* filter annotations by selected instance

Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-20 15:43:02 -04:00
Jesse Hallam
d5659adbd7 docker: prometheus and grafana for development (#16649) 2021-01-19 22:28:22 -04:00
John Tzikas
0391fe7de9 Add make command for running the app in an HA topology (#16702)
* Add make command for running the app in an HA topology

* Tidy up conf files, remove unnecessary commands and add restart-haserver command

* Use the right flag for checking enterprise folder presence before ha setup
2021-01-18 19:38:44 +02:00
Agniva De Sarker
caeda90b24 Bump up Go docker image to 1.15.5 (#16744)
```release-notes
NONE
```
2021-01-16 09:35:38 +05:30
Scott Bishel
a40533e577 MM-30362: Cypress/E2E: LDAP-SAML Sync (#16616)
* allow username changes for testing

* remove bad cert, add new one

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-13 15:25:27 -07:00
Martin Kraft
405a305753 MM-31744: Removes privacy policy text from repo, points to website. (#16645) 2021-01-07 09:06:10 -05:00
Elisabeth Kulzer
aa7aefbac3 Bump golang image (#16314)
* Fix images

* Add golangci-lint also

* Bump golang image

* Replace tag

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-04 15:21:01 +01:00
Mattermost Build
83afd756b6 Bump version (#16592)
* Bump version

* Uncomment shouldPerformUpgrade

Co-authored-by: Mmbot <mmbot@mattermost>
Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
2020-12-23 16:33:07 +01:00
Agniva De Sarker
eb7c4580f8 MM-28549: Bump up postgres version (#16564)
https://mattermost.atlassian.net/browse/MM-28549

```release-notes
Mattermost does not support Postgres 9.4 anymore. The minimum
required version for Postgres will be 10.
```
2020-12-16 09:26:49 +00:00
Jason Paul Deland
b363ff3fad Update Jenkinsfile.branch
Revert changes to the branch used for saml libs
2020-12-10 19:48:34 -05:00
Jason Paul Deland
599e8f67e6 Update Jenkinsfile.branch
Update the saml libs branch to master also
2020-12-10 13:00:25 -05:00
Amy Blais
e8371d915f Update Dockerfile (#16488)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-07 12:44:41 +01:00
Jason Paul Deland
f733ee9332 Update Jenkinsfile.branch
Adding SAML lib changes
2020-12-02 14:23:43 -05:00
Mario de Frutos Dieguez
58d362e0c8 Include cloud defaults in the EE release package (#16277)
That defaults file would be used in the cloud installations to set the
initial values for them
2020-11-16 16:52:26 +01:00
Agniva De Sarker
c82c37a36e MM-28067: Optimize app server startup in tests (#16263)
* MM-28067: Optimize app server startup in tests

For every test, we would wipe out the database and then start
the server again. This would run through all the migrations
and create new rows in Systems and Roles table every time.
As a result, this was consuming a lot of setup time for every test.

We optimize this by preloading the DB with dummy data in the roles
and systems table so that the server code just skips over those migrations.
This is completely forward compatible and adding new migrations does not
need to generate the sql files again. Only in case of schema changes to the
roles or systems table, this would need to be done.

It is unlikely the Systems table schema will get changed. The Roles table
might change in future but it's a comparatively rare event. Given the reduction
in CI runtime we are seeing, it's a worthy optimization.

We also apply some more optimizations:
- Coalesce multiple UpdateConfig calls into a single one. Each UpdateConfig call
has to do a json marshal which would take precious CPU cycles. It's much more
efficient to do everything in a single call.
- Remove unnecessary debug.FreeOSMemory in reload config. This was an artifact
from old days and is no longer required.

Numbers:
Results show a full **2 minutes** shaved off the test runtime. Earlier, tests
would take around 16 minutes. Now they take 14 minutes.

```release-note
NONE
```

* fix app package
2020-11-16 13:55:32 +01:00
cpanato
0f4c6bc074 fix git commit hash to use in the docker image 2020-11-11 19:27:45 +01:00
cpanato
3782b3e21b fix docker push 2020-11-11 18:25:53 +01:00
cpanato
37e8fe8e33 fix build branch pipeline 2020-11-11 17:42:07 +01:00
Carlos Tadeu Panato Junior
2c08ff1299 build: push git commit hash as tags as well (#16261) 2020-11-11 17:11:48 +01:00
Amy Blais
28983fa88d Update Dockerfile (#16118)
Automatic Merge
2020-10-29 08:54:01 -04:00
Mario de Frutos Dieguez
bb095c2a1a mmctl is not being included in the package (#16105)
It's was including it in the bin folder but when we package we need to include it in the dist/bin so right now the `download_mmctl` script accepts a second parameter to define the path where the binary is going to be stored
2020-10-28 13:59:49 +01:00
Elisabeth Kulzer
8c63eb7232 DOPS-243: Add manifest.txt (#15959)
* DOPS-243: Add manifest.txt

* Update build/release.mk

* Change path

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-23 09:41:33 +02:00
Jason Paul Deland
e280aa1c63 Update to get latest release from S3 (#15952)
* Update to get latest release from S3

* Update mmctl to download to use S3

* Download MMCTL from S3

* Update download_mmctl_release.sh

* Update Makefile

* Update release.mk

* Update the script called, remove call to sub shell and clean up indentation

* Add quotes around THIS_BRANCH var

* Update script to support overriding the OS for packaging

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-16 20:27:50 -04:00
Elisabeth Kulzer
b9f8d24cbc Move environment variables to env-file (#15820) 2020-10-08 11:24:16 +02:00
Elisabeth Kulzer
14fe307436 Add healthcheck to docker-compose databases to easier debug (#15735)
* Waiting for postgres to startup before tests

* Add healthcheck

* Test postgres default

* Prefer pgisready command

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-02 12:32:23 +02:00
Carlos Tadeu Panato Junior
c2554dc30e bump the package placeholder to use the latest mm package release (#15688) 2020-10-01 13:50:26 +02:00