Go 1.13 introduced this new flag which removes all absolute file system paths
from the binary and just keeps the module path / GOPATH. To debug binary
crashes or stack traces, we only need the path to the code and not the full
file path. Hence this is a quick way to reduce the binary size without any information
loss.
Shaves off around 750KB from the server binary.
* MM-21103: change plugin signature path
Save as `<plugin_id>.tar.gz.sig` instead of `<plugin_id>.sig`. The latter was a relic of the previous design to support multiple plugin signatures, but now creates an inconsistency with how the original source files were supplied as `<some_name>.tar.gz` and `<some_name>.tar.gz.sig`.
Fixes: https://mattermost.atlassian.net/browse/MM-21103
* relax signature matches to avoid assuming signatures always exist
* MM-21116: Improve channelSearch SQL query generation
The likeTerm from buildFulltextClause was being built inefficient using strings.
We change it to use squirrel to build the query.
And while at it, we also change the len check with checking with
an empty string which is more idiomatic. Both compile to the same
code, so there is no difference performance wise.
* Use a better variable name
* Add the old fmt and vet targets to legacy.mk
This is to ease the transition until a time
when everybody has moved to using golangci-lint.
* Just run golangci-lint for make vet
* Add notification, to sysadmins, when a user is disabled and the user
owns bots.
* If the user doesn't have any bots, there is no need to send a
notifcation to sysadmins
* Remove comment
* Update documention link
* Send as System
* Query teams for each sysadmin and add first response to hardcoded link.
* Remove fmt.print debug statements
* remove link with hard-coded team. Will add this as future enhancement
Expose GetDisableBotSysadminMessage function so it can be tested
Add test new function for testing new notification feature
* Fix shadow error
* Swap sentences in the message when System Console > Bot Accounts > Disable bot accounts when owner is deactivated: is set to false
* Another message correction
* Rename Custom Integrations to Integrations
* rename botsDisabled variable to disableBotsSetting
* - increase the number of bots and sysadmins queried to 1000.
- limit the number of bots printed in the post to 10, but mention the
total bots owned by the user
* Enable translations for sysadmin messages
* - Rename function. The actual purpose for the function is to notify
sysadmins that a user, that owned bots, was disabled.
- convert GetDisableBotSysadminMessage from a function to a method.
This allows getting *a.Config().ServiceSettings.DisableBotsWhenOwnerIsDeactivated
in the method and avoids having to pass the value as an input to a
function
* fix "make i18n-extract" error. Reorganize .json file
* Correct the upper range value to be the minimum of number of elements in the
userBots array, or the upper limit (10)
* replace t.fatal with require statements
fix golangci-lint errors
* Create separate message when user managed less than or fewer than 10 bots
Test cases for both message types
* fix i18n sorting
* Using pagination to get the bots and sysadmins instead of setting
arbitrary value for PerPage and only retrieving first page
* only use one translation ID for the message.
push all logic into the template so translators can view the logic
add disableBotsSetting and printAllBots variables to the translation
map
* Break the for loop once len(bots) < perPage value, instead of
breaking once there are no bots. This saves one additional call
Serve static plugin assets with a `Cache-Control: no-cache, public` header. This avoids caching a 404 response for such an asset, preventing it from being loaded until expiry even if the file later becomes available.
This is currently preventing updates of plugins on community and would generally affect any customer with a cache in front of the Mattermost servers.
Fixes: https://mattermost.atlassian.net/browse/MM-20948
* Test added to check support for import of messages sent to your own DM
channel
* Support for single member direct channel messages and posts
Now bulk import is able to export/import the self direct channel and
the posts inside
* Improve how the copy of channel members for DM and DM posts
* Improved the tests for the export self-channels
* Remove references of GOPATH from circleCI config
And normalize all paths to refer from $HOME as ~ rather than
an absolute path.
Updates #13129
* Changed to absolute paths for docker volume binding.
Volume binding does not work with relative paths.
* Trying with absolute paths for docker working dir
* MM-8607: Add cluster support for server busy status
MM-8607: Busy.Cluster should be non-exported
MM-8607: rename logging field seconds -> expires_sec
MM-8607: each node clears its own busy flag
MM-8607: ensure unit tests are not sensitive to test machine speed
* MM-8607: chg comment to force CI rebuild
* Limit size of files inside Zip archive before JSON parsing for Slack import
* Use specific log message when skipping file in Slack import zip due to size
* Updated max size for slack import
* Consistent license message for all the go files
* Fixing the last set of unconsistencies with the license headers
* Addressing PR review comments
* Fixing busy.go and busy_test.go license header
Flugin: fix InstallPlugin() API by manually creating RPC code
previous implementation of InstallPlugin()-#12232 's RPC funcs wasn't working because `io.Reader` isn't supported by the RPC code generation tool.
RPC does not support streaming data and RPC code generation tool does not handle this exception.
thus, RPC funcs are now implemented manually to stream `io.Reader` through a separate multiplexed connection.
* Migrate channelPinnedPostCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer
* Remove GetPinnedPostCountFromCache
* Rearrange test to avoid undeclared variable