gitlab-org--gitlab-foss/spec/lib/gitlab
Michael Kozono 797fe0a6e6 Backport authorized_keys_enabled defaults to true'
Originally from branch 'fix-authorized-keys-enabled-default-2738' via merge request https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2240

Removed background migrations which were intended to fix state after using Gitlab
without a default having been set

Squashed commits:
Locally, if Spring was not restarted, `current_application_settings` was still cached, which prevented the migration from editing the file. This will also ensure that any app server somehow hitting old cache data will properly default this setting regardless.
Retroactively fix migration
  This allows us to identify customers who ran the broken migration. Their `authorized_keys_enabled` column does not have a default at this point.
  We will fix the column after we fix the `authorized_keys` file.
Fix authorized_keys file if needed
Add default to authorized_keys_enabled setting
  Reminder: The original migration was fixed retroactively a few commits ago, so people who did not ever run GitLab 9.3.0 already have a column that defaults to true and disallows nulls. I have tested on PostgreSQL and MySQL that it is safe to run this migration regardless.
  Affected customers who did run 9.3.0 are the ones who need this migration to fix the authorized_keys_enabled column.
  The reason for the retroactive fix plus this migration is that it allows us to run a migration in between to fix the authorized_keys file only for those who ran 9.3.0.
Tweaks to address feedback
Extract work into background migration
Move batch-add-logic to background migration
  Do the work synchronously to avoid multiple workers attempting to add batches of keys at the same time.
  Also, make the delete portion wait until after adding is done.
Do read and delete work in background migration
Fix Rubocop offenses
Add changelog entry
Inform the user of actions taken or not taken
Prevent unnecessary `select`s and `remove_key`s
Add logs for action taken
Fix optimization
Reuse `Gitlab::ShellAdapter`
Guarantee the earliest key
Fix migration spec for MySQL
2018-01-08 20:34:20 +00:00
..
auth Renaming AuthenticationException to AuthenticationError 2017-11-17 13:33:21 +01:00
background_migration Merge branch 'mk-no-op-delete-conflicting-redirects' into 'master' 2018-01-04 15:57:45 +00:00
badge
bare_repository_import Refactoring Gitlab::BareRepositoryImport::Repository 2018-01-03 16:22:00 -02:00
bitbucket_import Fix bitbucket wiki import with hashed storage enabled 2017-11-20 16:14:41 +00:00
cache
checks Disable redirect messages for anonymous clones 2017-12-25 05:33:32 -08:00
ci fix issue #37843 2018-01-03 20:57:41 +00:00
conflict Fix conflict highlighting 2017-11-17 17:57:48 +00:00
cycle_analytics Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
data_builder
database Use a background migration for issues.closed_at 2018-01-03 12:28:00 +01:00
dependency_linker
diff Fix error when viewing diffs without blobs 2018-01-04 14:33:12 +00:00
downtime_check
email Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
etag_caching
fogbugz_import
gfm Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
git Merge branch 'zj-blob-batch' into 'master' 2018-01-05 10:47:28 +00:00
gitaly_client Simplify conflict resolution interface and code 2018-01-02 16:22:02 -03:00
github_import Migrate to Project#empty_repo? 2017-12-20 19:13:11 +01:00
gitlab_import
google_code_import Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
gpg Add more specs. 2017-10-05 22:43:44 -05:00
graphs
health_checks Replaces tag: true into :tag in the specs 2017-10-07 13:57:54 +02:00
hook_data Add total_time_spent to the changes hash in issuable Webhook payloads 2017-11-15 15:42:19 +01:00
i18n
import_export Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
kubernetes Extend Cluster Applications to allow installation of Prometheus 2017-12-22 17:23:43 +00:00
ldap Modify LDAP::Person to return username value based on attributes 2018-01-04 17:10:40 -06:00
legacy_github_import Rewrite the GitHub importer from scratch 2017-11-07 23:24:59 +01:00
metrics Merge branch 'pawel/reduce_cardinality_of_prometheus_metrics' into 'master' 2017-12-21 15:56:45 +00:00
middleware use Gitlab::Routing.url_helpers instead of Rails.application.routes.url_helpers 2017-11-21 13:29:57 +01:00
o_auth Modify LDAP::Person to return username value based on attributes 2018-01-04 17:10:40 -06:00
prometheus
quick_actions added date parameter for time tracking 2017-10-13 11:41:49 +01:00
redis
saml Normalize LDAP DN when looking up identity 2017-10-31 17:13:50 +01:00
sanitizers
serializer
sherlock
sidekiq_middleware Send SIGSTP before SIGTERM to actually give Sidekiq jobs 30s to finish when the memory killer kicks in 2017-11-02 15:33:19 +01:00
sidekiq_status
sidekiq_versioning Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
slash_commands Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
sql Modify fuzzy_arel_match to search for equality when a term shorter than 3 characters is provided 2017-11-27 11:29:40 +01:00
storage_check Move the circuitbreaker check out in a separate process 2017-12-08 09:11:39 +01:00
template
utils Fix rubocop offence 2017-12-12 17:40:54 +01:00
view/presenter Present member collection at the controller level 2017-12-12 18:14:58 +01:00
action_rate_limiter_spec.rb Address review comments with playing pipeline scheduler 2017-12-12 17:12:45 -08:00
allowable_spec.rb
app_logger_spec.rb Memoize GitLab logger to reduce open file descriptors 2017-10-24 14:06:23 +03:00
asciidoc_spec.rb
auth_spec.rb Merge branch 'dm-fix-registry-with-sudo-token' into 'master' 2017-11-24 09:09:38 +00:00
background_migration_spec.rb
blame_spec.rb
changes_list_spec.rb
chat_name_token_spec.rb
ci_access_spec.rb
closing_issue_extractor_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
color_schemes_spec.rb
contributions_calendar_spec.rb
current_settings_spec.rb Fix failure in current_settings_spec.rb 2017-10-20 18:33:00 +00:00
daemon_spec.rb
database_spec.rb Merge branch 'mk-add-old-attachments-to-uploads-table' into 'master' 2017-12-07 02:34:58 +00:00
dependency_linker_spec.rb
downtime_check_spec.rb
encoding_helper_spec.rb Fix a bug where charlock_holmes was used needlessly to encode strings 2018-01-04 19:27:37 -03:00
exclusive_lease_spec.rb
fake_application_settings_spec.rb Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
file_detector_spec.rb Cache issuable template names 2017-10-12 13:26:03 +01:00
file_finder_spec.rb
git_access_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
git_access_wiki_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
git_ref_validator_spec.rb
git_spec.rb add support for the commit reference filter 2017-12-07 09:01:37 -05:00
gitaly_client_spec.rb Move encoding methods to the more general EncodingHelper 2017-12-28 12:32:33 -03:00
github_import_spec.rb Rewrite the GitHub importer from scratch 2017-11-07 23:24:59 +01:00
gl_repository_spec.rb
gpg_spec.rb Add more specs. 2017-10-05 22:43:44 -05:00
group_hierarchy_spec.rb
highlight_spec.rb
i18n_spec.rb
identifier_spec.rb Allow git pull/push on project redirects 2017-12-08 17:42:43 +00:00
import_sources_spec.rb Replace old GH importer with the parallel importer 2017-11-07 23:25:03 +01:00
incoming_email_spec.rb
insecure_key_fingerprint_spec.rb Backport authorized_keys branch 'find-key-by-fingerprint' 2018-01-08 20:34:16 +00:00
issuable_metadata_spec.rb Fail when issuable_meta_data is called on an unlimited collection 2017-11-07 16:26:55 +00:00
issuable_sorter_spec.rb
issuables_count_for_state_spec.rb
job_waiter_spec.rb
kubernetes_spec.rb
lazy_spec.rb
lfs_token_spec.rb
markup_helper_spec.rb
metrics_spec.rb Tests for Web transaction and remove simple transacton 2017-11-02 18:11:44 +01:00
multi_collection_paginator_spec.rb Always use the same order specs for MultiCollectionPaginator 2017-10-11 11:27:59 +02:00
optimistic_locking_spec.rb
other_markup_spec.rb
otp_key_rotator_spec.rb
path_regex_spec.rb Remove EE-specific group paths 2017-11-07 19:52:10 +01:00
performance_bar_spec.rb
polling_interval_spec.rb
popen_spec.rb
project_authorizations_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
project_search_results_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
project_template_spec.rb Simplify project page 2017-10-11 09:07:19 +00:00
project_transfer_spec.rb
prometheus_client_spec.rb
reference_counter_spec.rb
reference_extractor_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
regex_spec.rb
repo_path_spec.rb
request_context_spec.rb
request_forgery_protection_spec.rb
request_profiler_spec.rb
route_map_spec.rb
routing_spec.rb
search_results_spec.rb Merge branch 'jprovazn-search-issues' into 'master' 2018-01-03 09:21:09 +00:00
sentry_spec.rb
shell_spec.rb Backport authorized_keys_enabled defaults to true' 2018-01-08 20:34:20 +00:00
sidekiq_config_spec.rb Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
sidekiq_status_spec.rb Simplify check for running job on Redis 2017-10-13 10:17:41 +02:00
sidekiq_throttler_spec.rb
sidekiq_versioning_spec.rb Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
snippet_search_results_spec.rb
ssh_public_key_spec.rb
string_range_marker_spec.rb
string_regex_marker_spec.rb
tcp_checker_spec.rb Add a gitlab:tcp_check rake task 2017-12-13 15:53:32 +00:00
themes_spec.rb
untrusted_regexp_spec.rb
upgrader_spec.rb
uploads_transfer_spec.rb
url_blocker_spec.rb Merge branch 'ssrf-protections-round-2' into 'security-10-1' 2017-11-08 20:11:08 -08:00
url_builder_spec.rb
url_sanitizer_spec.rb
usage_data_spec.rb Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
user_access_spec.rb Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
user_activities_spec.rb
utils_spec.rb Backport which from EE 2017-12-01 15:26:40 -08:00
version_info_spec.rb
visibility_level_spec.rb Forking a project to a namespace with lower visibility. 2017-12-29 11:15:26 +01:00
workhorse_spec.rb Support show-all-refs for git over HTTP 2017-10-30 15:20:36 +00:00