An error occurred fetching the project authors.
- 10 Jul, 2019 1 commit
-
-
Mayra Cabrera authored
Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
-
- 28 Jun, 2019 1 commit
-
-
Jason Goodman authored
-
- 19 Jun, 2019 2 commits
-
-
pjaspers authored
So funny story, true story. I tried to run the test locally, but didn't make it past setting up Gitaly. Here's what I tried: First attempt: `git clone gitlab-ce` `cd gitlab-ce && bundle install` `be rspec` This didn't work because I was missing the config/database.yml, I didn't see a `script/bootstrap` so I looked in the readme which redirected me to a webpage which redirected me to the gitlab-development-kit. Second attempt: `gem install gitlab-development-kit` cd gitlab-development-kit gdk init gdk isntall This broke somwhere along the way because it couldn't install Gitaly because my go version was too low. But it did clone the gitlab repo again and this time it did have a config/database.yml. So I tried to cd into it and `be rspec spec/lib/gitlab/database/migration_helpers_spec.rb` which complained about the database not being configured so I: - Changed the socket to localhost (in the config/database.yml) - `createdb <dev_db>` `createdb test_db` - `be rake db:test:prepare` Great success, it was doing things! But then failed when it came at the Gitaly step. Since I only want to change these three lines, at the point I gave up and entrusted the pipeline to do its thing. What I would have liked: - A 'It's a Rails system, I know this' readme/docs (It's in there somewhere just couldn't find it) - A way to run tests without having to use Gitaly - Not having too install all the things for a small fix (I get why'd you want this, but to me it's overkill)
-
pjaspers authored
The rather cryptic: "fk_#{Digest::SHA256.hexdigest("#{table}_#{column}_fk").first(10)}" Was too much for emacs too handle*, since it was coming from the Rails codebase I took their way of doing the same thing and applied it here. I think it's easier to read and it also makes emacs render the migration helpers pretty again. * not true, emacs can handle anything, leave emacs alone!
-
- 17 Jun, 2019 1 commit
-
-
Yorick Peterse authored
This is necessary for backporting the EE schema to ensure backported foreign keys use the same key names.
-
- 07 May, 2019 1 commit
-
-
Lin Jen-Shin authored
-
- 06 Apr, 2019 1 commit
-
-
Heinrich Lee Yu authored
This was incorrectly set by a bug in: https://gitlab.com/gitlab-org/gitlab-ce/issues/54924 Also adds a `batch_size` option to `update_column_in_batches`
-
- 14 Feb, 2019 1 commit
-
-
Felipe Artur authored
-
- 12 Feb, 2019 1 commit
-
-
Felipe Artur authored
-
- 11 Feb, 2019 1 commit
-
-
Felipe Artur authored
Patch 1 that migrates issues/merge requests states from integer to string. On this commit we are only adding the state_id column and syncing it with a backgroud migration. On Patch 2 the code to use the new integer column will be deployed and the old column will be removed.
-
- 16 Dec, 2018 1 commit
-
-
Jasper Maes authored
-
- 07 Dec, 2018 1 commit
-
-
Rubén Dávila authored
-
- 07 Nov, 2018 1 commit
-
-
gfyoung authored
Enables frozens string for the following: * lib/gitlab/conflict/**/*.rb * lib/gitlab/cross_project_access/**/*.rb * lib/gitlab/cycle_analytics/**/*.rb * lib/gitlab/data_builder/**/*.rb * lib/gitlab/database/**/*.rb * lib/gitlab/dependency_linker/**/*.rb * lib/gitlab/diff/**/*.rb * lib/gitlab/downtime_check/**/*.rb * lib/gitlab/email/**/*.rb * lib/gitlab/etag_caching/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
-
- 01 Nov, 2018 1 commit
-
-
George Tsiolis authored
-
- 21 Sep, 2018 1 commit
-
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- 13 Sep, 2018 1 commit
-
-
Ryan Hefner authored
-
- 11 Aug, 2018 1 commit
-
-
Gabriel Mazetto authored
it will decide the method for disable statement_timeout upon per transaction or per session, based on how it's called. When calling with a block, block will be executed and it will use session based statement_timeout, otherwise will default to existing behavior.
-
- 10 Aug, 2018 1 commit
-
-
Gabriel Mazetto authored
By default statement_timeout will only be enabled during transaction lifetime, therefore not leaking outside of it. With `transaction: false` it will set for entire session, but requires a block to passed. It yields control and cleans up session after block finishes, also preventing leaking outside of it.
-
- 06 Aug, 2018 1 commit
-
-
Yorick Peterse authored
This changes the BackgroundMigration worker so it checks for the health of the DB before performing a background migration. This in turn allows us to reduce the minimum interval, without having to worry about blowing things up if we schedule too many migrations. In this setup, the BackgroundMigration worker will reschedule jobs as long as the database is considered to be in an unhealthy state. Once the database has recovered, the migration can be performed. To determine if the database is in a healthy state, we look at the replication lag of any replication slots defined on the primary. If the lag is deemed to great (100 MB by default) for too many slots, the migration is rescheduled for a later point in time. The health checking code is hidden behind a feature flag, allowing us to disable it if necessary.
-
- 26 Jun, 2018 1 commit
-
-
Sean McGivern authored
This works the same way as change_column_type_using_background_migration, but for renaming a column. It takes a table, not a relation, to match its concurrent counterpart. Also, generalise the cleanup migrations to reduce code duplication.
-
- 29 Apr, 2018 1 commit
-
-
blackst0ne authored
In Arel 7.0.0 (Arel 7.1.4 is used in Rails 5.0) the `engine` parameter of `Arel::UpdateManager#initializer` was removed. This commit makes the gitlab database helpers work both in rails 4 and rails 5. Fixes errors like this one: ``` 1) Gitlab::Database::MigrationHelpers#update_column_in_batches when running outside of a transaction updates all the rows in a table Failure/Error: update_arel = Arel::UpdateManager.new(ActiveRecord::Base) .table(table) .set([[table[column], value]]) .where(table[:id].gteq(start_id)) ArgumentError: wrong number of arguments (given 1, expected 0) # ./lib/gitlab/database/migration_helpers.rb:317:in `new' # ./lib/gitlab/database/migration_helpers.rb:317:in `block in update_column_in_batches' # ./lib/gitlab/database/migration_helpers.rb:307:in `loop' # ./lib/gitlab/database/migration_helpers.rb:307:in `update_column_in_batches' # ./spec/lib/gitlab/database/migration_helpers_spec.rb:367:in `block (4 levels) in <top (required)>' ```
-
- 05 Apr, 2018 1 commit
-
-
Douwe Maan authored
[10.6] Prevent notes on confidential issues from being sent to chat See merge request gitlab/gitlabhq!2366 # Conflicts: # app/helpers/services_helper.rb
-
- 28 Mar, 2018 1 commit
-
-
Bob Van Landuyt authored
This will use the same query as `\di` to find an index on postgresql.
-
- 20 Mar, 2018 2 commits
-
-
Andreas Brandl authored
Closes #43887.
-
Andreas Brandl authored
Index creation does not have an effect if the index is present already. Index removal does not have an affect if the index is not present. This helps to avoid patterns like this in migrations: ``` if index_exists?(...) remove_concurrent_index(...) end ```
-
- 14 Mar, 2018 1 commit
-
-
Andreas Brandl authored
The concurrency issue originates from inserts on `user_interacted_projects` from the app while running the post-deploy migration. This change comes with a strategy to lock the table while removing duplicates and creating the unique index (and similar for FK constraints). Also, we'll have a non-unique index until the post-deploy migration is finished to speed up queries during that time. Closes #44205.
-
- 18 Jan, 2018 1 commit
-
-
Yorick Peterse authored
Prior to this commit we would essentially update all rows in a table, even those where the source column (e.g. `issues.closed_at`) was NULL. This in turn could lead to statement timeouts when using the default batch size of 10 000 rows per job. To work around this we don't schedule jobs for rows where the source value is NULL. We also don't update rows where the source column is NULL (as an extra precaution) or the target column already has a non-NULL value. Using this approach it should be possible to update 10 000 rows in the "issues" table in about 7.5 - 8 seconds. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/42158
-
- 11 Jan, 2018 1 commit
-
-
🙈 jacopo beschi 🙉 authored
-
- 05 Jan, 2018 1 commit
-
-
Yorick Peterse authored
This adds a minimum interval to BackgroundMigrationWorker, ensuring background migrations of the same class only run once every 5 minutes. This prevents a thundering herd problem where scheduled migrations all run at once due to their delays having been expired (e.g. as the result of a queue being paused for a long time). If a job was recently executed it's rescheduled with a delay that equals the remaining time of the job's lease. This means that if the lease expires in two minutes we only need to wait two minutes, instead of five. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/41624
-
- 03 Jan, 2018 1 commit
-
-
Yorick Peterse authored
In a previous attempt (rolled back in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16021) we tried to migrate `issues.closed_at` from timestamp to timestamptz using a regular migration. This has a bad impact on GitLab.com and as such was rolled back. This commit re-implements the original migrations using generic background migrations, allowing us to still migrate the data in a single release but without a negative impact on availability. To ensure the database schema is up to date the background migrations are performed inline in development and test environments. We also make sure to not migrate that that doesn't need migrating in the first place or has already been migrated.
-
- 05 Dec, 2017 1 commit
-
-
Douwe Maan authored
-
- 17 Nov, 2017 1 commit
-
-
Sean McGivern authored
-
- 14 Sep, 2017 2 commits
-
-
Michael Kozono authored
-
Michael Kozono authored
-
- 29 Aug, 2017 1 commit
-
-
Yorick Peterse authored
This adds a bunch of checks to migrations that may create or drop triggers. Dropping triggers/functions is done using "IF EXISTS" so we don't throw an error if the object in question has already been dropped. We now also raise a custom error (message) when the user does not have TRIGGER privileges. This should prevent the schema from entering an inconsistent state while also providing the user with enough information on how to solve the problem. The recommendation of using SUPERUSER permissions is a bit extreme but we require this anyway (Omnibus also configures users with this permission). Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36633
-
- 23 Aug, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 22 Aug, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 20 Aug, 2017 1 commit
-
-
Stan Hu authored
Due to a missing `on_delete: :cascade`, users would hit the error that looked like: ``` PG::ForeignKeyViolation: ERROR: update or delete on table "protected_tags" violates foreign key constraint "fk_rails_f7dfda8c51" on table "protected_tag_create_access_levels" DETAIL: Key (id)=(1385) is still referenced from table "protected_tag_create_access_levels". : DELETE FROM "protected_tags" WHERE "protected_tags"."id" = 1385 ``` Closes #36013
-
- 18 Jul, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 07 Jul, 2017 1 commit
-
-
Grzegorz Bizon authored
-