Commit Graph

394 Commits

Author SHA1 Message Date
GitLab Bot 6d5a18ac65 Add latest changes from gitlab-org/gitlab@master 2020-11-11 18:09:10 +00:00
GitLab Bot 534eb932e0 Add latest changes from gitlab-org/gitlab@master 2020-11-11 03:08:57 +00:00
GitLab Bot 5427433c6d Add latest changes from gitlab-org/gitlab@master 2020-11-11 00:08:58 +00:00
GitLab Bot f29dae9f10 Add latest changes from gitlab-org/gitlab@master 2020-11-09 21:08:48 +00:00
GitLab Bot 2a115184f7 Add latest changes from gitlab-org/gitlab@master 2020-11-04 18:08:42 +00:00
GitLab Bot f791b9447b Add latest changes from gitlab-org/gitlab@master 2020-10-31 06:09:06 +00:00
GitLab Bot 3940f59a61 Add latest changes from gitlab-org/gitlab@master 2020-10-16 15:08:46 +00:00
GitLab Bot 3775eba7c1 Add latest changes from gitlab-org/gitlab@master 2020-10-16 12:09:33 +00:00
GitLab Bot 6ae38bb3b5 Add latest changes from gitlab-org/gitlab@master 2020-10-15 12:09:06 +00:00
GitLab Bot 5c635722c6 Add latest changes from gitlab-org/gitlab@master 2020-10-14 21:08:38 +00:00
GitLab Bot 99670fc6a0 Add latest changes from gitlab-org/gitlab@master 2020-10-14 15:08:42 +00:00
GitLab Bot 884a65481f Add latest changes from gitlab-org/gitlab@master 2020-10-12 18:08:31 +00:00
GitLab Bot 34cd22d1a9 Add latest changes from gitlab-org/gitlab@master 2020-10-05 06:08:45 +00:00
GitLab Bot e6bcd6e738 Add latest changes from gitlab-org/gitlab@master 2020-09-25 09:09:40 +00:00
GitLab Bot 12ce3cc57c Add latest changes from gitlab-org/gitlab@master 2020-09-24 18:09:51 +00:00
GitLab Bot 7985071975 Add latest changes from gitlab-org/gitlab@master 2020-09-21 12:09:34 +00:00
GitLab Bot afed1a4be1 Add latest changes from gitlab-org/gitlab@master 2020-09-17 09:09:32 +00:00
GitLab Bot 591b0e86e3 Add latest changes from gitlab-org/gitlab@master 2020-09-16 12:10:15 +00:00
GitLab Bot 5ec9ab0e8c Add latest changes from gitlab-org/gitlab@master 2020-09-10 21:08:28 +00:00
GitLab Bot d9e07a155e Add latest changes from gitlab-org/gitlab@master 2020-08-18 15:10:33 +00:00
GitLab Bot 6df7943512 Add latest changes from gitlab-org/gitlab@master 2020-08-13 15:10:03 +00:00
GitLab Bot bdca097916 Add latest changes from gitlab-org/gitlab@master 2020-08-11 03:11:00 +00:00
GitLab Bot 277fdda606 Add latest changes from gitlab-org/gitlab@master 2020-08-07 09:10:15 +00:00
GitLab Bot 631ed6dcca Add latest changes from gitlab-org/gitlab@master 2020-08-06 00:09:53 +00:00
GitLab Bot 25bfb256b3 Add latest changes from gitlab-org/gitlab@master 2020-08-05 12:09:45 +00:00
GitLab Bot 583fadea8d Add latest changes from gitlab-org/gitlab@master 2020-07-28 21:09:30 +00:00
GitLab Bot f05ceb978a Add latest changes from gitlab-org/gitlab@master 2020-07-22 21:09:50 +00:00
GitLab Bot d1cb802bac Add latest changes from gitlab-org/gitlab@master 2020-07-22 15:09:28 +00:00
GitLab Bot 5bd4297fd7 Add latest changes from gitlab-org/gitlab@master 2020-07-21 09:09:34 +00:00
GitLab Bot 2d8454515e Add latest changes from gitlab-org/gitlab@master 2020-07-16 15:09:38 +00:00
GitLab Bot 9d67bc14cb Add latest changes from gitlab-org/gitlab@master 2020-07-16 12:09:22 +00:00
GitLab Bot 18ffa5e881 Add latest changes from gitlab-org/gitlab@master 2020-07-14 18:09:55 +00:00
GitLab Bot 3b30c28dc6 Add latest changes from gitlab-org/gitlab@master 2020-07-13 03:09:12 +00:00
GitLab Bot c52b72f577 Add latest changes from gitlab-org/gitlab@master 2020-07-08 12:09:33 +00:00
GitLab Bot 0a319374e7 Add latest changes from gitlab-org/gitlab@master 2020-07-08 06:09:13 +00:00
GitLab Bot a93bf027c2 Add latest changes from gitlab-org/gitlab@master 2020-07-07 15:08:49 +00:00
GitLab Bot 7dc3246696 Add latest changes from gitlab-org/gitlab@master 2020-07-07 00:08:58 +00:00
GitLab Bot d6348d22dd Add latest changes from gitlab-org/gitlab@master 2020-06-24 09:08:32 +00:00
GitLab Bot 908a54b624 Add latest changes from gitlab-org/gitlab@master 2020-06-05 21:08:27 +00:00
GitLab Bot b64a8161c9 Add latest changes from gitlab-org/gitlab@master 2020-05-29 18:08:26 +00:00
GitLab Bot c65a2b8a6c Add latest changes from gitlab-org/gitlab@master 2020-05-18 00:08:13 +00:00
GitLab Bot 8ff63012e9 Add latest changes from gitlab-org/gitlab@master 2020-05-12 15:10:33 +00:00
GitLab Bot 3f45eb27e9 Add latest changes from gitlab-org/gitlab@master 2020-05-11 21:09:40 +00:00
GitLab Bot e3190840bc Add latest changes from gitlab-org/gitlab@master 2020-05-11 12:10:28 +00:00
GitLab Bot 73886079f3 Add latest changes from gitlab-org/gitlab@master 2020-05-06 18:09:38 +00:00
GitLab Bot 38ceebb9b3 Add latest changes from gitlab-org/gitlab@master 2020-05-05 18:09:43 +00:00
GitLab Bot abe11a6a2c Add latest changes from gitlab-org/gitlab@master 2020-04-28 21:09:35 +00:00
GitLab Bot 95e18e3283 Add latest changes from gitlab-org/gitlab@master 2020-04-28 18:09:35 +00:00
GitLab Bot e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot 09093c1278 Add latest changes from gitlab-org/gitlab@master 2020-04-15 18:09:36 +00:00
GitLab Bot f697dc5e76 Add latest changes from gitlab-org/gitlab@master 2020-04-14 18:09:54 +00:00
GitLab Bot a9ced7da44 Add latest changes from gitlab-org/gitlab@master 2020-04-09 12:09:24 +00:00
GitLab Bot 1219a9dce9 Add latest changes from gitlab-org/gitlab@master 2020-04-01 15:07:45 +00:00
GitLab Bot 2c72daf2f1 Add latest changes from gitlab-org/gitlab@master 2020-03-30 18:08:07 +00:00
GitLab Bot 6ac4a6713e Add latest changes from gitlab-org/gitlab@master 2020-03-27 09:08:28 +00:00
GitLab Bot e80e0dd64f Add latest changes from gitlab-org/gitlab@master 2020-03-26 15:08:16 +00:00
GitLab Bot 6763d27876 Add latest changes from gitlab-org/gitlab@master 2020-03-18 09:09:31 +00:00
GitLab Bot 154b9bae14 Add latest changes from gitlab-org/gitlab@master 2020-03-17 21:09:16 +00:00
GitLab Bot 286fe61013 Add latest changes from gitlab-org/gitlab@master 2020-03-13 12:09:22 +00:00
GitLab Bot 3cd08f4bf9 Add latest changes from gitlab-org/gitlab@master 2020-03-13 00:09:34 +00:00
GitLab Bot cd52759ee3 Add latest changes from gitlab-org/gitlab@master 2020-03-12 12:09:17 +00:00
GitLab Bot fca89bb73f Add latest changes from gitlab-org/gitlab@master 2020-03-11 21:09:19 +00:00
GitLab Bot a210c43e0a Add latest changes from gitlab-org/gitlab@master 2020-03-11 15:09:37 +00:00
GitLab Bot 83731155d9 Add latest changes from gitlab-org/gitlab@master 2020-03-06 18:08:08 +00:00
GitLab Bot a8de96bff5 Add latest changes from gitlab-org/gitlab@master 2020-03-05 18:08:19 +00:00
GitLab Bot 00bd11b166 Add latest changes from gitlab-org/gitlab@master 2020-03-05 06:07:51 +00:00
GitLab Bot 2fd92f2dc7 Add latest changes from gitlab-org/gitlab@master 2020-03-04 21:07:54 +00:00
GitLab Bot 67cdfd2683 Add latest changes from gitlab-org/gitlab@master 2020-02-28 09:09:01 +00:00
GitLab Bot 53ae6b7e3f Add latest changes from gitlab-org/gitlab@master 2020-02-17 09:08:52 +00:00
GitLab Bot 866ca4e49f Add latest changes from gitlab-org/gitlab@master 2020-02-14 21:09:08 +00:00
GitLab Bot d466ee5042 Add latest changes from gitlab-org/gitlab@master 2020-02-13 21:08:59 +00:00
GitLab Bot 7351a484d7 Add latest changes from gitlab-org/gitlab@master 2020-02-10 12:08:59 +00:00
GitLab Bot e43077ab47 Add latest changes from gitlab-org/gitlab@master 2020-02-07 15:09:52 +00:00
GitLab Bot 211a8c3361 Add latest changes from gitlab-org/gitlab@master 2020-02-07 12:09:13 +00:00
GitLab Bot 76623c12c1 Add latest changes from gitlab-org/gitlab@master 2020-02-05 21:09:02 +00:00
GitLab Bot e40710ab8a Add latest changes from gitlab-org/gitlab@master 2020-02-05 00:08:41 +00:00
GitLab Bot 88a0824944 Add latest changes from gitlab-org/gitlab@master 2020-02-04 12:09:00 +00:00
GitLab Bot c27acb1d37 Add latest changes from gitlab-org/gitlab@master 2020-01-31 15:08:42 +00:00
GitLab Bot 40254b9ace Add latest changes from gitlab-org/gitlab@master 2020-01-17 21:08:29 +00:00
GitLab Bot 571d993b49 Add latest changes from gitlab-org/gitlab@master 2020-01-15 18:08:34 +00:00
GitLab Bot 0b12a5312c Add latest changes from gitlab-org/gitlab@master 2020-01-14 21:07:45 +00:00
GitLab Bot 4ce0bee95d Add latest changes from gitlab-org/gitlab@master 2020-01-14 12:07:41 +00:00
GitLab Bot 6f0f893bd8 Add latest changes from gitlab-org/gitlab@master 2020-01-10 18:07:43 +00:00
GitLab Bot b4028d4500 Add latest changes from gitlab-org/gitlab@master 2020-01-07 15:07:34 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot 11faf8ae72 Add latest changes from gitlab-org/gitlab@master 2019-10-23 21:06:17 +00:00
GitLab Bot b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
GitLab Bot 427b23c127 Add latest changes from gitlab-org/gitlab@master 2019-10-03 00:05:59 +00:00
GitLab Bot 9e27f0d920 Add latest changes from gitlab-org/gitlab@master 2019-10-01 12:05:59 +00:00
GitLab Bot fbcb36880c Add latest changes from gitlab-org/gitlab@master 2019-09-25 06:06:16 +00:00
GitLab Bot 150effab27 Add latest changes from gitlab-org/gitlab@master 2019-09-24 21:06:18 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Reuben Pereira 4a0d7a6cf0 Create self-monitoring project in background migration
- A regular migration caused problems such as
https://gitlab.com/charts/gitlab/issues/1565.
2019-09-12 12:56:47 +00:00
Alexandru Croitor b012174d6f Change discussion_ids on promoted epics notes
Notes on epics promoted from an issue used to get same discussion_id
as the notes from the issue the epic was promoted from, which would
cause problems when trying to reply to the epic discussion.
2019-09-11 12:17:51 +00:00
Ash McKenzie 19ff9d9899
Replace rails_helper.rb with spec_helper.rb
rails_helper.rb's only logic was to require
spec_helper.rb.
2019-08-30 12:26:18 +10:00
Jarka Košanová 19db315734 Add rake tasks for migrating leacy uploads
- move uploads created by AttachmentUploader
- handle also files created for legacy_diff_notes
2019-08-16 07:52:30 +02:00
Stan Hu ef3e6785a2 Merge branch 'frozen_string_spec_lib' into 'master'
Add frozen_string_literal to spec/lib (part 1)

See merge request gitlab-org/gitlab-ce!31130
2019-07-26 20:37:26 +00:00
Lin Jen-Shin bd1a5a9f42 Merge branch 'remove-nested-groups-checks' into 'master'
Remove code related to object hierarchy and MySQL

Closes #65056 and #65055

See merge request gitlab-org/gitlab-ce!31095
2019-07-26 14:57:12 +00:00
Thong Kuah f540ffcef6 Add frozen_string_literal to spec/lib (part 1)
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:25:07 +12:00
Heinrich Lee Yu 1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08:00
Heinrich Lee Yu 2b3d00a778 Remove unneeded monkey-patch
Changes all calls to data_source_exists? to table_exists?
since that is the intent of these calls
2019-07-25 12:21:38 +08:00
Adam Hegyi 4959d8fd49 Migrate null values for users.private_profile
- Background migration for changing null values to false
- Set false as default value for private_profile DB column
2019-07-15 21:07:54 +00:00
Andreas Brandl 5ea899d34f Merge branch 'id-clean-up-mr-assignees-migration' into 'master'
Add cleanup migration for MR's multiple assignees

See merge request gitlab-org/gitlab-ce!30269
2019-07-12 13:16:08 +00:00
Bob Van Landuyt 82e6ed310b Fix incorrect namespaces & route for user-routes
This fixes the `Namespace#name` and `Route#name` for all user
namespaces and their personal projects in case they don't match the
user name anymore.

More info info in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23272
2019-07-09 18:09:45 +02:00
Igor Drozdov 184807b253 Add cleanup migration for MR's mutliple assignees
The migration steals the remaining background jobs
of populating MRs with assignees, executes them
synchronously and then makes sure that all the
assignees are migrated
2019-07-09 12:13:55 +03:00
Heinrich Lee Yu 28ac2d3049 Remove old migrations and specs
This removes old migrations that violate the
FactoriesinMigrationSpecs cop
2019-07-03 03:55:56 +08:00
Nick Thomas 351392f409
Remove background migrations for old schemas
On the assumption that a background migration whose specs need a schema
older than 2018 is obsoleted by this migration squash, we can remove
both specs and code for those that fail to run in CI as a result of the
schema at that date no longer existing.

This is true for all but the MigrateStageStatus background migration,
which is also used from the MigrateBuildStage background migration.
2019-07-02 09:35:03 +01:00
Yorick Peterse 8469f59d78
Backport the EE schema and migrations to CE
This backports all EE schema changes to CE, including EE migrations,
ensuring both use the same schema.

== Updated tests

A spec related to ghost and support bot users had to be modified to make
it pass. The spec in question assumes that the "support_bot" column
exists when defining the spec. In the single codebase setup this is not
the case, as the column is backported in a later migration. Any attempt
to use a different schema version or use of "around" blocks to
conditionally disable specs won't help, as reverting the backport
migration would also drop the "support_bot" column. Removing the
"support_bot" tests entirely appears to be the only solution.

We also need to update some foreign key tests now that we have
backported the EE columns. Fortunately, these changes are very minor.

== Backporting migrations

This commit moves EE specific migrations (except those for the Geo
tracking database) and related files to CE, and also removes any traces
of the ee/db directory.

Some migrations had to be modified or removed, as they no longer work
with the schema being backported. These migrations were all quite old,
so we opted for removing them where modifying them would take too much
time and effort.

Some old migrations were modified in EE, while also existing in CE. In
these cases we took the EE code, and in one case removed them entirely.
It's not worth spending time trying to merge these changes somehow as we
plan to remove old migrations around the release of 12.0, see
https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-06-17 17:09:05 +02:00
Stan Hu b7e3a1e040 Revert "Merge branch '50070-legacy-attachments' into 'master'"
This reverts commit fd19f887df, reversing
changes made to abb2d4c601.
2019-06-09 05:56:11 -07:00
Markus Koller 8f537845ed
Fix migration specs using factories
We need to stub default_git_depth and default_git_depth= because some
old migrations specs try to create a record using schema before that
column was introduced.

The `let!` calls were executed before the `before` hook which still
caused some factories to fail, so they're created in the `before` hook
now as well.
2019-06-07 13:31:26 +02:00
Kamil Trzciński 4b086b7450 Merge branch '62418-project-default-git-depth' into 'master'
Add project level git depth setting

Closes #59688

See merge request gitlab-org/gitlab-ce!28919
2019-06-07 10:01:52 +00:00
Jarka Košanová 3335918bff Migrate legacy uploads to the project location
Uploads coming from AttachmentUploader
need to be moved to the currently supported location
(FileUploader)
2019-06-06 15:33:04 +02:00
Krasimir Angelov c0a812ecb7 Fix migration specs using factories
We need to stub default_git_depth and default_git_depth= because some
old migrations specs try to create a record using schema before that
column was introduced.
2019-06-07 00:04:56 +12:00
Krasimir Angelov ad9ae16d8a Add project level git depth setting
Introduce default_git_depth in project's CI/CD settings and set it to
50. Use it if there is no GIT_DEPTH variable specified. Apply this
default only to newly created projects and keep it nil for old ones
in order to not break pipelines that rely on non-shallow clones.

default_git_depth can be updated from CI/CD Settings in the UI, must be
either nil or integer between 0 and 1000 (incl).

Inherit default_git_depth from the origin project when forking projects.

MR pipelines are run on a MR ref (refs/merge-requests/:iid/merge) and it
contains unique commit (i.e. merge commit) which doesn't exist in the
other branch/tags refs. We need to add it cause otherwise it may break
pipelines for old projects that have already enabled Pipelines for merge
results and have git depth 0.

Document new default_git_depth project CI/CD setting
2019-06-06 09:21:18 +01:00
Oswaldo Ferreira f3efec2029 Reset merge status from mergeable MRs
Adds migrations to reset the merge_status of opened,
mergeable MRs. That's required by
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28513
so we're able to sync the status update along merge-ref,
without leaving MRs with a stale merge-ref.
2019-05-31 15:21:20 -03:00
Peter Marko 40490cc492 Add wiki size to project statistics 2019-05-29 16:08:25 +02:00
Jasper Maes 624a1cdab4 Upgrade Rails to 5.1.6.1
Model.new.attributes now also returns encrypted attributes.
2019-04-23 08:31:23 +08:00
Rémy Coutable 4037eb32e0
Put four flaky specs in quanrantine
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-04-17 15:54:14 +02:00
Michael Kozono b22a725a0c Merge branch 'sh-fix-issue-59985' into 'master'
Fix stage index migration failing in PostgreSQL 10

Closes #59985

See merge request gitlab-org/gitlab-ce!26972
2019-04-08 20:11:46 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Stan Hu 0f5b735685 Fix stage index migration failing in PostgreSQL 10
As discussed in
https://www.postgresql.org/message-id/9922.1353433645%40sss.pgh.pa.us,
the PostgreSQL window function last_value may not consider the
right rows:

Note that first_value, last_value, and nth_value consider only the rows
within the "window frame", which by default contains the rows from the
start of the partition through the last peer of the current row. This is
likely to give unhelpful results for last_value and sometimes also
nth_value. You can redefine the frame by adding a suitable frame
specification (RANGE or ROWS) to the OVER clause. See Section 4.2.8 for
more information about frame specifications.

This query could be fixed by adding `RANGE BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING`, but that's quite verbose. It's simpler just to
use the first_value function.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59985
2019-04-03 22:47:51 -07:00
Oswaldo Ferreira 929ee4d18d Add multiple assignees migration and table population
This will be further required for supporting multi-assignees MRs
2019-03-25 19:50:40 -03:00
Nick Thomas 9f05e97aad
Run rubocop -a 2019-03-13 13:42:43 +00:00
Imre Farkas 6d92a3d4e2 Remove undigested token column from personal_access_tokens table
Token column are no longer used as token values are stored digested in
token_digest.
2019-02-20 11:39:37 +00:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Mayra Cabrera 70e5d0ad1b Removes factories on Cluster background migration
'Populate cluster kubernetes namespace' was using factories for their
specs. According to our documentation (see spec/migrations/readme.md),
we should use table helper to create a temproary ActiveRecord::Base
derived model for a table.
2019-01-22 09:18:07 -06:00
Bob Van Landuyt c905130ef0 Ignore existing offenses of FactoriesInMigration 2019-01-16 13:15:33 +01:00
Toon Claes 082cc12225 Fix failing spec with orphaned namespace 2019-01-11 15:36:57 +01:00
Stan Hu 618875c58c Fix duplicate disk path in Backfill ProjectRepos
On GitLab.com, we saw numerous duplicate disk entry inserts because
the migration was not taking the routes table into account. We now
implement this in the migration to be consistent.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56061
2019-01-11 15:36:51 +01:00
Toon Claes b87dcc238a Remove backfill migration for legacy projects
We've found some problems with the backgroung migration:
BackfillLegacyProjectRepositories

See https://gitlab.com/gitlab-org/gitlab-ce/issues/56061

The migration was disabled to run on production:
https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5906

So to overcome it's not being run anywhere, just remove it.

Whenever all problems in BackfillLegacyProjectRepositories are fixed
we'll create a new migration (with a different timestamp) to have it
run.
2019-01-10 16:45:14 +01:00
Kamil Trzciński 0103d5be96 Add config_options|variables to BuildMetadata
These are data columns that store runtime configuration
of build needed to execute it on runner and within pipeline.

The definition of this data is that once used, and when no longer
needed (due to retry capability) they can be freely removed.

They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking
support for json datatype on old enough version).
2019-01-04 16:38:17 +01:00
Douglas Barbosa Alexandre 4a132952db
Extract a shared example for legacy and hashed storage migrations tests 2018-12-18 21:35:14 -02:00
Douglas Barbosa Alexandre 754f66113e
Backfill project_repositories for legacy storage projects
Adds a background migration that will ensure all projects that
are on legacy storage have a row in `project_repositories`.
2018-12-18 21:13:38 -02:00
Semyon Pupkov 3c2a6be04d Fix warning: already initialized constant STATUSES
spec/lib/gitlab/background_migration/migrate_stage_status_spec.rb:9: warning: already initialized constant STATUSES
spec/lib/gitlab/background_migration/migrate_build_stage_spec.rb:9: warning: previous definition of STATUSES was here
2018-12-13 12:01:47 +05:00
Douwe Maan 5a727a4d36 Merge branch 'osw-update-mr-metrics-with-events-data' into 'master'
Populate MR metrics with events table information (migration)

Closes #41587

See merge request gitlab-org/gitlab-ce!23564
2018-12-10 09:39:07 +00:00
Douglas Barbosa Alexandre 8c9e692095
Fill project_repositories for hashed storage 2018-12-06 22:57:56 -02:00
Oswaldo Ferreira 4f6999fa26 Populate MR metrics with events table information (migration) 2018-12-06 22:08:38 -02:00
Toon Claes 5237a55d62
Fill project_repositories for hashed storage
This adds a background migration that will ensure all projects that
are on hashed storage have a row in `project_repositories`.

Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/48527
2018-12-06 21:04:41 -02:00
Grzegorz Bizon 239a4f7264 Use plaintext token when migration is not complete 2018-12-03 14:29:51 +01:00
Grzegorz Bizon 0b8a2779e7 Merge branch 'master' into fix/gb/encrypt-runners-tokens
* master: (243 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-28 13:14:04 +01:00
Toon Claes f35ff1ea48 Ensure all Routables have a parent
Or otherwise do not try to write repo config.
2018-11-27 22:48:55 +01:00
Toon Claes 4711100164 Always run CleanUp before writing the git config 2018-11-27 22:48:55 +01:00
Toon Claes 220208c051 Retry the failing projects 2018-11-27 22:48:55 +01:00
Nick Thomas 6ddefe7cad
Correctly handle data-loss scenarios when encrypting columns
If the EncryptColumns background migration runs in a sidekiq with a
stale view of the database schema, or when the purported destination
columns don't actually exist, data loss can result. Attempt to work
around these issues by reloading schema information before running
the migration, and raising errors if the model reports that any of its
source or destination columns are missing.
2018-11-27 18:24:18 +00:00
Grzegorz Bizon 1143411ae8 Reduce Sidekiq signature of scheduled tokens migration 2018-11-23 13:28:29 +01:00
Grzegorz Bizon 9ab50c86a9 Add specs for runners tokens encryption migration 2018-11-23 11:55:38 +01:00
Mayra Cabrera 477d2e1a47 Add background migration for Kubernetes Namespaces 2018-11-06 12:23:00 +00:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Jan Provaznik 5b0b73d922 Merge branch 'security-redact-links' into 'master'
[master] Redact unsubscribe links in issuable texts

See merge request gitlab/gitlabhq!2528
2018-10-29 16:10:32 +00:00
Imre Farkas b9652d8e4d [master] Persist only SHA digest of PersonalAccessToken#token 2018-10-29 16:06:45 +00:00