| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when starting Mattermost programmatically, it's hard to tell
when the server is actually ready to receive network connections.
This isn't convenient for monitoring (the systemd service status is
"running" although the server is still booting), nor for programatic use
(where a script would need to know when the server is ready to perform
further actions).
To improve this, systemd allow processes to tell when they started
successfully. The launcher waits for this notification before
reporting the service as successfully launched.
The way processes notify systemd is by sending a `READY=1` string over
a standard unix socket, whose path is provided in an environment var.
The systemd service is then told to expect this notification:
```diff
[Service]
-Type=simple
+Type=notify
ExecStart=/home/vagrant/go/bin/platform
```
Now, when starting the server, systemd will actually wait for the server to
be ready before returning the control to the shell.
Additionally, during this time, querying the server status with
`service mattermost status` will report the service as "activating" – before
transitioning to "running" when the server is ready.
|
|
|
|
|
|
|
|
| |
When running server tests, the server will exit while some jobs spawned
through a goroutine are still running. This may crash the test harness,
as the jobs try to access a shut down app instance.
Fortunately the fix is easy: we just have to use the same App
goroutine-counting facility than the rest of the method's goroutines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cleanup app state on initialization error
When returning an initialization error, the app state was not cleaned
up. This is especially visible during tests, as `appCount` is not
decremented, and makes the new app initialization fail.
* Test the `platform server` command
As the `platform server` command only exits when interrupted by
a signal, it is not possible to test it as the other cobra
commands. Instead we directly test the actual command function.
The internal command handler is slighly refactored to take
a channel in argument, and registers it as the signal handler.
Nothing very different—except than controlling this channel
from the outside allows the test to send the system signal
itself, thus preventing the server to run forever.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only a handful of critical errors are present in the codebase.
They all occur during server startup (in `app.StartServer()`).
Currently, when one of these critical error occurs, it is simpled
mentionned in the logs – then the error is discarded, and the app
attempts to continue the execution (and probably fails pretty quickly in
a weird way).
Rather than continuing operations in an unknow state, these errors should
trigger a clean exit.
This commit rewrites critical startup errors to be correctly
propagated, logged, and then terminate the command execution.
Additionnaly, it makes the server return a proper error code to the
shell.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When starting the server using `platform server`, errors occuring during
startup are not reported in the console. The command exit with a 0 exit
code (i.e. "success"), although the server failed to launch.
With this change, when an error occurs while initializing the app (like
a missing or invalid configuration file):
- the error is printed to the console;
- the command exit with a "-1" exit code.
This allow shell scripts to properly detect the startup failure, and to
react to it.
Example of error displayed:
```
$ platform server
Error: LoadConfig: Error decoding config file=config.json, err=While parsing config: invalid character ':' after top-level value,
``
|
|
|
|
|
|
|
|
| |
* finally remove utils.Cfg
* fix compile error
* another test compilation fix
|
|
|
|
|
|
| |
* Move session clean-up to daily task
* Split delete query into batches
|
|
|
|
|
|
| |
* remove global cfg vars
* enterprise update
|
|
|
|
|
|
|
|
|
|
| |
* remove global config watcher
* keep config watcher disabled for tests
* compile fix
* fix resource leak
|
| |
|
|
|
|
|
|
| |
* remove utils.ClientCfg and utils.ClientCfgHash
* remove unused import
|
|
|
|
|
|
|
|
| |
* add plugin slash command support
* remove unused string
* rebase
|
| |
|
|
|
|
|
|
|
|
| |
* reorganize file util functionality
* fix api test compilation
* fix rebase issue
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* PLT-8011: Make Elasticsearch startup fully async.
* Use a.Go
|
|
|
|
|
|
|
|
| |
* Fix plugin config watcher for enabling and disabling
* Make sure HTTP routes are served
* Set content-type explicitly
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* app cleanup
* whoops, forgot a file
* some minor cleanup
* longer container deadline
* defensive checks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* don't use global app for api / api4 tests
* put sleep back. we're gonna have to do some goroutine wrangling
* fix oauth test config assumptions
* jobs package, i'm comin' for you next
* app test fix
* try increasing sleep a little
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Improvements to server handling of webapp plugins
* Fix newline
* Update manifest function names
|
|
|
|
|
|
|
|
| |
* remove global app references
* test fix
* fix api4 test compilation
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tie back-end plugins together
* fix comment typo
* add tests and a bit of polish
* tests and polish
* add test, don't let backend executable paths escape the plugin directory
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Prepare file upload infrastructure for Data Retention.
This commit prepares the file upload infrastructure for the data
retention feature that is under construction. Changes are:
* Move file management code to utils to allow access to it from jobs.
* From now on, store all file uploads in a top level folder which is the
date of the day on which they were uploaded.
This commit is based on Harrison Healey's branch, but updated to work
with the latest master.
* Use NewAppError
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* PLT-6226 Fixing races with licensing
* Fixing build issue
* Fixing licensing issue
* removing commented code
|
|
|
|
|
|
|
|
|
|
| |
* add response_url support for custom slash commands
* pr suggestions
* pr update / suggestion
* test fix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* plugin scaffolding / jira integration
* add vendored testify packages
* webhook fix
* don't change i18n ids
* support configuration watching
* add basic jira plugin configuration to admin console
* fix eslint errors
* fix another eslint warning
* polish
* undo unintentional config.json commit >:(
* test fix
* add jira plugin diagnostics, remove dm support, add bot tag, generate web-safe secrets
* rebase, implement requested changes
* requested changes
* remove tests and minimize makefile change
* add missing license headers
* add missing comma
* remove bad line from Makefile
|
|
|
|
|
|
|
|
| |
* Add jobserver command to platform binary
* Fixing jobserver config. Adding jobserver flags.
* Fixing govet in makefile
|
|
|
|
|
|
|
| |
* Fixes Elasticsearch to have consistent capitalisation everywhere
across the code and UI (except the config file unfortunately).
* Adds basic unit tests for Elastichsearch.
* Adds a Elasticsearch docker image to the Makefile to enable testing
the Elasticsearch feature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit redesigns the jobserver to be based around an architecture
of "workers", which carry out jobs of a particular type, and "jobs"
which are a unit of work carried by a particular worker. It also
introduces "schedulers" which are responsible for scheduling jobs of a
particular type automatically (jobs can also be scheduled manually when
apropriate).
Workers may be run many times, either in instances of the platform
binary, or the standalone jobserver binary. In any mattermost cluster,
only one instance of platform OR jobserver must run the schedulers. At
the moment this is controlled by a config variable, but in future will
be controlled through the cluster leader election process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* PLT-6080 adding cluster discovery service
* Adding memberlist lib
* Adding memberlist lib
* WIP
* WIP
* WIP
* WIP
* Rolling back config changes
* Fixing make file
* Fixing config for cluster
* WIP
* Fixing system console for clustering
* Fixing default config
* Fixing config
* Fixing system console for clustering
* Tweaking hub setting
* Bumping up time
* merging vendor dir
* Updating vendor dir
* Fixing unit test
* Fixing bad merge
* Remove some testing code
* Moving comment
* PLT-6868 adding db ping retry
* Removing unused loc strings
* Adding defer to cancel
|
|
|
|
|
|
|
|
|
|
| |
* PLT-6471 Properly panic when translations can't be loaded
* Print usage messages when errors occur during CLI initialization
* Reverted behaviour of FindDir and added second return value to it
* Fixed merge conflict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added initial job server
* Added job server to be ran as part of platform
* Added test job to the enterprise repo
* Fixed job server not loading license
* Renamed job package to jobs
* Fixed TE not being buildable
* Added JobStatus table to database
* Changed fields used by JobStatus
* Added APIs to query job status
* Added config change listener to server
* Added option to run job server from Makefile
* Added ability to enable/disable jobs from config
* Commented out placeholder for search indexing job
* Fixed govet
* Removed debug messages and fixed job api init message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* PLT-6472: Basic Elastic Search implementation.
This currently supports indexing of posts at create/update/delete time.
It does not support batch indexing or reindexing, and does not support
any entities other than posts yet. The purpose is to more-or-less
replicate the existing full-text search feature but with some of the
immediate benefits of using elastic search.
* Alter settings for AWS compatability.
* Remove unneeded i18n strings.
|
|
|
|
| |
(#6213)
|
|
|
|
|
|
| |
* PLT-6317 disable file watcher while running from make file
* Removing debug stmt
|
|
|
|
|
|
|
|
|
|
|
|
| |
* PLT-5860 Updated copyright date in about modal
* PLT-5860 Updated copyright notice in JSX files
* PLT-5860 Updated copyright notice in go files
* Fixed misc copyright dates
* Fixed component snapshots
|