- 12 8月, 2016 2 次提交
-
-
由 Z.J. van de Weg 提交于
-
由 Stan Hu 提交于
There is a race condition in DestroyGroupService now that projects are deleted asynchronously: 1. User attempts to delete group 2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project 3. DestroyGroupService destroys the Group, leaving all its projects without a namespace 4. Projects::DestroyService runs later but the can?(current_user, :remove_project) is `false` because the user no longer has permission to destroy projects with no namespace. 5. This leaves the project in pending_delete state with no namespace/group. Projects without a namespace or group also adds another problem: it's not possible to destroy the container registry tags, since container_registry_path_with_namespace is the wrong value. The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService. Closes #17893
-
- 11 8月, 2016 2 次提交
-
-
由 Kamil Trzcinski 提交于
This change simplifies a Pipeline processing by introducing a special new status: created. This status is used for all builds that are created for a pipeline. We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped). This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled. This also allows us to visualise a full pipeline (with created builds). This also removes an after_touch used for updating a pipeline state parameters. Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
-
由 Yorick Peterse 提交于
One can see which indexes are used in PostgreSQL by running the following query: SELECT relname as table_name, indexrelname as index_name, idx_scan, idx_tup_read, idx_tup_fetch, pg_size_pretty(pg_relation_size(indexrelname::regclass)) FROM pg_stat_all_indexes WHERE schemaname = 'public' AND "idx_scan" = 0 ORDER BY pg_relation_size(indexrelname::regclass) desc; Using this query I built a list of indexes that could be potentially removed. After checking every single one by hand to make sure they really aren't used I only found 1 index that _would_ be used. This was a GitLab GEO index (EE) specific that's currently not used simply because the table is empty. Apart from this one index all indexes could be removed. The migration also takes care of 6 composite indexes that can be replaced with a single column index, which in most cases was already present. For more information see gitlab-org/gitlab-ce#20767.
-
- 10 8月, 2016 1 次提交
-
-
由 Yorick Peterse 提交于
These indexes are only used when you search for runners in the admin interface. This operation is so rarely used that it does not make sense to slow down every update in order to update the GIN trigram indexes. Removing these indexes should speed up queries such as those used for updating the last contact time of CI runners. Locally the timings of this query were reduced from ~50 ms to ~25 ms: UPDATE ci_runners SET updated_at = now(), contacted_at = now();
-
- 05 8月, 2016 1 次提交
-
-
由 Nick Thomas 提交于
-
- 04 8月, 2016 5 次提交
-
-
由 Nick Thomas 提交于
-
由 Timothy Andrew 提交于
- The migrations called `add_column_with_default` with a `null` option, which the Rails `add_column` method accepts. This fails because `add_column_with_default` expects an `allow_null` option instead. - The migrations have been fixed to use `allow_null`.
-
由 Timothy Andrew 提交于
- In the final round of review (!5081), we moved the protected branch access levels from Rails enums to constants from Gitlab::Access. - The migrations that moved us from the old data model (a single protected_branches table with developers_can_push and developers_can_merge flags) to the new one (separate tables for push_access_levels and merge_access_levels) was not updated. - These migrations still used 0 to mean "Masters" and 1 to mean "Developers" (matching the previous Rails enum), while Gitlab::Access uses 40 and 30 for these, respectively. - Once the migrations run, our data gets into a broken state. - We fix this by migrating all `0`s to `40` and all `1`s to `30`. - https://gitlab.com/gitlab-org/gitlab-ce/issues/20606#note_13561628 = Caveats = - In Gitlab::Access, 0 represents NO_ACCESS. When we run this migration, all protected branches with "No one" as an access level will be changed to "Masters"
-
由 Alejandro Rodríguez 提交于
-
由 Z.J. van de Weg 提交于
-
- 29 7月, 2016 8 次提交
-
-
由 Z.J. van de Weg 提交于
-
由 Z.J. van de Weg 提交于
This MR adds a string (thus max 255 chars) field to the enviroments table to expose it later in other features.
-
由 Timothy Andrew 提交于
1. Instantiate `ProtectedBranchesAccessSelect` from `dispatcher` 2. Use `can?(user, ...)` instead of `user.can?(...)` 3. Add `DOWNTIME` notes to all migrations added in !5081. 4. Add an explicit `down` method for migrations removing the `developers_can_push` and `developers_can_merge` columns, ensuring that the columns created (on rollback) have the appropriate defaults. 5. Remove duplicate CHANGELOG entries. 6. Blank lines after guard clauses.
-
由 Timothy Andrew 提交于
1. It makes sense to reuse these constants since we had them duplicated in the previous enum implementation. This also simplifies our `check_access` implementation, because we can use `project.team.max_member_access` directly. 2. Use `accepts_nested_attributes_for` to create push/merge access levels. This was a bit fiddly to set up, but this simplifies our code by quite a large amount. We can even get rid of `ProtectedBranches::BaseService`. 3. Move API handling back into the API (previously in `ProtectedBranches::BaseService#translate_api_params`. 4. The protected branch services now return a `ProtectedBranch` rather than `true/false`. 5. Run `load_protected_branches` on-demand in the `create` action, to prevent it being called unneccessarily. 6. "Masters" is pre-selected as the default option for "Allowed to Push" and "Allowed to Merge". 7. These changes were based on a review from @rymai in !5081.
-
由 Timothy Andrew 提交于
1. Remove `master_or_greater?` and `developer_or_greater?` in favor of `max_member_access`, which is a lot nicer. 2. Remove a number of instances of `include Gitlab::Database::MigrationHelpers` in migrations that don't need this module. Also remove comments where not necessary. 3. Remove duplicate entry in CHANGELOG. 4. Move `ProtectedBranchAccessSelect` from Coffeescript to ES6. 5. Split the `set_access_levels!` method in two - one each for `merge` and `push` access levels.
-
由 Timothy Andrew 提交于
-
由 Timothy Andrew 提交于
1. Remove the `developers_can_push` and `developers_can_merge` boolean columns. 2. Add two new tables, `protected_branches_push_access`, and `protected_branches_merge_access`. Each row of these 'access' tables is linked to a protected branch, and uses a `access_level` column to figure out settings for the protected branch. 3. The `access_level` column is intended to be used with rails' `enum`, with `:masters` at index 0 and `:developers` at index 1. 4. Doing it this way has a few advantages: - Cleaner path to planned EE features where a protected branch is accessible only by certain users or groups. - Rails' `enum` doesn't allow a declaration like this due to the duplicates. This approach doesn't have this problem. enum can_be_pushed_by: [:masters, :developers] enum can_be_merged_by: [:masters, :developers]
-
由 Z.J. van de Weg 提交于
[ci skip]
-
- 27 7月, 2016 1 次提交
-
-
由 Stan Hu 提交于
-
- 24 7月, 2016 1 次提交
-
-
由 Douwe Maan 提交于
Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page
-
- 21 7月, 2016 3 次提交
-
-
由 Yorick Peterse 提交于
Dropping a column and then re-adding it can lead to the application throwing errors as the column may temporarily not exist. To work around this we'll reset the various project rows in batches _without_ removing any columns.
-
由 Rémy Coutable 提交于
Signed-off-by: NRémy Coutable <remy@rymai.me>
-
由 Rémy Coutable 提交于
Signed-off-by: NRémy Coutable <remy@rymai.me>
-
- 20 7月, 2016 5 次提交
-
-
由 Felipe Artur 提交于
-
由 tiagonbotelho 提交于
-
由 James Lopez 提交于
-
由 tiagonbotelho 提交于
same time and writes tests accordingly changes schema.db removes duplicate field inside CHANGELOG fix db/schema
-
由 tiagonbotelho 提交于
-
- 19 7月, 2016 4 次提交
-
-
由 Eugene Howe 提交于
* This method previously iterated over all services in a project. Now it will directly query the ExternalWikiService for the project and filter by active state. * The presence of an external wiki is also cached * When an external wiki is added or removed, the cached value is updated
-
由 Patricio Cano 提交于
Refactor and rename `restricted_signup_domains` to `domain_whitelist` to better conform to its behavior and newly introduced behavior.
-
由 Patricio Cano 提交于
-
由 Kamil Trzcinski 提交于
-
- 18 7月, 2016 4 次提交
-
-
由 Timothy Andrew 提交于
- This was introduced (at some point) while rebasing `master` against the "developers can merge" feature branch. - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5310#note_13139705
-
由 Kamil Trzcinski 提交于
-
由 Kamil Trzcinski 提交于
-
由 Rémy Coutable 提交于
This reverts commit 530f5158. See !4892. Signed-off-by: NRémy Coutable <remy@rymai.me>
-
- 17 7月, 2016 3 次提交
-
-
由 Kamil Trzcinski 提交于
-
由 Kamil Trzcinski 提交于
-
由 Kamil Trzcinski 提交于
-