summaryrefslogtreecommitdiffstats
path: root/app/config.go
Commit message (Collapse)AuthorAgeFilesLines
* Idiomatic error handling for app/c*.go (#9423)Jesús Espino2018-09-241-1/+3
|
* MM-11384: Add system install date information to the client config (#9218)Jesús Espino2018-08-081-0/+29
| | | | | | | | * MM-11384: Add system install date information to the client config * Fixing translation text * Fixes from Peer Review
* MM-8701 Limit the number of client config fields sent before user logs in ↵Harrison Healey2018-06-181-0/+22
| | | | | | | | | | (#8954) * MM-8701 Limit the number of client config fields sent before user logs in * Fixed missing client config field * Reduced duplication between limited and regular client config
* Structured logging (#8673)Christopher Speller2018-04-271-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implementing structured logging * Changes to en.json to allow refactor to run. * Fixing global logger * Structured logger initalization. * Add caller. * Do some log redirection. * Auto refactor * Cleaning up l4g reference and removing dependancy. * Removing junk. * Copyright headers. * Fixing tests * Revert "Changes to en.json to allow refactor to run." This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
* MM-9849 Added tracking of which settings are set through environment ↵Harrison Healey2018-04-091-1/+9
| | | | | | | | | | | | | | | | variables (#8586) * MM-9849 Added tracking of which settings are set through environment variables * Removed old version of viper * Added forked version of viper * Fixed unit tests * Fixed more unit tests * Removed copy from App.GetEnvironmentConfig
* Relax 4k post message limit (#8478)Jesse Hallam2018-03-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9661: rename POST_MESSAGE_MAX_RUNES to \0_v1 * MM-9661: s/4000/POST_MESSAGE_MAX_RUNES_V1/ in tests * MM-9661: introduce POST_MESSAGE_MAX_RUNES_V2 * MM-9661: migrate Postgres Posts.Message column to TEXT from VARCHAR(4000) This is safe to do in a production instance since the underyling type is not changing. We explicitly don't do this automatically for MySQL, but also don't need to since the ORM would have already created a TEXT column for MySQL in that case. * MM-9661: emit MaxPostSize in client config This value remains unconfigurable at this time, but exposes the current limit to the client. The limit remains at 4k in this commit. * MM-9661: introduce and use SqlPostStore.GetMaxPostSize Enforce a byte limitation in the database, and use 1/4 of that value as the rune count limitation (assuming a worst case UTF-8 representation). * move maxPostSizeCached, lastPostsCache and lastPostTimeCache out of the global context and onto the SqlPostStore * address feedback from code review: * ensure sqlstore unit tests are actually being run * move global caches into SqlPostStore * leverage sync.Once to address a race condition * modify upgrade semantics to match new db semantics gorp's behaviour on creating columns with a maximum length on Postgres differs from MySQL: * Postgres * gorp uses TEXT for string columns without a maximum length * gorp uses VARCHAR(N) for string columns with a maximum length of N * MySQL * gorp uses TEXT for string columns with a maximum length >= 256 * gorp uses VARCHAR(N) for string columns with a maximum length of N * gorp defaults to a maximum length of 255, implying VARCHAR(255) So the Message column has been TEXT on MySQL but VARCHAR(4000) on Postgres. With the new, longer limits of 65535, and without changes to gorp, the expected behaviour is TEXT on MySQL and VARCHAR(65535) on Postgres. This commit makes the upgrade semantics match the new database semantics. Ideally, we'd revisit the gorp behaviour at a later time. * allow TestMaxPostSize test cases to actually run in parallel * default maxPostSizeCached to POST_MESSAGE_MAX_RUNES_V1 in case the once initializer panics * fix casting error * MM-9661: skip the schema migration for Postgres It turns out resizing VARCHAR requires a rewrite in some versions of Postgres, but migrating VARCHAR to TEXT does not. Given the increasing complexity, let's defer the migration to the enduser instead.
* Improved bulkload error handling (#8491)Jesse Hallam2018-03-231-0/+1
| | | | | | | | | | | | * log the config file path used by the server on startup * return an err if the bulk import command fails * log the underlying errors that occur when importing The code assumed all errors meant a missing resource, but it's possible something else is at fault. Including the error helps pinpoint that more readily.
* MM-8604: emit config/license websocket events (#8371)Jesse Hallam2018-03-051-0/+15
|
* Remove global site url (#8343)Chris2018-02-221-1/+6
| | | | | | | | * remove global site url * missed one * revert mysterious change
* MM-8681 Adding config settings necessary for using CloudFront. (#8307)Christopher Speller2018-02-201-0/+10
| | | | | | * Adding config settings nessisary for using CloudFront. * Adding new config settings to diagnostics.
* Remove license globals entirely (#8229)Chris2018-02-091-1/+1
| | | | | | | | * remove license globals entirely * fix infinite recursion * test fix
* Eliminate utils.SetLicense calls (#8217)Chris2018-02-071-8/+0
| | | | | | | | | | * eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
* ABC-132: sign error page parameters (#8197)Chris2018-02-071-0/+88
| | | | | | * sign error page parameters * add comments
* add App.License, remove utils.IsLicensed / utils.License calls (#8203)Chris2018-02-061-0/+8
|
* Finally remove utils.Cfg (#8113)Chris2018-01-171-2/+0
| | | | | | | | * finally remove utils.Cfg * fix compile error * another test compilation fix
* Remove global cfg vars (#8099)Chris2018-01-121-8/+105
| | | | | | * remove global cfg vars * enterprise update
* Remove global config watcher (#8080)Chris2018-01-111-0/+73
* remove global config watcher * keep config watcher disabled for tests * compile fix * fix resource leak