Skip to content

Commit

Permalink
Upgrading all the server libraries (#2643)
Browse files Browse the repository at this point in the history
* Upgrading all the server libraries

* upgrading dependencies in the mattermost-plugin directory

* Executing go generate

* Upgrading the linux app

* Running go mod tidy everywhere
  • Loading branch information
jespino authored Mar 25, 2022
1 parent 3355709 commit 3dba5c8
Show file tree
Hide file tree
Showing 11 changed files with 3,255 additions and 858 deletions.
4 changes: 2 additions & 2 deletions linux/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.PHONY: run

run:
go run ./main.go
go run -tags json1 ./main.go

build:
mkdir -p bin
go build -o bin/focalboard-app
go build -tags json1 -o bin/focalboard-app
6 changes: 3 additions & 3 deletions linux/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/mattermost/focalboard/server => ../server

require (
github.com/google/uuid v1.3.0
github.com/mattermost/focalboard/server v0.0.0-20210422230105-f5ae0b265a8d
github.com/mattermost/mattermost-server/v6 v6.0.0-20210913141218-bb659d03fde0
github.com/webview/webview v0.0.0-20200724072439-e0c01595b361
github.com/mattermost/focalboard/server v0.0.0-20220325164658-33557093b00d
github.com/mattermost/mattermost-server/v6 v6.5.0
github.com/webview/webview v0.0.0-20220314230258-a2b7746141c3
)
1,377 changes: 1,116 additions & 261 deletions linux/go.sum

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions mattermost-plugin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.16
replace github.com/mattermost/focalboard/server => ../server

require (
github.com/mattermost/focalboard/server v0.0.0-20210525112228-f43e4028dbdc
github.com/mattermost/mattermost-plugin-api v0.0.21
github.com/mattermost/mattermost-server/v6 v6.0.0-20211022142730-a6cca93ba3c3
github.com/stretchr/testify v1.7.0
github.com/mattermost/focalboard/server v0.0.0-20220325164658-33557093b00d
github.com/mattermost/mattermost-plugin-api v0.0.27
github.com/mattermost/mattermost-server/v6 v6.5.0
github.com/stretchr/testify v1.7.1
)
1,087 changes: 783 additions & 304 deletions mattermost-plugin/go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion mattermost-plugin/server/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/mattermost/focalboard/server/ws"

pluginapi "github.com/mattermost/mattermost-plugin-api"
apierrors "github.com/mattermost/mattermost-plugin-api/errors"

"github.com/mattermost/mattermost-server/v6/model"

Expand Down Expand Up @@ -113,5 +114,5 @@ func (da *pluginAPIAdapter) GetChannelMember(channelID string, userID string) (*
}

func (da *pluginAPIAdapter) IsErrNotFound(err error) bool {
return errors.Is(err, pluginapi.ErrNotFound)
return errors.Is(err, apierrors.ErrNotFound)
}
48 changes: 29 additions & 19 deletions server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,40 @@ module github.com/mattermost/focalboard/server
go 1.16

require (
github.com/Masterminds/squirrel v1.5.0
github.com/Masterminds/squirrel v1.5.2
github.com/go-sql-driver/mysql v1.6.0
github.com/golang/mock v1.5.0
github.com/golang/mock v1.6.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/gorilla/websocket v1.5.0
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/cpuid/v2 v2.0.12 // indirect
github.com/krolaw/zipstream v0.0.0-20180621105154-0a2661891f94
github.com/lib/pq v1.10.2
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattermost/mattermost-plugin-api v0.0.21
github.com/mattermost/mattermost-server/v6 v6.0.0-20210913141218-bb659d03fde0
github.com/mattermost/morph v0.0.0-20220222074146-cff3f12ff131
github.com/lib/pq v1.10.4
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattermost/mattermost-plugin-api v0.0.27
github.com/mattermost/mattermost-server/v6 v6.5.0
github.com/mattermost/morph v0.0.0-20220324143723-e4896385ec60
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/minio/minio-go/v7 v7.0.23 // indirect
github.com/oklog/run v1.1.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/rudderlabs/analytics-go v3.3.1+incompatible
github.com/sergi/go-diff v1.0.0
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/prometheus/client_golang v1.12.1
github.com/rs/xid v1.4.0 // indirect
github.com/rudderlabs/analytics-go v3.3.2+incompatible
github.com/sergi/go-diff v1.2.0
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/viper v1.10.1
github.com/stretchr/testify v1.7.1
github.com/wiggin77/merror v1.0.3
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
github.com/yuin/goldmark v1.4.11 // indirect
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064
golang.org/x/net v0.0.0-20220325170049-de3da57026de // indirect
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
golang.org/x/tools v0.1.10 // indirect
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/sqlite v1.15.3 // indirect
)
1,375 changes: 1,115 additions & 260 deletions server/go.sum

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions server/services/permissions/mmpermissions/mocks/mockpluginapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions server/services/store/sqlstore/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
mysql "github.com/mattermost/morph/drivers/mysql"
postgres "github.com/mattermost/morph/drivers/postgres"
sqlite "github.com/mattermost/morph/drivers/sqlite"
mbindata "github.com/mattermost/morph/sources/go_bindata"
embedded "github.com/mattermost/morph/sources/embedded"

mysqldriver "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq" // postgres driver
Expand Down Expand Up @@ -134,7 +134,7 @@ func (s *SQLStore) Migrate() error {
"plugin": s.isPlugin,
}

migrationAssets := &mbindata.AssetSource{
migrationAssets := &embedded.AssetSource{
Names: assetNamesForDriver,
AssetFunc: func(name string) ([]byte, error) {
asset, mErr := assets.ReadFile(filepath.Join("migrations", name))
Expand All @@ -157,11 +157,10 @@ func (s *SQLStore) Migrate() error {
},
}

src, err := mbindata.WithInstance(migrationAssets)
src, err := embedded.WithInstance(migrationAssets)
if err != nil {
return err
}
defer src.Close()

opts := []morph.EngineOption{
morph.WithLock("mm-lock-key"),
Expand Down
Loading

0 comments on commit 3dba5c8

Please sign in to comment.