Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-26Merge branch 'frozen_string_spec_lib' into 'master'Stan Hu
Add frozen_string_literal to spec/lib (part 1) See merge request gitlab-org/gitlab-ce!31130
2019-07-26Merge branch 'remove-nested-groups-checks' into 'master'Lin Jen-Shin
Remove code related to object hierarchy and MySQL Closes #65056 and #65055 See merge request gitlab-org/gitlab-ce!31095
2019-07-26Add frozen_string_literal to spec/lib (part 1)Thong Kuah
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-25Remove code related to object hierarchy in MySQLHeinrich Lee Yu
These are not required because MySQL is not supported anymore
2019-07-25Remove unneeded monkey-patchHeinrich Lee Yu
Changes all calls to data_source_exists? to table_exists? since that is the intent of these calls
2019-07-16Migrate null values for users.private_profileAdam Hegyi
- Background migration for changing null values to false - Set false as default value for private_profile DB column
2019-07-12Merge branch 'id-clean-up-mr-assignees-migration' into 'master'Andreas Brandl
Add cleanup migration for MR's multiple assignees See merge request gitlab-org/gitlab-ce!30269
2019-07-09Fix incorrect namespaces & route for user-routesBob Van Landuyt
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-09Add cleanup migration for MR's mutliple assigneesIgor Drozdov
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-02Remove old migrations and specsHeinrich Lee Yu
This removes old migrations that violate the FactoriesinMigrationSpecs cop
2019-07-02Remove background migrations for old schemasNick Thomas
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-06-17Backport the EE schema and migrations to CEYorick Peterse
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-09Revert "Merge branch '50070-legacy-attachments' into 'master'"Stan Hu
This reverts commit fd19f887dfeeeedb483c4a4fb32f9f768e89389c, reversing changes made to abb2d4c601d796339c8d7cb0c00946696730f198.
2019-06-07Fix migration specs using factoriesMarkus Koller
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-07Merge branch '62418-project-default-git-depth' into 'master'Kamil Trzciński
Add project level git depth setting Closes #59688 See merge request gitlab-org/gitlab-ce!28919
2019-06-06Migrate legacy uploads to the project locationJarka Košanová
Uploads coming from AttachmentUploader need to be moved to the currently supported location (FileUploader)
2019-06-06Fix migration specs using factoriesKrasimir Angelov
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-06Add project level git depth settingKrasimir Angelov
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-05-31Reset merge status from mergeable MRsOswaldo Ferreira
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-29Add wiki size to project statisticsPeter Marko
2019-04-23Upgrade Rails to 5.1.6.1Jasper Maes
Model.new.attributes now also returns encrypted attributes.
2019-04-17Put four flaky specs in quanrantineRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-04-08Merge branch 'sh-fix-issue-59985' into 'master'Michael Kozono
Fix stage index migration failing in PostgreSQL 10 Closes #59985 See merge request gitlab-org/gitlab-ce!26972
2019-04-05Autocorrect with RSpec/ExampleWording copThong Kuah
- rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
2019-04-04Fix stage index migration failing in PostgreSQL 10Stan Hu
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-03-26Add multiple assignees migration and table populationOswaldo Ferreira
This will be further required for supporting multi-assignees MRs
2019-03-13Run rubocop -aNick Thomas
2019-02-20Remove undigested token column from personal_access_tokens tableImre Farkas
Token column are no longer used as token values are stored digested in token_digest.
2019-01-24Enable the Layout/ExtraSpacing copRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-22Removes factories on Cluster background migrationMayra Cabrera
'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-16Ignore existing offenses of FactoriesInMigrationBob Van Landuyt
2019-01-11Fix failing spec with orphaned namespaceToon Claes
2019-01-11Fix duplicate disk path in Backfill ProjectReposStan Hu
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-10Remove backfill migration for legacy projectsToon Claes
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-04Add config_options|variables to BuildMetadataKamil Trzciński
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).
2018-12-19Extract a shared example for legacy and hashed storage migrations testsDouglas Barbosa Alexandre
2018-12-19Backfill project_repositories for legacy storage projectsDouglas Barbosa Alexandre
Adds a background migration that will ensure all projects that are on legacy storage have a row in `project_repositories`.
2018-12-13Fix warning: already initialized constant STATUSESSemyon Pupkov
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-10Merge branch 'osw-update-mr-metrics-with-events-data' into 'master'Douwe Maan
Populate MR metrics with events table information (migration) Closes #41587 See merge request gitlab-org/gitlab-ce!23564
2018-12-07Fill project_repositories for hashed storageDouglas Barbosa Alexandre
2018-12-07Populate MR metrics with events table information (migration)Oswaldo Ferreira
2018-12-07Fill project_repositories for hashed storageToon Claes
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-03Use plaintext token when migration is not completeGrzegorz Bizon
2018-11-28Merge branch 'master' into fix/gb/encrypt-runners-tokensGrzegorz Bizon
* master: (243 commits) Conflicts: db/schema.rb lib/gitlab/import_export/import_export.yml
2018-11-28Ensure all Routables have a parentToon Claes
Or otherwise do not try to write repo config.
2018-11-28Always run CleanUp before writing the git configToon Claes
2018-11-28Retry the failing projectsToon Claes
2018-11-27Correctly handle data-loss scenarios when encrypting columnsNick Thomas
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-23Reduce Sidekiq signature of scheduled tokens migrationGrzegorz Bizon
2018-11-23Add specs for runners tokens encryption migrationGrzegorz Bizon