Commit Graph

626 Commits

Author SHA1 Message Date
Chris
4127474b47 fix posts created at test (#7977) 2017-12-14 05:37:51 -06:00
Jonathan
ab30c4daf9 PLT-8297: Message Export Should Still Produce Valid Exports if ChannelMemberHistory Data is Missing (#7951)
* Added a less accurate ChannelMembers fallback that is used if export period occurs before MessageExport was enabled

* Fixed test names

* Improved testing

* Made hasDataFromBefore() a little less strict

* Fixed the test to cleanly truncate the ChannelMemberHistory table without exposing the db via the interface

* Renamed a function for better clarity

* Binary logic is hard
2017-12-12 09:42:29 -05:00
Christopher Speller
fa9aa85705 Fixing formating on SQL errors for get parent posts. (#7965) 2017-12-12 08:15:32 -05:00
Christopher Speller
ae931ae6b6 Add upgrade code for 4.6 2017-12-08 11:12:09 -08:00
Christopher Speller
39cf3a998d Uncomment upgrae for 4.5 2017-12-08 11:04:23 -08:00
Joram Wilander
7cefef6d21 Hash key for plugin store and limit id length (#7933) 2017-12-05 15:19:33 -08:00
Jonathan
c171872472 PLT-8233: Purge ChannelMemberHistory Data when Data Retention Job runs (#7937)
* Changed the channel member history purge function to match pattern established by other data retention purge methods

* Simplifying the channel member history store and associated tests

* Regenerating mocks

* Using a constant
2017-12-05 16:32:23 -05:00
Christopher Speller
81c1fad4d4 Revert "Hash key for plugin store table and limit plugin ID length (#7915)" (#7931)
This reverts commit c3af878573.
2017-12-01 23:20:11 -08:00
Joram Wilander
c3af878573 Hash key for plugin store table and limit plugin ID length (#7915)
* Hash plugin store keys and update column limits

* Limit plugin ID length on install

* Add note to manifest id and allow zero length keys
2017-12-01 15:20:08 -05:00
Jonathan
375c0632fa PLT-7503: Create Message Export Scheduled Task and CLI Command (#7612)
* Created message export scheduled task

* Added CLI command to immediately kick off an export job

* Added email addresses for users joining and leaving the channel to the export

* Added support for both MySQL and PostgreSQL

* Fixing gofmt error

* Added a new ChannelMemberHistory store and associated tests

* Updating the ChannelMemberHistory channel as users create/join/leave channels

* Added user email to the message export object so it can be included in the actiance export xml

* Don't fail to log a leave event if a corresponding join event wasn't logged

* Adding copyright notices

* Adding message export settings to daily diagnostics report

* Added System Console integration for message export

* Cleaned up TODOs

* Made batch size configurable

* Added export from timestamp to CLI command

* Made ChannelMemberHistory table updates best effort

* Added a context-based timeout option to the message export CLI

* Minor PR updates/improvements

* Removed unnecessary fields from MessageExport object to reduce query overhead

* Removed JSON functions from the message export query in an effort to optimize performance

* Changed the way that channel member history queries and purges work to better account for edge cases

* Fixing a test I missed with the last refactor

* Added file copy functionality to file backend, improved config validation, added default config values

* Fixed file copy tests

* More concise use of the testing libraries

* Fixed context leak error

* Changed default export path to correctly place an 'export' directory under the 'data' directory

* Can't delete records from a read replica

* Fixed copy file tests

* Start job workers when license is applied, if configured to do so

* Suggestions from the PR

* Moar unit tests

* Fixed test imports
2017-11-30 09:07:04 -05:00
Chris
b87fae646a PLT-5458: If someone posts a channel link to channel_A that you don't belong to, it doesn't render properly (#7833)
* add channel link hints to post props

* optimization

* update regex, add unit test

* fix rebase issue
2017-11-28 13:02:56 -08:00
Joram Wilander
785a410936 Decrease plugin key value store table index name size (#7910) 2017-11-27 18:49:28 -05:00
Joram Wilander
6176bcff69 PLT-8131 (part2) Add plugin key value store support (#7902)
* Add plugin key value store support

* Add localization strings

* Updates per feedback
2017-11-27 17:23:35 -05:00
Chris
816a30397d Role refactor (#7867)
* role refactor

* add missing file

* fix web test
2017-11-21 11:08:32 -08:00
Christopher Speller
756caaa1fb Adding 4.5 upgrade code (#7815) 2017-11-11 00:23:19 -08:00
Christopher Speller
fef70d6c9e Uncomment upgrae for 4.4 (#7796) 2017-11-06 16:02:19 -08:00
Harrison Healey
6886de04d4 PLT-6071/PLT-8004 Fixed not being able to autocomplete 'Town Square' (#7746) 2017-10-31 15:52:10 +00:00
Chris
ce2b2be5de Refactoring cfg refs and load / save functions (#7749)
* refactoring cfg refs and load / save functions

* improve error output
2017-10-31 10:39:31 -04:00
Joram Wilander
443a880fbd Add command validation on update (#7742) 2017-10-30 12:14:17 -05:00
Chris
3cbacb6858 Remove unused variables / code (#7736)
* remove unused variables / code

* fix bug in testPostStoreGetOldest
2017-10-30 11:58:00 -05:00
Chris
c5e8cb25ca simplify things (#7735) 2017-10-30 11:57:24 -05:00
Christopher Speller
91b9514aaf Adding Posts table indexes for 20M rows. (#7728) 2017-10-27 09:02:16 -04:00
Chris
6f6005c617 Store mocks (#7724)
* store mocks

* add example
2017-10-26 11:36:54 -05:00
Carlos Tadeu Panato Junior
ab7e5b35d8 [PLT-7364] Ability to Direct Message yourself (#7696)
* [PLT-7364] Ability to Direct Message yourself

* [PLT-7364] add tests
2017-10-26 09:45:26 -04:00
Chris
5dd4466ab3 add missing license headers, test to makefile (#7711) 2017-10-25 09:33:19 -07:00
George Goldberg
5474cff0eb PLT-7934: Make query for bulk elasticsearch indexing more efficient. (#7664) 2017-10-25 13:23:01 +01:00
Chris
fd6192473b refactor max users per team (#7691) 2017-10-20 20:34:07 -04:00
Chris
d39a722a81 refactor max channels per team enforcement (#7690) 2017-10-20 20:33:20 -04:00
Nick Frazier
7fa4913f90 [PLT-7794] Add user access token enable/disable endpoints (#7630)
* Add column to UserAccessTokens table

* PLT-7794 Add user access token enable/disable endpoints

* replaced eliminated global variable

* updates to user_access_token_store and upgrade.go

* style fix and cleanup
2017-10-19 08:10:29 -04:00
Chris
917e4789c2 Use tmpfs containers for api/api4 tests, move and speed up CLI tests (#7606)
* use tmpfs containers for api/api4, move and speed up cli tests

* minor optimizations

* add missing files, fix pre-existing race condition

* add . to TestMain check

* add requested log message
2017-10-12 12:24:54 -07:00
Saturnino Abril
521e27f4ac [PLT-7764] Fix in:channel search when channel name/displayname includes - (#7603)
* fix in:channel search when channel name/displayname includes `-`

* fix failing test in PostgreSQL

* add lowercase indexes of channel's name and displayname to postgresql, and add unit tests
2017-10-11 17:20:27 +08:00
Chris
bff2b5e735 Miscellaneous app cleanup (#7594)
* app cleanup

* whoops, forgot a file

* some minor cleanup

* longer container deadline

* defensive checks
2017-10-09 14:59:48 -07:00
Chris
0f66b6e726 store/sqlstore cleanup and postgres tests (#7595)
* sqlstore cleanup / postgres tests

* remove stopped containers

* cmd/platform compile fix

* remove test-postgres target from makefile
2017-10-09 13:16:14 -04:00
Chris
70e5f00241 store/storetest package (#7588)
* prerequisites

* storetest package
2017-10-06 11:08:59 -07:00
Chris
6097e3f02b fix GetPostsByIds error (#7591) 2017-10-06 12:18:26 -04:00
Chris
363568b4eb reduce store boiler plate (#7585) 2017-10-06 11:12:10 -04:00
Chris
12501673d0 post-4.3 commit (#7581) 2017-10-05 14:50:49 -04:00
Chris
da368539e3 4.3 pre-cut (#7569)
* 4.3 pre-cut

* fix
2017-10-04 13:10:16 -07:00
Chris
07777f5ff9 Fix races / finally remove global app for good (#7570)
* finally remove global app for good

* test compilation fixes

* fix races

* fix deadlock

* wake up write pump so it doesn't take forever to clean up
2017-10-04 13:09:41 -07:00
Jonathan
dc9b1a1d6a Parameterized post ids to avoid possible sql injection (#7575) 2017-10-04 12:54:42 -07:00
George Goldberg
f3fc6d11fa PLT-7218: CLI to move slash commands between teams. (#7574) 2017-10-04 11:08:59 -07:00
George Goldberg
078467ee96 PLT-7759: Make GetNewestJobByStatusAndType not fail when no jobs match. (#7540) 2017-10-02 09:15:51 -04:00
Joram Wilander
8b9dbb8613 PLT-7404 Return viewed at times in view channel API response (#7428)
* Return viewed at times in view channel API response

* Updated transaction to read and write once

* Remove transaction and only update if new value greater than older
2017-09-29 08:45:59 -07:00
George Goldberg
a06830b2f8 PLT-7644: Improve job scheduler architecture. (#7532) 2017-09-28 09:11:13 -07:00
George Goldberg
8d662105d3 PLT-7207: Change from fulltext to LIKE search for user filtering (#7343)
* PLT-7202: Switch user search to LIKE queries to avoid fulltext pitfalls.

* Add 2 char name unit test.

* Escape underscores properly.

* Add more tests and fix * handling.

* Make search/indexes case insensitive for postgres.
2017-09-27 18:44:22 +01:00
Chris
49fe5fbf3d Move sql store code into store/sqlstore package (#7502)
* move sql store code into store/sqlstore package

* move non-sql constants back up to store

* fix api test

* derp
2017-09-25 10:11:25 -04:00
George Goldberg
e0d5703f72 PLT-7619: Cleanup flags in data retention. (#7501) 2017-09-22 13:23:16 -04:00
Chris
266ff86702 remove more global refs (#7480) 2017-09-21 10:13:34 +01:00
George Goldberg
c3916bb530 Add error codes to the remaining stores (Part 1). (#7461) 2017-09-20 09:34:50 -04:00
Chris
e7e10d36a9 interactive post update fix (#7477) 2017-09-19 17:05:20 -04:00