Commit graph

109 commits

Author SHA1 Message Date
rhymes
2d26318cf9
[deploy] Replace (black|white)list with more inclusive language (#7459)
* Replace isBlacklisted

* Update fastly.rake task

* More renames

* Rename Faslty config file

* More changes

* Replace isForbiddenFromPreloading with isNotPreloadable

* Skip problematic test

* Re-enable
2020-04-27 18:00:12 +02:00
Alex
8b51d8e4b8
[deploy] Fix Fastly rake task spec and Travis CI (#7487)
* Try changing exit to next

* Add breaking test

* Fix search.rake

* Remove test failure
2020-04-23 16:06:57 -04:00
Alex
397734b29c
Generalize Fastly rake task (#7349)
* Generalize Fastly rake task

- Update Rubocop to disable DescribeClass on rake task specs

* Change default Fastly ENV vars to ""

* Move snippet name to ENV

* Update ENV to FASTLY_WHITELIST_PARAMS_SNIPPET_NAME

* Add FASTLY_WHITELIST_PARAMS_SNIPPET_NAME to the docs

* Update docs

* Quick refactor
2020-04-22 11:49:54 -04:00
Molly Struve
51b9312cf1
silence duplicate data update scripts to optimize starting up a new env (#7340) 2020-04-17 12:30:56 +02:00
Alex
cc6249beff
[deploy] Update whitelisted params on Fastly on deployments (#7279)
* Add Fastly whitelisted params

* Create FastlyVCL::WhitelistedParams.update service

* Add specs

* Create rake task to call new service

* Add rake task to setup script

* Add documentatoin

* Move sort inside params_to_array method

* Rename VCL_REGEX to VCL_DELIMITER

* Add PR URL to docs

* Move snippet name to SNIPPET_NAME constant

* Refactor setting content

* Rename params_to_array to params_to_sorted_array

* Change guard and log success on update

- Return early if params are equal
- Log success message to Rails.logger on update
- Log params diff to Datadog

* Return true explicitly

* Move rake task execution from to release-tasks

* Remove unnecessary environment guard in task

* Remove duplicate code param

* Refactor string from build_content

* Remove reliance on sort

* Reorder logging to implicitly return true

* Update docs to reference release-script.sh

* Update docs

* Update whitelisted params

* Fix params_updated? bug and add more specs

* Remove duplicate param...oopsie!
2020-04-16 15:11:57 -04:00
Molly Struve
01adfc377c
[deploy] Index all readinglist Reactions into Elasticsearch (#7310) 2020-04-16 09:36:05 -05:00
Molly Struve
e4de9c2742
[deploy] Resync Elasticsearch Docs that had Previous Bugs (#7230) 2020-04-13 09:39:19 -05:00
Michael Kohl
ca23b8e1c6
[deploy] Introduce ClassifiedListingCategory model (#7172)
* Add ClassifiedListingCategoryModel

* Add data update script for classified listing categories

* Add foreign key to reference

* Move data update script to temporary rake task

* Update factory

* Add and fix specs

* Fix typo

* Fix migration

* Correctly add unique index

* Fix migration

* Add slug column to classified listing categories

* Add unique index for slug column
2020-04-13 09:01:58 -04:00
Ridhwana
cbff423861
chore: remove script (#7215) 2020-04-10 16:59:09 +02:00
Ridhwana
e626cfa933
[deploy] Split out social media options (Important: post deployment task to be run) (#7173)
* feat: define the different social media handles

* feat: dynamically render all the social media fields

* feat: ensure that the social media handles are permitter and dealt in a separate path from the rest

* test: update  social_networks_handle to social_media_handles

* feat: update the sidebar to use different social media

* feat: update the twitter:site meta handle to be  SiteConfig.social_media_handles["twitter"]

* feat: update the a links to tweets

* feat: make the links dynamic and only show those that there is a value for

* refactor: make @ThePracticalDev dynamic

* refactor: make @ThePracticalDev dynamic

* feat: add dynamic social media handles

* chore: rename values

* chore: remove extra social handles

* chore: some spacing

* chore: remove lines

* rafector: user rails-settings-cached type: :hash to set the type and the defaults

* feat: use nil and blank instead of "" and empty

* chore: move the social media handles into the right box

* refactor: rearrange model placement based on the UI

* chore: code climate

* refactor: comments from PR

* chore: rename the ff

* chore: amended twitter username

* chore: add a temporary rake task

* feat: update names

* chore: why am i using the old syntax :(

* chore: revert dynamic erb variable in offline.html
2020-04-09 19:51:11 +02:00
Guilherme Vinicius Moreira
9618ccc927
[deploy] Add new user attributes to elasticsearch (#7123)
* chore(user): add new user attributes to elasticsearch

* Fix schema.rb
2020-04-07 13:16:15 -04:00
Mac Siri
b5fa02bf33
Create Broadcasts.rake (#7010) 2020-04-02 17:24:39 -04:00
Mac Siri
217ee6c3f4
Organize rake tasks (#7005) 2020-04-01 12:39:40 -04:00
Molly Struve
2c49b34ebf
Hotness Score for Tags Should Use Article positive_reactions_count (#6808) [deploy]
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-31 09:04:20 -05:00
Molly Struve
d20a50aa2b
sync feed content documents in Elasticsearch (#6888) [deploy] 2020-03-26 13:11:09 -05:00
Alex
129cd3ba83
Log Elasticsearch index counts to Datadog (#6845) [deploy] 2020-03-25 15:52:54 -05:00
rhymes
88aa28eedf
Move App into app/lib (#6830) [deploy]
* Move App into app/lib

* Oops
2020-03-25 09:48:35 -04:00
rhymes
22822d448d
Add App.url and use it with Slack messengers (#6818)
* Add App.url

* Use App.url with Slack messengers
2020-03-24 17:22:09 -04:00
Molly Struve
a4ce1625e3
Search Users for Chat Channels Frontend (#6626)
* hook up user search for chat channels to Elasticsearch

* Add spaces

* run specs

* add more spaces

* reset travis file

* add another data upadte script to reindex Users
2020-03-13 10:26:32 -04:00
Ben Halpern
5bd042e7d6
Prune old field tests for ongoing tests (#6540) [deploy] 2020-03-09 16:22:42 -04:00
rhymes
ed66d7b181
Run BackfillColumnForBroadcasts only if the column still exists (#6508) 2020-03-09 15:38:34 +01:00
Molly Struve
82526989fc
Index Articles and Podcast Episodes to Elasticsearch (#6488) [deploy]
* Index Articles and PodcastEpisodes to Elasticsearch

* add callbacks to podcast episodes and specs

* refactor and clean up serializers
2020-03-06 16:39:36 -05:00
Molly Struve
731b89ca26
Index users into elasticsearch (#6489) [deploy] 2020-03-06 14:12:02 -05:00
Alex
bbec492844
Remove more Algolia from ClassifiedListing (#6463) [deploy]
* Remove ClassifiedListing from algolia initializer

* Remove reference to remove_from_index
2020-03-05 09:23:22 -08:00
rhymes
e27c9b77a3
Refactor Elasticsearch client access (#6307) [deploy]
* Add Transport module to Search
* Test public methods only
* Add Search::Client with exception handling
* Remove Transport and request do
* Replace SearchClient with Search::Client
2020-02-28 11:38:37 -05:00
Anna Buianova
df93e8d41e
Custom social preview template for tags (#6290) [deploy]
* Custom social preview template for tags

* Added index on tags social_preview_template + small refactoring

* Add checks if index exists to tags migration
2020-02-27 17:56:21 -05:00
Vaidehi Joshi
81e2a5efc3
Add active attribute to Broadcasts (#6318) [deploy]
* Add active attribute to Broadcasts

* Backfill active attribute on Broadcasts
2020-02-26 16:44:27 -05:00
rhymes
8c7aa2e494
Rename DataDog to Datadog (#6226) 2020-02-21 12:00:30 -05:00
Molly Struve
e752ff98af
Index ChatChannelMemberships to Elasticsearch (#6162) [deploy] 2020-02-19 14:29:16 -05:00
Alex
8d7b95ea15
Index ClassifiedListings to Elasticsearch (#6132) [deploy]
* Add ClassifiedListingEsIndexWorker & spec

* Update ClassifiedListing model

- Add es index methods (inline and async)
- Index ClassifiedListing to es after_commit
- Add serialized_search_hash
- Update model specs for new methods
- Add serializers referenced in new model method

* Update specs

* Create DataUpdateScript to index ClassifiedListings

* Fix formatting

* Fix codeclimate :/

* Use match_array instead of keys.sort

* Change find_by! to find

* Update spec

* Update mappings for ClassifiedListing

* Update specs

* Implement refactor with Searchable module
2020-02-19 09:55:37 -05:00
rhymes
f3c2adfa45
Routine rubocop fixes (#6138) 2020-02-18 11:21:42 -05:00
Ridhwana
6356089ee0
Re-index existing articles with DataUpdateScript (#6109) [deploy] 2020-02-17 10:14:50 -05:00
Molly Struve
ef9611d745
Create DataUpdateScript to Index all Tags (#6078) [deploy] 2020-02-14 14:17:52 -05:00
Molly Struve
65eba740ab
Document DataUpdateScripts, Add to Deploy Process, Add Development Check (#6068) [deploy] 2020-02-14 11:45:27 -05:00
Molly Struve
0bfbd9bb1f
Set Up Framework For Running Data Update Scripts (#6025) [deploy] 2020-02-13 10:48:23 -05:00
Molly Struve
acfdd11b50
update cluster settings to prevent auto index creation, update destroy to remove ALL indexes (#6042) 2020-02-12 15:21:38 -05:00
Juanito Fatas
33b8014677
Fix indentation in search.rake (#5971)
lib/tasks/search.rake:9:3: C: Layout/IndentationWidth: Use 2 (not 3) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
     Search::Cluster.update_mappings
  ^^^
2020-02-10 09:09:23 -05:00
Molly Struve
4691ae1e34
Log in Datadog When Sidekiq Worker Fails for Final Time (#5942) [deploy] 2020-02-10 08:56:41 -05:00
Maykon Menezes
01dc81afa9
Move Podcasts::GetEpisodesJob to Sidekiq (#5443) [deploy]
* Refactored Podcast::GetEpisodesJob to sidekiq

* fixing specs

* removing env keys

* Change arguments to Hash

* Update specs and add spec for queue

* Update references for Hash argument

* Add comment to explain parameters of #perform

Co-authored-by: Alex <alexandersmith223@gmail.com>
2020-02-06 09:42:55 -08:00
Molly Struve
00fefe5865
Add Code To Setup the Elasticsearch Tag Index (#5919) [deploy] 2020-02-06 11:46:11 -05:00
rhymes
3260270103
Have counters:update_users use a transaction per user and customizable batch size (#5912) [deploy] 2020-02-05 12:26:03 -05:00
rhymes
a1835ae5b9
User counters using PostgreSQL JSON (#5373) [deploy]
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-02-03 10:35:08 -05:00
Ben Halpern
a4b86e3ff1
Add initial usage metrics for datatog (#5544) [deploy]
* Add initial usage metrics for datatog

* Make measurable name more clear

* Change name of daily usage worker

* Fix test names
2020-01-16 12:59:17 -05:00
Molly Struve
1a3d59c97f
Send Sidekiq data to Honeycomb (#5517) [deploy] 2020-01-16 12:30:43 -05:00
Molly Struve
5962d52a61
record background queue stats in a worker (#5533) [deploy] 2020-01-15 14:44:57 -05:00
Molly Struve
2e5a36e538
Log DB Table sizes in a Sidekiq Worker (#5518) 2020-01-15 12:33:14 -05:00
rhymes
9b2886979a ActiveRecord count optimizations (#5478) [deploy]
* Do not load messages in memory, just to count them
* Add Model.estimated_count
* Use Model.estimated_count in task record_db_table_counts
* Use size and estimated_count
* Use table_name so that .estimated_count works with all models
* Add comment to explain the .load.size + .each pattern
2020-01-14 12:03:38 -05:00
Michael Kohl
dba7e6ca60 Move Twitch webhook registration from ActiveJob to Sidekiq (#5414) 2020-01-14 11:55:35 -05:00
rhymes
c267526ed2 Remove temporary site config script and unused ENV var (#5455) [deploy] 2020-01-14 09:49:31 -06:00
rhymes
102e1a6b9c Routine rubocop fixes (#5386) 2020-01-08 09:05:12 -05:00