Граф коммитов

163 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
4bc2ed3973 Bump GoSAML dependency (#20092)
```release-note
NONE
```
2022-04-28 22:28:58 +05:30
Agniva De Sarker
48f8e2fa44 MM-43753: Go mod tidy for 1.18 (#20073)
We bump the go.mod version to 1.18
and run go mod tidy.

This is required for using new features.

```release-note
NONE
```
2022-04-27 13:51:49 +05:30
Agniva De Sarker
9d37a6cc3d MM-42927: Use new gosaml2 library (#20004)
```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-26 11:28:49 +05:30
Nazar Vovk
3476eccf5b Update minio-go dependency to 7.0.24 (#20006)
* Update minio-go dep to 7.0.24

* Bringing back some removed libraries

```release-note
NONE
```

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2022-04-16 10:38:32 +05:30
Agniva De Sarker
56dfcddff5 MM-43143: Dataloaders for roles (#19936)
We use a dataloader to optimize roles loading.

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

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-08 15:32:35 +05:30
Agniva De Sarker
bc69069a83 MM-42570: Update dependencies (#19901)
https://mattermost.atlassian.net/browse/MM-42570

```release-note
NONE
```
2022-04-06 06:44:42 +08:00
Jesse Hallam
7b5ac343f0 adopt forked squirrel supporting from UPDATE FROM (#19896)
Fork https://github.com/Masterminds/squirrel as https://github.com/lieut-data/squirrel with the following changes:
* https://github.com/Masterminds/squirrel/pull/256 supporting FROM clause to update builder (Postgres)
* Extension of above to support multiple FROM in UPDATE (Postgres)
* Support for multiple tables in UPDATE (MySQL)

This PR then leverages those changes to simplify a query that previously had to be coded by hand and duplicate for each of MySQL and Postgres.
2022-04-04 09:30:59 -03:00
Ibrahim Serdar Acikgoz
97d3368a98 update morph dependency (#19891) 2022-04-04 14:03:39 +03:00
Agniva De Sarker
4da98cb51a Kill gorp (#19786)
* Kill gorp

Gorp is dead. Long live Gorp.

```release-note
NONE
```
2022-03-15 19:49:19 +05:30
Ibrahim Serdar Acikgoz
a22bc8fd96 Update dependecies (#19635) 2022-02-28 09:37:32 +03:00
Agniva De Sarker
939551ed10 MM-38634: Simplify image proxy (#19603)
We copy over the necessary code to simplify
the local image proxy feature.

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

```release-note
NONE
```
2022-02-24 09:02:57 +05:30
Agniva De Sarker
2a59047d07 Moved morph dependency to new repo (#19618)
```release-note
NONE
```

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2022-02-23 20:11:12 +05:30
Agniva De Sarker
9640962428 Bump morph dependency (#19569)
```release-note
NONE
```
2022-02-16 22:30:41 +05:30
Agniva De Sarker
3f52bd197a GraphQL (part 2): Model changes and resolvers (#19486)
This PR adds the necessary resolvers to support
the graphQL front-end. Some additional methods
need to be added to the model structs to support
this. Comments have been made to clarify their purpose.

There is a slight duplication of code in the api layer.
But eventually that's going to go away when we move
away from the REST API entirely.

The schema is in api4/schema.graphqls and gets compiled
into the binary as an asset.

The GraphiQL editor url is at GET /api/v5/graphql.

Everything is behind the feature flag MM_FEATUREFLAGS_GRAPHQL.

```release-note
NONE
```
2022-02-11 12:37:05 +05:30
Agniva De Sarker
57eafbc6ca MM-40676: Bump dependencies (#19525)
https://mattermost.atlassian.net/browse/MM-40676

```release-note
NONE
```
2022-02-09 23:05:16 +05:30
Agniva De Sarker
d639e3c87c MM-41231: Bump morph dependency to avoid advisory locks (#19421)
https://mattermost.atlassian.net/browse/MM-41231

```release-note
NONE
```
2022-01-26 19:48:21 +05:30
Ibrahim Serdar Acikgoz
73ac1a354d Update morph dependecy to fix a data race (#19326)
* Update morph dependecy to fix a data race

* run go mod tidy
2022-01-13 12:41:56 +03:00
Ibrahim Serdar Acikgoz
f829dba615 Update morph dependency (#19308)
* Update morph dependency to use a newer version

* remove timeout check for migrations statements

* store/sqlstore: reset timeout for mysql while creating db for migrations

* update morph to v0.2.1
2022-01-12 17:24:29 +03:00
Claudio Costa
0bd19e682c Sanitize message in email template (#19304) 2022-01-11 11:40:00 +01:00
Ibrahim Serdar Acikgoz
6595b31f23 Replace go-migrate with morph (#19116) 2022-01-08 10:16:07 +02:00
Agniva De Sarker
b836edba40 MM-40537: Bump bleve dependency to fix Sentry crash (#19194)
* MM-40537: Bump bleve dependency to fix Sentry crash

We observed a sentry crash, which is now fixed upstream.
So we bump the dependency accordingly.

```release-note
NONE
```

* Fix vendor/modules.txt

```release-note
NONE
```

* New fix

```release-note
NONE
```

* Trigger CI
```release-note
NONE
```
2021-12-20 14:48:24 +05:30
Agniva De Sarker
189d447591 MM-39315: Bump dependencies (#19039)
Note: We keep splitio/go-client untouched
because the dependency is broken.

See https://github.com/mattermost/mattermost-server/pull/18604

```release-note
NONE
```
2021-11-24 19:45:28 +05:30
Ibrahim Serdar Acikgoz
ba3a911c99 [MM-39299] Remove outdated translations and update go-i18n library (#18674)
* Remove outdated translations

* update go-i18n dependency

* reflect review comments

* add message count for languages which has two translations for plurals
2021-10-15 16:26:25 +03:00
Agniva De Sarker
76d492f9ab MM-37186: Update dependencies (#18604)
* MM-37186: Update dependencies

The split client libraries were excluded from being upgraded.

See: https://github.com/splitio/go-split-commons/issues/56

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

```release-note
NONE
```

* Ignore staticcheck deprecation warnings

```release-note
NONE
```
2021-10-07 12:57:51 +05:30
Miguel de la Cruz
a9101d62a6 Update to bleve v2 and to use the scorch index (#18266)
Automatic Merge
2021-09-17 10:59:02 +02:00
Doug Lauder
bb659d03fd Fix plugin logging missing context fields
Fix an issue where context fields logged by server on behalf of plugins didn't contain correct name/value pairs:
- bump Logr version to add key/value methods to sugar logger
- expose factory args when configuring logging with custom target types (needed for FocalBoard to create log target adapter that converts typed fields into slices of interface{} as per plugin logging API)
2021-09-13 10:12:18 -04:00
Doug Lauder
a4507327a7 MM-36764 mlog refactor (#18118)
Refactor mlog
- simplify mlog by removing redundant code
- remove Zap dependency
- update unit test helpers
- update logging config
- update auditing
2021-08-17 16:08:04 -04:00
Claudio Costa
1ae1c38c9f [MM-36995] Start using db native JSON datatypes (#17930)
* Start using db native JSON datatypes

* Fix syntax to work on MySQL 5.7.12
2021-07-28 08:50:36 +02:00
Agniva De Sarker
14acff5466 Use original opengraph dependency (#17855)
The PR is now merged with the original repo, so we can remove
the temporary replace.

https://focalboard-community.octo.mattermost.com/workspace/zyoahc9uapdn3xdptac6jb69ic?id=285b80a3-257d-41f6-8cf4-ed80ca9d92e5&v=495cdb4d-c13a-4992-8eb9-80cfee2819a4&c=59af323d-35a7-4312-87a1-e374239a03d9

```release-note
NONE
```
2021-07-06 15:44:35 -04:00
Agniva De Sarker
97e3c550a4 Use forked version of gziphandler (#17852) 2021-06-30 14:39:28 +05:30
Agniva De Sarker
ec8aaec5ce MM-36486: Bump dependencies (#17830)
* MM-36486: Bump dependencies

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

```release-note
NONE
```

* Added collector dependency

* Trigger CI

* Trigger CI

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-06-29 20:49:19 +05:30
Ahmad Karlam
081f4a5123 [MM-11143] Strip markdown formatting characters from push notifications (#17775)
* WIP: trim markdown for push notification

* fix: golangci

* fix: table regex

* fix: regex code block

* doc: add license

* WIP: custom renderer with goldmark

* WIP: update goldmark version to 1.38

* fix: use goldmark as parser

* fix: remove table extension

* fix: change buf to `strings.Builder`

* fix: return original string, log warning if error

* refactor: change `WriteString` to `WriteByte`

* refactor: change if condition

* refactor: use assertion

* refactor: move to inline

* fix: remove handle multiline

Already handled by mobile

* refactor: wrap same function

* refactor: move strip markdown to `sendPushNotificationSync`

* refactor: renaming variable aren't used

* fix: move log to func `sendPushNotificationSync`

* docs: add comment to `StripMarkdown`

* fix: move assign message to else

* appErr to err rename

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-06-29 08:54:13 +05:30
Agniva De Sarker
3299a72adb MM-34932: Bump dependencies (#17708)
https://mattermost.atlassian.net/browse/MM-34932

```release-note
NONE
```
2021-06-03 12:59:05 +05:30
Claudio Costa
3984381011 [MM-13799] Avoid queries timing out during upgrade (#17444)
* Avoid timing out during upgrade

* Update gorp dep

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-19 20:34:21 +02:00
Agniva De Sarker
b950125d4e MM-33945: Update dependencies (#17201)
* MM-33945: Update dependencies

Ran `make update-dependencies`

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

```release-notes
NONE
```

* fix test
2021-03-25 14:45:13 +05:30
Agniva De Sarker
aba6471512 revertws (#17216)
* Revert "MM-34000: Use non-epoll mode for TLS connections (#17172)"

This reverts commit 2743089b54.

* Revert "MM-33233: Fix double close of webconn pump (#17026)"

This reverts commit 0f98620b65.

* Revert "MM-33836: Detect and upgrade incorrect HTTP version for websocket handshakes (#17142)"

This reverts commit 4c5ea07aff.

* revert i18n

* Revert "MM-21012: Revamp websocket implementation (#16620)"

This reverts commit a246104d04.

* fix go.mod

* Trigger CI
2021-03-24 15:29:23 +05:30
Agniva De Sarker
33e319366c MM-34080: Removing sqlite entirely (#17188)
* MM-34080: Removing sqlite entirely

The initial commit missed removing this blank import.
So the library still remained in our vendor directory.
Removing it for good now.

Bye bye sqlite.

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

* fix go.mod
2021-03-19 20:23:23 +05:30
Agniva De Sarker
91099818df MM-32961: Bump dependencies (#17016)
Ran `make update-dependencies`

https://mattermost.atlassian.net/browse/MM-32961
2021-03-09 11:26:42 +05:30
Joram Wilander
aba00a3cfd Update split SDK to 6.0.2 to fix sync bug (#17060)
* Update split SDK to 6.0.2 to fix sync bug

* Vendor and tidy
2021-03-04 11:16:08 -05:00
John Tzikas
809affd6d1 Create basic make commands for configuring golang-migrate (#16938)
* Create basic make commands for configuring golang-migrate

* Showcase full flow with new migrations

* Apply PR suggestions

* Migrate over team members

* Update mocks

* Fix specs

* Move columns that added after table creation onto separate stmts

* Put back gorp table definitions

* Fix issues with golang-migrate that not tracks underlying db driver

* Help prompt after new migration and consistent checksum for bindata

* Put gorp mapping back

* Apply PR suggestiong

* Close migrations after they run

* Add migration file to bindata check

* Updates needed

* Reset store_test

* Add copyright

* Apply PR suggestions

* Fix new circleci check

* Put back upgrade step for backwards comp

* Add store test to test migration directions

* Apply PR suggestions

* Add go-bindata to tools

* Apply PR suggestios

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-02-23 16:22:31 +02:00
Agniva De Sarker
a246104d04 MM-21012: Revamp websocket implementation (#16620)
* MM-21012: Revamp websocket implementation

We replace the old gorilla/websocket implementation with the
gobwas/ws library. The gorilla library was in maintenance mode
and had a high level API due to which we cannot use that for
situations where a large number of concurrent connections needs
to be supported.

The ws library is a very low-level library that allows us
to work with raw net.Conns. We make several improvements:

- We completely remove the reader goroutines, and instead
replace them with a manual epoll implementation which sends off
messages to be read when it receives any data on the connection.
This lets us scale to a much larger number of connections.
- The reader buffer is eliminated, because we directly read
from the connection now.

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

```release-notes
Improved the websocket implementation by using epoll manually
to read from a websocket. As a result, the number of goroutines
is expected to go down by half.
```

* fix tests

* fix shadowing errors

* final changes

* windows support!

* Remove pointer to waitgroup

* Fix edge case

* Trigger CI

* Trigger CI

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-02-13 23:42:11 +05:30
Agniva De Sarker
1cb019c0d8 MM-32048: Upgrade dependencies (#16765)
```release-note
Updated Go dependencies to their latest minor version
```

https://mattermost.atlassian.net/browse/MM-32048
2021-01-21 22:17:05 +05:30
Agniva De Sarker
091659c8ad MM-31436: Upgrade dependencies (#16605)
* MM-31436: Upgrade dependencies

Ran make update-dependencies

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

```release-note
NONE
```

* add missing dep

* fix lru marshaling
2021-01-07 14:39:17 +05:30
Mario de Frutos Dieguez
94fe01dc1d [MM-30539] New renewal link logic (#16539)
* New renewal link logic

Endpoint and logic that returns the renewal link to be used to start the
license renewal process.

* Limit access for restricted sysadmins

* Include active users in the renewal token
2020-12-18 16:40:46 +01:00
Harrison Healey
1367418e3c MM-31171 Fork OpenGraph library to handle bad HTML from YouTube (#16528) 2020-12-10 15:42:23 -05:00
Agniva De Sarker
17194f2edf MM-30708: Fix racy TestLdapConnect/STARTTLS_connection (#16448)
```release-note
NONE
```

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

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-07 22:44:32 +05:30
Christopher Speller
1aadd36644 MM-28859 Add feature flag managment system using split.io and remove viper. (#15954)
* Add feature flag managment system using split.io and remove viper.

* Fixing tests.

* Attempt to fix postgres tests.

* Fix watch filepath for advanced logging.

* Review fixes.

* Some error wrapping.

* Remove unessisary store interface.

* Desanitize SplitKey

* Simplify.

* Review feedback.

* Rename split mlog adatper to split logger.

* fsInner

* Style.

* Restore oldcfg test.

* Downgrading non-actionable feature flag errors to warnings.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-29 15:54:39 -07:00
Jesús Espino
8d5be2d657 Document extractor service (#15665)
* Document extractor service

* Fixing vendor modules

* Addressing PR Review comments

* Some small simplifications

* Fixing a linter complain

* simplifying a bit the code using package variables

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-27 15:58:38 +01:00
Agniva De Sarker
087758caee MM-28737: Upgrade dependencies (#15877)
https://mattermost.atlassian.net/browse/MM-28737

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-25 22:09:55 +05:30
catalintomai
1c0d590c81 Add AWS Metering service support (#15290) 2020-09-28 11:43:08 -07:00