Commit Graph

344 Commits

Author SHA1 Message Date
Ashish Bhate
7e3d76b9a2 [MM-26886]: check enterprise prereqs before running tests (#15083) 2020-07-22 16:59:12 +05:30
Agniva De Sarker
7af4b50d64 MM-27150: Remove TE tests as part of tbs workflow (#15077)
* MM-27150: Remove TE tests as part of tbs workflow

There's no need to run TE all over again in tbs, when it's already run
in the normal workflow.

* add phony target

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-22 15:33:46 +05:30
Jesús Espino
5be023aa70 Upgrading go.tools.mod (#15081)
* Upgrading to the last mattermost-utilities/mmgotool

* Remove unneeded file

* Fixing mmgotools usage
2020-07-21 14:07:27 +02:00
Eli Yukelzon
b15c0484c6 MM-26834 - Move opentracing into a separate package (#15011) 2020-07-15 12:59:11 +03:00
Jesús Espino
e980dd7bd3 Configurable dev environment (#14869)
* Configurable dev environment

* Add a bit of documentation

* fixing gofmt

* A bit more doc

* Using  variable

* Adding license header

* Moving LDAP_DATA variable to the default-config.mk file

* Adding another docker-compose for the makefile to not brake anybody workflow

* Moving dejavu to the config

* Fixing docker-compose.makefile.yaml for dejavu

* Adding keycloak support to the dev environment

* Address PR review comments

* Removing minio from default docker images

* Changing the default version of mysql to the oldest supported (5.6)

* Change the restart option to no for the dev environment

* Fixing restart option

* Reverting unneded changes

* Restoring 5.7 to check if test passes

* Going back to 5.6 mysql image

* Fixing tests on mysql 5.6

* Skipping flaky test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-13 22:29:39 +02:00
Jason Frerich
a69c200574 update bundled plugins for server version 5.24 (#14727)
* update bundled plugins for server version 5.24

* github should be 1.0.0

* upgrade to welcomebot 1.2.0

* autolink 1.2.0 currently has breaking changes. revert to previous
version

* revert to jira 2.3.  users can still upgrade via marketplace

* correct the jira version

* revert to original versions.  Play conservative
2020-06-09 11:20:26 -07:00
Agniva De Sarker
932d6c2cbf Migrate tool dependencies to go.tools.mod (#14646)
Go 1.14 introduces usage of alternate go.mod files to track
other dependencies which are not related to the main app.
We use this to track all tool dependencies so that everybody uses
the same version of all tools, including CI.

This will prevent version conflicts due to everybody using different
versions of the tools.
And it will not try to upgrade the tool version, every single time,
one runs the tool command.

While here, we also re-generate some filestore mocks which weren't up to date.

Fixes #13088

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-05-25 23:20:44 +05:30
Nev Angelova
6362926b5c [MM-23827] - Update nps plugin version (#14369)
Co-authored-by: Nevyana Angelova <nevyangelova@Nevyanas-MBP.fritz.box>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-04-28 10:54:07 +02:00
Eli Yukelzon
819f57037b fixed app-layer generator, re-enabled struct2interface in make… (#14260)
* fixed app-layer generator, re-enabled struct2interface in makefile
2020-04-09 11:08:39 +03:00
Eli Yukelzon
92380d83fc OpenAPI Mattermost Go Vet integration (#14216)
* integrating govet
* added api spec check to CI
2020-04-07 16:18:08 +03:00
Agniva De Sarker
125ed3a4cf MM-23817: Use auto-vendoring (#14231)
With Go 1.14 (https://tip.golang.org/doc/go1.14#go-command),
it now automatically checks for the existence of a vendor directory.

So there is no need to explicitly set the `-mod=vendor` flag.
2020-04-07 09:01:06 +05:30
Doug Lauder
c82c2db8ce Update Makefile (#14195)
`make searchengine-mocks` was failing due to not finding `mockery`, although it was installed.
2020-03-31 12:11:32 -04:00
Jesús Espino
c66e182b08 Adding the new search engine abstraction (#13304)
* WIP

* Adding bleve to go modules

* WIP

* Adding missing files from searchengine implementation

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* User and channel indexing and searches implemented

* Make bleve tests run with in-memory indexes

* Implement post index and deletion tests

* Initial commits for the search layer

* Removing unnecesary indexing

* WIP

* WIP

* More fixes for tests

* Adding the search layer

* Finishing the migration of searchers to the layer

* Removing unnecesary code

* Allowing multiple engines active at the same time

* WIP

* Add simple post search

* Print information when using bleve

* Adding some debugging to understand better how the searches are working

* Making more dynamic config of search engines

* Add post search basics

* Adding the Purge API endpoint

* Fixing bleve config updates

* Adding missed file

* Regenerating search engine mocks

* Adding missed v5 to modules imports

* fixing i18n

* Fixing some test around search engine

* Removing all bleve traces

* Cleaning up the vendors directory and go.mod/go.sum files

* Regenerating timer layer

* Adding properly the license

* Fixing govet shadow error

* Fixing some tests

* Fixing TestSearchPostsFromUser

* Fixing another test

* Fixing more tests

* Fixing more tests

* Removing SearchEngine redundant text from searchengine module code

* Fixing some reindexing problems in members updates

* Fixing tests

* Addressing PR comments

* Reverting go.mod and go.sum

* Addressing PR comments

* Fixing tests compilation

* Fixing govet

* Adding search engine stop method

* Being more explicit on where we use includeDeleted

* Adding GetSqlSupplier test helper method

* Mocking elasticsearch start function

* Fixing tests

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-13 15:33:18 +01:00
Miguel de la Cruz
182c29b456 MM-21898: Part 2. Add opentracing (#13904)
* initial implementation of opentracing

* app layer

* Revert Makefile

* .

* cleanup

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* [ci]

* autogenerate interface

* .

* missed vendor files

* updated interfaces

* updated store layers

* lint fixes

* .

* finishing layer generators and nested spans

* added errors and b3 support

* code review

* .

* .

* fixed build error due to misplased flag.Parse()

* code review addressed
2020-03-05 14:46:08 +01:00
Jesús Espino
7035e09fe9 Adding changes to separate unit tests and integration tests (#13670)
* Introducing unit (not integration) tests for the app layer

* Initial support for unit tests at the API

* Adding unit tests support to the store layer

* Add unit tests support in commands

* Adding last tests needed for run unit tests properly

* Fixing govet

* Removing some duplication

* Fixing tests

* Fixing tests

* Not compiling test helpers with the main module for api

* Revert "Not compiling test helpers with the main module for api"

This reverts commit 36a199bbe0.

* Fixing tests

* Fixing unit tests

* More consistency between api4/apiteslib.go and app/helper_test.go

* Renaming things to make more obvious the new Setup functions purpose

* Reverting change in go.sum

* Start with empty mock for app layer

* Start with empty mock for api layer

* Start with empty mock for web layer

* Renaming SetupWithStoreMockConfig to SetupConfigWithStoreMock

* Fixing tests on web package

* Removing unnecesary function
2020-03-02 08:13:39 -08:00
Agniva De Sarker
376ec9e0e3 Remove unnecessary struct2interface dependency (#13929)
* Remove unnecessary struct2interface dependency

Running go mod tidy on the repo removes it.
This was also preventing 1.14beta from running the repo,
because now it verifies modules.txt with go.mod, which had a mismatch.

* fixing CI

* Fix test-server target

* Fix some discrepancies in vendor

* Removing the Makefile target for now

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-27 09:46:13 +05:30
Jesse Hallam
7da85922af fix bin/mmctl detection using printf (#13898)
The behaviour of `echo` [varies](https://stackoverflow.com/questions/8467424/echo-newline-in-bash-prints-literal-n) between operating systems. Use `printf` for maximum compatibility.
2020-02-14 15:45:32 -05:00
Miguel de la Cruz
5f7b5686a8 Adds tFatal custom govet check (#13886)
Automatic Merge
2020-02-13 12:51:36 -05:00
Eli Yukelzon
17523fa5d9 MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +01:00
Jason Frerich
0a80e63668 Bump zoom plugin version to v1.3.0 (#13836)
Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-12 11:46:39 -06:00
Jason Paul Deland
28ef877876 (IS-302) Streamling process to download pre-built binaries (#13830)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir

* Streamlined script to find the correct latest version of an externally built binary from a GitHub Release

* Updated variable names to match

* Updating vars to match

* Updating parameters to named variables for clarity

* Update scripts/get_latest_release.sh

Co-Authored-By: Elisabeth Kulzer <elikul@elikul.de>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
2020-02-11 12:29:38 -05:00
Jason Deland
720de2bec3 mmctl should always be in the server bin directory 2020-02-04 16:40:09 -05:00
Jason Paul Deland
051fe3cd71 Updating process for mmctl to use DIST_PATH/bin (#13822) 2020-02-04 16:01:01 -05:00
Jason Paul Deland
acce0da068 Adding target to get the latest mmctl release from GitHub (#13770)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir
2020-02-03 16:58:15 -05:00
George Goldberg
d7206d2ede Update dependencies. (#13778) 2020-02-03 08:19:38 -08:00
Agniva De Sarker
f0934361a1 export GOBIN (#13752)
* export GOBIN

* Add comment
2020-01-27 13:34:35 +05:30
Ali Farooq
afd54413f7 MM-21769 - Validate plugin bundle and signature files when pac… (#13629)
* MM-21769 - Validate plugin bundle and signature files when packaging MM

* Renamed public key, using gpg exit code to verify success

* Update Makefile

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>

* Pulling platform specific prepackaged plugins

* Verify platform specific plugin binary exist when building each ARCH

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-01-22 13:39:02 -05:00
Agniva De Sarker
adeb7ec8ff Allow GOBIN to be overriden with environment variables (#13671) 2020-01-22 17:46:41 +05:30
Agniva De Sarker
5123fe0292 Remove more instances of GOPATH from Makefile and CI (#13450)
Automatic Merge
2020-01-21 07:49:49 -05:00
Jason Frerich
a001ecabe2 Update bundled plugins for v5.20 (#13621) 2020-01-15 10:30:58 -06:00
Jesús Espino
a3239ec464 adding inconsistentReceiverName check to vet task (#13582) 2020-01-07 14:48:33 +01:00
Ben Schumacher
81efef7b5a Don't lint EE code in TE CI (#13574)
* Don't lint EE code in TE CI

* Fix typo
2020-01-07 12:37:57 +01:00
Jesús Espino
68e0b1fdc2 Enforces structured logging in enterprise code (#13444) 2019-12-20 15:18:59 +01:00
Jesús Espino
b8ef62e502 Adding structuredLogging check and fix inconsistencies (#13370)
* Adding structuredLogging check and fix inconsistencies

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments
2019-12-16 13:57:21 +01:00
Jesús Espino
f55a81163e Adding mattermost-govet to the pipeline (#13257)
* Adding mattermost-govet to the pipeline

* Trying to fix circleCI config

* Trying to fix circleCI config

* Trying to fix circleCI config

* Trying to fix circleCI config

* Update Makefile

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Update Makefile

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Adding legacy check-licenses task to legacy.mk

* Removing unnecesary GO111MODULE=off lines

* Adding jenkins mattermost-govet installation
2019-12-10 13:10:35 +01:00
Ben Schumacher
5122b9e292 [MM-20723] Add golint for plugin package to golangci (#13090) 2019-12-05 20:31:53 +01:00
Miguel de la Cruz
070ec77ee3 Fix the LDFLAGS references to use the version suffix (#13242) 2019-11-28 18:05:32 +01:00
Christopher Speller
0907530528 MM-20608 Updating x/crypto to support ACMEv2 (#13201)
* Updating x/crypto to support ACMEv2

* Revert test code.
2019-11-27 09:56:31 -08:00
Ben Schumacher
a1a2bb3130 Use predefined go command consistently (#13216) 2019-11-26 19:37:41 +01:00
Agniva De Sarker
e1adfb0d47 Run golangci-lint on EE packages if present (#13143)
The Go toolchain doesn't work with symlinks. Hence we need to explicitly
mention the directory name for it to work.
2019-11-25 18:54:54 +01:00
Agniva De Sarker
0f36649d22 Remove megacheck from Makefile (#13096)
Automatic Merge
2019-11-20 06:26:52 -05:00
Agniva De Sarker
4d1c6cd446 Remove GO111MODULE variable (#13130)
With 1.13, it is enabled by default on repos where a go.mod file is present.
2019-11-18 06:42:19 -08:00
Agniva De Sarker
3f072159e3 Remove fmt and vet checks from CI (#13063)
* Remove fmt and vet checks from CI

- golangci-lint already does the vet and fmt checks. Remove those
as it is redundant now.
- Also start running golangci-lint as part of the CI pipeline now
just as an extra layer of reliability.

* Incorporate review comments

* Adding golangci install to Jenkinsfile.pr too

* dummy commit to test jenkins

* Trying after cd to directory

* Fix ineffective assign
2019-11-18 12:08:13 +01:00
Carlos Tadeu Panato Junior
cdb61db9c4 add stop-docker to stop make command (#13020) 2019-11-12 08:32:06 +01:00
Andres
1155b08404 MM - 19155 Change plugin helpers files to be golint complied (#12686)
* MM-19155 Change plugin helpers files to be golint complied

* add makefile target that checks if plugin/helpers files are golint
  compliant

* MM-19155 - Change plugin helpers files to be golint complied

* added comment documentation to exported plugin/helpers methods
* changed variable names to be compliant with golint

* Address feedback
2019-11-12 06:29:21 +01:00
Lev
a7c1514d8e Bumped Zoom plugin to v1.1.2 (#13008)
* Bumped Zoom plugin version to 1.1.0

* Bumped Zoom plugin version to 1.1.1

* Bumped Zoom plugin to v1.1.2
2019-11-06 13:25:52 -08:00
Rodrigo Villablanca Vásquez
a39f4f1064 Change the minor version of go to 1.13 (#13015)
* Changed go minor version 12 -> 13

* REQUIREDGOVERSION set to 1.13.0
2019-11-06 07:04:50 -08:00
Ben Schumacher
0b24c336b3 Fix golangci-lint target (#12985) 2019-10-31 15:53:40 -05:00
Ben Schumacher
bc2b8b85fb Fix golangci-lint target for non GOPATH installations (#12934)
* Fix golangci-lint target for non GOPATH installations

* Link to https://github.com/golangci/golangci-lint#install
2019-10-30 12:48:51 +01:00
Paulo Bittencourt
7d0d7c304e MM-17888 Check plugin Helpers minimum server version comments (#12663) 2019-10-30 08:34:29 +01:00