gitlab-org--gitlab-foss/spec/models
Stan Hu f14647fdae Expire project caches once per push instead of once per ref
Previously `ProjectCacheWorker` would be scheduled once per ref, which
would generate unnecessary I/O and load on Sidekiq, especially if many
tags or branches were pushed at once. `ProjectCacheWorker` would expire
three items:

1. Repository size: This only needs to be updated once per push.
2. Commit count: This only needs to be updated if the default branch
   is updated.
3. Project method caches: This only needs to be updated if the default
   branch changes, but only if certain files change (e.g. README,
   CHANGELOG, etc.).

Because the third item requires looking at the actual changes in the
commit deltas, we schedule one `ProjectCacheWorker` to handle the first
two cases, and schedule a separate `ProjectCacheWorker` for the third
case if it is needed. As a result, this brings down the number of
`ProjectCacheWorker` jobs from N to 2.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52046
2019-08-16 19:53:56 +00:00
..
analytics/cycle_analytics Migrations for Cycle Analytics backend 2019-08-15 19:19:37 +00:00
application_setting Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
badges Autocorrect with RSpec/ExampleWording cop 2019-04-05 08:43:27 +00:00
blob_viewer Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
ci Merge branch 'mc/feature/pipeline-tracking-config-ce' into 'master' 2019-08-16 14:47:05 +00:00
clusters Fix performance issue in Helm#can_uninstall? 2019-08-13 15:18:59 +10:00
concerns Bring scoped environment variables to core 2019-08-08 18:51:52 +00:00
conversational_development_index Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
cycle_analytics Add code review remarks 2019-07-16 18:45:15 +02:00
diff_viewer Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
error_tracking Handle missing keys in sentry api response 2019-03-29 14:53:40 +00:00
hooks Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
issue Upgrade to Rails 5.2 2019-07-12 10:15:31 +08:00
members Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
merge_request Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
namespace Hardcodes namespaces lease timing value to 1.5h 2019-08-01 15:27:12 +00:00
network Autocorrect with RSpec/ExampleWording cop 2019-04-05 08:43:27 +00:00
postgresql Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
project_services Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
protected_branch Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
releases Add support for FTP assets for releases 2019-02-13 10:51:12 +00:00
serverless Add Knative metrics to Prometheus 2019-04-06 02:02:39 +00:00
uploads
ability_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
abuse_report_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
active_session_spec.rb Rake task to cleanup expired ActiveSession lookup keys 2019-07-22 17:15:57 +02:00
appearance_spec.rb Fix order-dependent spec failure in appearance_spec.rb 2019-07-03 11:27:16 -07:00
application_record_spec.rb Optimise upload path calls 2019-05-14 11:01:48 -05:00
application_setting_spec.rb Allow blank but not nil in validations 2019-07-31 06:54:03 +00:00
award_emoji_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
badge_spec.rb Autocorrect with RSpec/ExampleWording cop 2019-04-05 08:43:27 +00:00
blob_spec.rb Ensure that we only request blobs in one batch 2019-04-24 14:13:32 +01:00
board_group_recent_visit_spec.rb CE-port for 7714-view-recent-boards 2019-03-01 19:47:52 +08:00
board_project_recent_visit_spec.rb CE-port for 7714-view-recent-boards 2019-03-01 19:47:52 +08:00
board_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
broadcast_message_spec.rb Set 2 weeks as the expiration time for the current broadcast message 2019-06-25 19:41:05 -03:00
chat_name_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
chat_team_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
commit_collection_spec.rb Backport splitting approval changes from CE 2019-04-02 11:01:07 +00:00
commit_range_spec.rb Banzai - avoid redis if attr is in DB cache 2019-07-10 21:35:43 -06:00
commit_spec.rb Fix inline rendering of SVGs from current repo 2019-08-02 06:34:20 +08:00
commit_status_spec.rb Remove deprecated uses of attribute_changed? 2019-04-30 15:24:25 +08:00
compare_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
container_repository_spec.rb Support Docker OCI images 2019-07-25 04:11:38 -07:00
deploy_key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
deploy_keys_project_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
deploy_token_spec.rb Add username to deploy tokens 2019-07-02 18:56:48 +00:00
deployment_metrics_spec.rb Removes potentially incorrect, and slow fallback 2019-07-25 16:46:20 +12:00
deployment_spec.rb Remove un-used method 2019-07-08 09:14:37 +12:00
diff_discussion_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
diff_note_spec.rb Make diff_refs_match_commit validation reusable 2019-08-01 16:00:36 -05:00
discussion_spec.rb GraphQL support for Notes created in discussions 2019-07-10 12:13:48 +12:00
email_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
environment_spec.rb Use separate Kubernetes namespaces per environment 2019-08-07 04:40:29 +00:00
environment_status_spec.rb Share project object in EnvironmentStatus 2019-07-08 09:13:21 +12:00
event_collection_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
event_spec.rb Rename methods that conflict in Rails 5.2 2019-05-12 23:42:06 -05:00
external_issue_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
fork_network_member_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
fork_network_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
generic_commit_status_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
global_milestone_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
gpg_key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
gpg_key_subkey_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
gpg_signature_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_custom_attribute_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_label_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_milestone_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_spec.rb Add group level container repository endpoints 2019-08-05 20:00:50 +00:00
guest_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
identity_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
import_export_upload_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
instance_configuration_spec.rb Display maximum artifact size from runtime config 2019-04-03 21:02:11 +02:00
internal_id_spec.rb Fix failing spec/models/internal_id_spec.rb spec 2019-06-26 14:33:57 +00:00
issue_collection_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
issue_spec.rb Make RelativePositioning reusable 2019-07-24 14:19:49 +02:00
key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
label_link_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
label_note_spec.rb Enable the Layout/ExtraSpacing cop 2019-01-24 13:05:45 +01:00
label_priority_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
label_spec.rb Add where condition to filter out invalid labels with nil type 2019-07-24 10:22:37 +02:00
legacy_diff_discussion_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
lfs_download_object_spec.rb Add outbound requests setting for system hooks 2019-08-02 15:39:18 +01:00
lfs_file_lock_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
lfs_object_spec.rb CE backport for changes in EE MR 13894 2019-06-17 11:23:06 +12:00
lfs_objects_project_spec.rb CE backport for changes in EE MR 13894 2019-06-17 11:23:06 +12:00
license_template_spec.rb Fix license_template_spec to not modify String 2019-04-01 14:37:54 +13:00
list_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
member_spec.rb Improve spec description in member_spec.rb 2019-08-11 22:56:11 -07:00
merge_request_diff_commit_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
merge_request_diff_file_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
merge_request_diff_spec.rb Add MergeRequestDiff#lines_count convenience method 2019-08-06 11:38:50 +03:00
merge_request_spec.rb Only read rebase status from the model 2019-08-15 18:54:08 +00:00
milestone_spec.rb Merge branch 'ce-9578-adjust-opened-issues-count-and-completion-rate' into 'master' 2019-06-04 21:54:31 +00:00
namespace_spec.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
note_diff_file_spec.rb Remove cleaned up OIDs from database and cache 2019-05-06 11:35:03 +01:00
note_spec.rb Fix first-time contributor notes not rendering 2019-07-31 06:52:11 -07:00
notification_recipient_spec.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
notification_setting_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
pages_domain_acme_order_spec.rb Add pages domains acme orders 2019-06-06 18:55:31 +00:00
pages_domain_spec.rb Validate certificate chain only if it's changed 2019-07-22 15:38:08 +00:00
personal_access_token_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
pool_repository_spec.rb Fix wrong use of ActiveRecord in PoolRepository 2019-04-20 13:27:53 +00:00
programming_language_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_authorization_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_auto_devops_spec.rb Remove ignore rule for ProjectAutoDevops#domain 2019-07-22 15:46:00 +10:00
project_ci_cd_setting_spec.rb Move project default git depth behind feature flags 2019-06-10 17:40:19 +00:00
project_custom_attribute_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_daily_statistic_spec.rb Add project http fetch statistics API 2019-02-27 11:52:35 +01:00
project_deploy_token_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_feature_spec.rb Further remove code branches by database type 2019-07-29 12:47:06 +02:00
project_group_link_spec.rb Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
project_import_data_spec.rb Add clear_credentials method to ProjectImportData 2019-01-14 11:45:46 -08:00
project_import_state_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_label_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_metrics_setting_spec.rb Add ProjectMetricsDashboardSetting model and table 2019-04-26 17:23:26 +00:00
project_repository_spec.rb
project_snippet_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_spec.rb Migrations for Cycle Analytics backend 2019-08-15 19:19:37 +00:00
project_statistics_spec.rb Removes update_statistics_namespace feature flag 2019-08-02 09:29:29 -05:00
project_team_spec.rb [CE] Reduce diff with EE in spec/models/project_team_spec.rb 2019-04-02 10:21:35 +02:00
project_wiki_spec.rb Added list_pages method to avoid loading all wiki pages content 2019-04-25 04:19:07 +00:00
prometheus_metric_spec.rb Support dashboard params for metrics dashboard 2019-08-07 16:17:35 +00:00
protectable_dropdown_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
protected_branch_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
protected_tag_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
push_event_payload_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
push_event_spec.rb Rename methods that conflict in Rails 5.2 2019-05-12 23:42:06 -05:00
redirect_route_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
release_spec.rb Show upcoming status for releases 2019-07-03 09:12:15 +00:00
remote_mirror_spec.rb Rework retry strategy for remote mirrors 2019-08-13 20:52:01 +00:00
repository_language_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
repository_spec.rb Expire project caches once per push instead of once per ref 2019-08-16 19:53:56 +00:00
resource_label_event_spec.rb Use Redis for CacheMarkDownField on non AR models 2019-06-05 13:19:59 +08:00
route_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
sent_notification_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
service_spec.rb Use title and description fields for issue trackers 2019-07-02 15:00:27 +02:00
shard_spec.rb
snippet_blob_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
snippet_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
spam_log_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
ssh_host_key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
subscription_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
suggestion_spec.rb Fixed test specs 2019-04-04 13:08:34 +00:00
system_note_metadata_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
term_agreement_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
timelog_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
todo_spec.rb Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
tree_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
trending_project_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
upload_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_agent_detail_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_callout_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_custom_attribute_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_interacted_project_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_preference_spec.rb Added user time settings fields to profile 2019-05-07 21:58:16 +00:00
user_spec.rb Add spec for User#accessible_deploy_keys 2019-08-05 06:42:34 -07:00
user_status_spec.rb
wiki_directory_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
wiki_page_spec.rb Prefer `flat_map` over `map` + `flatten` in specs 2019-07-24 08:19:15 +00:00