Commit Graph

31143 Commits

Author SHA1 Message Date
Sam
824c3420e9 DEV: make Jobs.enqueue tests less fragile
Previously we depended on non Sidekiq specific mocking which is not the
official way of testing Sidekiq, this made these tests very fragile

New testing is more robust and complete
2019-01-09 09:51:11 +11:00
Sam
df460b4abd PERF: run sidekiq with nice 5
This ensures that unicorn master forks of sidekiq run with a lower priority
than the webs. It means that a busy sidekiq is less likely to impact web
performance
2019-01-09 09:29:14 +11:00
Sam
7e4a43afc6 PERF: run ImageMagick conversions with nice 10
This lowers the priority of all image resizes so they do not clog CPU on
machines running low on resources
2019-01-09 09:21:58 +11:00
Sam
e08a3f719c FEATURE: push post rebake regular task to low priority queue
This allows us to run regular rebakes without starving the normal queue.

It additionally adds the ability to specify queue with `Jobs.enqueue` so
we can specifically queue a job with lower priority using the `queue` arg.
2019-01-09 08:57:20 +11:00
Kris
cfb8e157a2 Fixing tag alignment 2019-01-08 16:25:11 -05:00
Régis Hanol
3ec38f5a3b Revert "FIX: migrate_to_s3 rake task with folder path"
This reverts commit 97fd12e8af.
2019-01-08 19:44:31 +01:00
Kris
4a01fee41b UX: use default H2 and H3 sizes on user profiles for better hierarchy 2019-01-08 13:07:29 -05:00
Régis Hanol
97fd12e8af
FIX: migrate_to_s3 rake task with folder path 2019-01-08 18:56:18 +01:00
David Taylor
fe20cb4b56 FIX: Enforce a fixed height on generic oneboxed videos
This prevents 'jumping' as the video loads. This change will require posts to be rebaked before it takes effect.
2019-01-08 16:22:03 +00:00
Joe
a2d1babac6
UX: tag container should wrap if there's a large number of tags 2019-01-08 23:33:47 +08:00
Rishabh
f181e9cc08
FIX: Add compatibility for bucket folder paths in migrate_to_s3 task (#6855)
* FIX: Add compatibility for bucket folder paths in migrate_to_s3 task
* Refactor bucket_name split logic into S3Helper
2019-01-08 20:04:48 +05:30
Rishabh
733a60e888 FIX: Remove trailing whitespace to fix build 2019-01-08 17:37:43 +05:30
Vinoth Kannan
8f602be2fe FEATURE: keep the topic in closed status until the community flags are handled 2019-01-08 16:13:10 +05:30
Sam
f947e3c6cc FIX: always serve new avatar for previous version
Previously we killed caching on old avatars cause we kept serving blank
this meant we would front many more avatar requests after a version change

This change ensures all old avatars do not cause a flood of requests on the
server
2019-01-08 19:51:33 +11:00
Guo Xiang Tan
ec27db78be FIX: Set unique post key for a user outside of transaction.
Previously, the Redis key was set within the transaction and the key
isn't deleted if the transaction is not successful.

Note that this isn't tested because we don't have a repro of what can
raise an error within the transaction.

https://meta.discourse.org/t/body-is-too-similar-to-what-you-previously-posted-even-when-previous-post-didnt-go-through/105436
2019-01-08 15:22:22 +08:00
Arpit Jalan
05c015d252 DEV: add a spec for "accept invite" log_on_user behaviour 2019-01-08 12:41:21 +05:30
Joe
3457395f75
UX: moves topic-list excerpts out of category / tag div 2019-01-08 14:55:15 +08:00
Arpit Jalan
4ebf170fe4 DEV: no need for conditional redirect in invites 2019-01-08 11:34:26 +05:30
Arpit Jalan
9919f16041 FIX: use absolute URL for twitter:image tag 2019-01-08 11:19:04 +05:30
Guo Xiang Tan
ef72a9a1fe UX: Default search log index to yearly. 2019-01-08 13:40:38 +08:00
Arpit Jalan
c76c44bc66 bump onebox version
- FEATURE: Add support for Twitter cards.
- FIX: add more https hosts
2019-01-08 09:20:08 +05:30
Maja Komel
6c8069c65a FIX: properly escape embed url 2019-01-07 18:11:43 +01:00
Arpit Jalan
e0bc82657b FIX: better accept invite flow when user is invited via a link 2019-01-07 14:22:08 +05:30
Sam
77d947701c DEV: Add missing discourse script to docker dev 2019-01-07 13:10:37 +11:00
Sam
37088c4221 PERF: index on topic_id for user_histories table
We query this table when getting composer messages with the queries
such as:

```
SELECT  1 AS one FROM "user_histories"
WHERE "user_histories"."target_user_id" = 1 AND
 "user_histories"."action" = 9 AND
 "user_histories"."topic_id" = 105794
LIMIT 1
```

This index ensures this query remains very quick, regardless of user
history size.
2019-01-06 15:14:41 +11:00
Joe
effb3262a1
UX: no need for margin if participants is first-child 2019-01-06 00:11:53 +08:00
Joe
3a9fea4409
align and truncate header tags and participants 2019-01-05 23:09:44 +08:00
Vinoth Kannan
046e4ab413 FIX: Improve topic small header alignment in mobile
Force topic-header-extra height to 20px
2019-01-05 14:06:06 +05:30
Vinoth Kannan
3589f3e023 UX: Display user and group cards over the small PM header 2019-01-05 04:58:56 +05:30
Vinoth Kannan
aba18a42a7 UX: Improve PM small header alignment with recipient avatars 2019-01-05 03:51:15 +05:30
Rishabh
efc481d9c0 DEV: Use puts instead of printing newline (follow up on c5b7bda1) 2019-01-05 01:20:00 +05:30
Robin Ward
5eaf3cb104 Adjusts the minimum_flag_threshold for TL3/TL4 actions
Before this patch, a high trust level user could flag something
and have an action be taken, as well as skipping the flag queue.

Now, if a TL3/TL4 cause an action, the flag will skip the minimum
visibility check and allow staff to review it.
2019-01-04 13:16:44 -05:00
Régis Hanol
5ac1e3d4cd FIX: emojis are hard 🤷 2019-01-04 17:21:16 +01:00
Penar Musaraj
f400830575 DEV: Remove old _firefoxPastingHack 2019-01-04 11:14:35 -05:00
Gerhard Schlager
858a456aaf FEATURE: Use email_site_title in From of digest emails 2019-01-04 17:06:19 +01:00
Gerhard Schlager
c0a8bb9a91 FEATURE: Include "via <site_name>" in email From header 2019-01-04 17:06:19 +01:00
Régis Hanol
788719d271 DEV: speed up posts base imports 2019-01-04 15:30:17 +01:00
Régis Hanol
95e5f8380d FEATURE: Allow plugins to add custom emoji translations
FIX: buildTranslationTree was erroring when translations overlapped (ie. ":-)" and ":-))")
FIX: emoji translations wasn't working properly when translations overlapped
2019-01-04 15:27:46 +01:00
Régis Hanol
88e861e895 FIX: prevent error when badge has already been awarded 2019-01-04 15:17:54 +01:00
David Taylor
5bf16d7d10 FEATURE: Topic timer for bumping a topic in the future 2019-01-04 13:08:04 +00:00
Rishabh
c5b7bda198 DEV: Show migrate_to_s3 output on a new line 2019-01-04 18:09:54 +05:30
Vinoth Kannan
902f535111 FIX: upload method in S3Helper will expect a file object param 2019-01-04 15:30:45 +05:30
Vinoth Kannan
82d7f9ce5e fix the build
Checking size for a file object directly will cause issue if it is a closed stream
2019-01-04 13:25:11 +05:30
Sam
9c91e68351 PERF: remove image optimization throttling from Sidekiq
Previously we only allowed one image optimization per machine, this meant there
was cross talk between avatar resizing and Sidekiq. This could lead to large
amounts of starvation when optimized image version changed which in turn could
block the Sidekiq queue.

This increases amount of allowed load on machines but this is preferable to
having crosstalk between avatar resizing and Sidekiq.
2019-01-04 18:44:44 +11:00
Vinoth Kannan
940a61037c DEV: Add option to pass s3 client in param 2019-01-04 12:16:09 +05:30
Vinoth Kannan
75dbb98cca FEATURE: Add S3 etag value to uploads table (#6795) 2019-01-04 14:16:22 +08:00
Joe
3a04e04ccb UX: excerpts don't wrap on IE11 (#6847) 2019-01-04 15:11:42 +11:00
Sam
8b7a2d1cb7 FEATURE: add setting to bypass sending redis CLIENT commands
Some cloud providers (Google Memorystore) do not support any CLIENT commands

By setting :id to nil in the redis config hash we can avoid these commands.

This adds a special global setting GCE users can enable:
`DISCOURSE_REDIS_SKIP_CLIENT_COMMANDS = true`
2019-01-04 15:08:33 +11:00
Sam
8f35fd4595 FEATURE: remove global settings for redis sentinels
This global setting is never used, configuring Discourse with sentinel is
unsupported.
2019-01-04 15:08:33 +11:00
Kris
a2f1d47506 Slightly better alignment of PM participants in header 2019-01-03 22:47:56 -05:00