summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'zj-fork-opt-out' into 'master'Douwe Maan2018-05-031-1/+2
|\ | | | | | | | | Forking repositories is handled by Gitaly by default See merge request gitlab-org/gitlab-ce!18679
| * Forking repositories is handled by Gitaly by defaultZeger-Jan van de Weg2018-05-021-1/+2
| | | | | | | | | | | | | | | | | | Initial Rails implementation was introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16018, and acceptance testing was done in https://gitlab.com/gitlab-org/gitaly/issues/881 Part of https://gitlab.com/gitlab-org/gitaly/issues/817
* | Merge branch 'zj-repo-checksum-opt-out' into 'master'Robert Speicher2018-05-021-1/+2
|\ \ | | | | | | | | | | | | | | | | | | Compute repository checksum by default Closes gitaly#1146 See merge request gitlab-org/gitlab-ce!18648
| * | Compute repository checksum by defaultZeger-Jan van de Weg2018-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acceptance testing was done in: https://gitlab.com/gitlab-org/gitaly/issues/1146. Errors were limited to NotFound errors, as the repository really doesn't exists. Closes https://gitlab.com/gitlab-org/gitaly/issues/1146 Optimistically moved https://gitlab.com/gitlab-org/gitaly/issues/1105 to opt out on the Gitaly migration board.
* | | Optimize Emoji Sprite HandlingTim Zallmann2018-05-021-0/+1
| | |
* | | Remove old GitLab Shell implementationZeger-Jan van de Weg2018-05-021-40/+4
| | | | | | | | | | | | Moves the calls to Gitaly, no matter what the feature flag values are.
* | | Display and revoke active sessionsAlexis Reigel ( 🌴 may 2nd - may 9th 🌴 )2018-05-021-0/+2
| | |
* | | Merge branch 'blackst0ne-rails5-fix-arel-update-manager' into 'master'Rémy Coutable2018-05-023-5/+27
|\ \ \ | | | | | | | | | | | | | | | | [Rails5] Fix Arel::UpdateManager See merge request gitlab-org/gitlab-ce!18641
| * | | [Rails5] Fix Arel::UpdateManagerblackst0ne2018-04-293-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)>' ```
* | | | Merge branch 'blackst0ne-rails5-fix-tzinfo-invalid-timezone-identifier' into ↵Rémy Coutable2018-05-021-1/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' [Rails5] Fix `TZInfo::InvalidTimezoneIdentifier` exception See merge request gitlab-org/gitlab-ce!18640
| * | | | [Rails5] Fix TZInfo::InvalidTimezoneIdentifier exceptionblackst0ne2018-04-291-1/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 4.2.10 the `ActiveSupport::TimeZone.find_tzinfo(timezone_name)` method calls `TZInfo::TimezoneProxy.new(timezone_name)` which returns `timezone_name` if it is invalid. But in Rails 5.0 the `ActiveSupport::TimeZone.find_tzinfo(timezone_name)` method now calls the `TZInfo::Timezone.new(timezone_name)` method which throws the `TZInfo::InvalidTimezoneIdentifier: Invalid identifier` exception if `timezone_name` is invalid. This commit adds the rescue block to return timezone name if the exception is raised. Also this change fixes the error: ``` 1) Ci::PipelineSchedule validations does not allow invalid cron patters Failure/Error: ActiveSupport::TimeZone.find_tzinfo(timezone).name TZInfo::InvalidTimezoneIdentifier: Invalid identifier # ./lib/gitlab/ci/cron_parser.rb:28:in `timezone_name' # ./lib/gitlab/ci/cron_parser.rb:9:in `initialize' # ./app/validators/cron_validator.rb:6:in `new' # ./app/validators/cron_validator.rb:6:in `validate_each' # ./spec/models/ci/pipeline_schedule_spec.rb:26:in `block (3 levels) in <top (required)>' ```
* | | | Merge branch 'backstage/gb/migrate-pipeline-stages-index' into 'master'Kamil Trzciński2018-05-022-0/+48
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate pipeline stages indices Closes #43009 See merge request gitlab-org/gitlab-ce!18420
| * | | | Use stages position column to track stage indexGrzegorz Bizon2018-05-012-5/+5
| | | | |
| * | | | Merge branch 'master' into backstage/gb/migrate-pipeline-stages-indexGrzegorz Bizon2018-05-0118-77/+285
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | * master: (106 commits)
| * | | | Merge branch 'master' into 'backstage/gb/migrate-pipeline-stages-index'Grzegorz Bizon2018-04-2515-136/+126
| |\ \ \ \ | | | | | | | | | | | | | | | | | | # Conflicts: # db/schema.rb
| * | | | | Rename stage index column name to priority columnGrzegorz Bizon2018-04-242-5/+5
| | | | | |
| * | | | | Improve stages index migration code readabilityGrzegorz Bizon2018-04-241-10/+10
| | | | | |
| * | | | | Improve performance of stages index migration on PostgreSQLGrzegorz Bizon2018-04-241-9/+28
| | | | | |
| * | | | | Make stages index background migration more idempotentGrzegorz Bizon2018-04-241-0/+1
| | | | | |
| * | | | | Add background migration that migrates stages indicesGrzegorz Bizon2018-04-241-0/+27
| | | | | |
| * | | | | Validate presence of a stage index in the modelGrzegorz Bizon2018-04-241-0/+1
| | | | | |
* | | | | | Merge branch 'dm-commit-trailer-without-gravatar' into 'master'Robert Speicher2018-05-011-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix commit trailer rendering when Gravatar is disabled Closes #45633 See merge request gitlab-org/gitlab-ce!18586
| * | | | | | Fix commit trailer rendering when Gravatar is disabledDouwe Maan2018-04-251-1/+0
| | | | | | |
* | | | | | | Merge branch 'osw-use-cached-highlighted-content-for-discussions' into 'master'Douwe Maan2018-05-011-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use persisted diff data instead fetching Git on discussions Closes #44052 See merge request gitlab-org/gitlab-ce!18657
| * | | | | | | Use persisted diff data instead fetching Git on discussionsOswaldo Ferreira2018-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today, when fetching diffs of a note, we always go to Gitaly in order to diff between commits and return the diff of each discussion note. With this change we avoid doing that for notes on the "current version" of the MR.
* | | | | | | | Merge branch 'helm-add-alpine-mirrors' into 'master'Kamil Trzciński2018-05-011-0/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add alpine mirrors while operating on k8s cluster Closes gitlab-ee#4922 See merge request gitlab-org/gitlab-ce!18651
| * | | | | | | | Add alpine mirrors while operating on k8s clusterAlessio Caiazza2018-04-301-0/+3
| | |_|_|_|_|_|/ | |/| | | | | |
* | | | | | | | Merge request and commit discussions APIJan Provaznik2018-05-016-49/+152
| |_|_|_|_|/ / |/| | | | | |
* | | | | | | Merge branch 'zj-fix-index-rails' into 'master'Douwe Maan2018-05-011-1/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Ruby methods, not Rails' String#first See merge request gitlab-org/gitlab-ce!18669
| * | | | | | | Use Ruby methods, not Rails' String#firstZeger-Jan van de Weg2018-05-011-1/+3
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gitaly-Ruby is not a Rails application, which made the method not exist after the vendor. This patch uses direct indexing, which has the same properties that `#first` has. Found while working on: https://gitlab.com/gitlab-org/gitaly/merge_requests/699
* | | | | | | show only groups an admin is a member of in dashboards/gropsRoger Rüttimann2018-05-012-9/+10
| | | | | | |
* | | | | | | Merge branch 'security-45689-fix-archive-cache-bug' into 'security-10-7'Douwe Maan2018-04-301-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Serve archive requests with the correct file in all cases (10.7) See merge request gitlab/gitlabhq!2376
* | | | | | | Merge branch 'bvl-fix-openid-redirect' into 'master'Douwe Maan2018-04-301-0/+8
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip `authenticate_user!` for Doorkeeper controllers Closes #44639 See merge request gitlab-org/gitlab-ce!18599
| * | | | | | Define custom base controller for DoorkeeperBob Van Landuyt2018-04-301-0/+8
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we only need the `can?` view helpers there, it's better to include those in a separate controller. If we inherit from `ApplicationController` we also need to deal with authentication, that needs to be done in some, but not all doorkeeper controllers.
* | | | | | Merge branch 'rebase-in-progress-fast-timeout' into 'master'Douwe Maan2018-04-301-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use fast timeouts for Gitaly FooInProgress RPC's See merge request gitlab-org/gitlab-ce!18655
| * | | | | | Use fast timeouts for Gitaly FooInProgress RPC'sJacob Vosmaer2018-04-301-2/+2
| | | | | | |
* | | | | | | Merge branch 'zj-remove-repo-path-remote-repository' into 'master'Douwe Maan2018-04-302-2/+7
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | Remove legacy storage path call See merge request gitlab-org/gitlab-ce!18598
| * | | | | | Remove legacy storage path callZeger-Jan van de Weg2018-04-302-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storage shards should only be used, the exact paths are the responsibilty of Gitaly. This will create deprecation warning, and in this instance the path is initialized, but never used so it could be removed.
* | | | | | | Merge branch 'add-jwt-strategy-to-gitlab-suite' into 'master'Douwe Maan2018-04-301-0/+62
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | Ports omniauth-jwt gem onto GitLab OmniAuth Strategies suite See merge request gitlab-org/gitlab-ce!18580
| * | | | | | Ports omniauth-jwt gem onto GitLab OmniAuth Strategies suiteTiago Botelho2018-04-261-0/+62
| | | | | | |
* | | | | | | Merge branch 'jramsay-44880-filter-pipelines-by-sha' into 'master'Kamil Trzciński2018-04-291-0/+1
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add sha filter to list pipelines Closes #44880 See merge request gitlab-org/gitlab-ce!18125
| * | | | | | Add sha filter to list pipelinesJames Ramsay2018-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To find the pipeline for a specific sha requires scanning the list of all pipelines for a ref that contains the sha. This makes it hard to find the pipeline id needed to access a trace for a specific job run in the pipeline using the API.
* | | | | | | Merge branch 'zj-repository-exist-mandatory' into 'master'Nick Thomas2018-04-271-9/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository#exists? can only be queried with Gitaly Closes gitaly#314 See merge request gitlab-org/gitlab-ce!18567
| * | | | | | | Repository#exists? can only be queried with GitalyZeger-Jan van de Weg2018-04-251-9/+1
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has been in opt out for 5 months, and within GitLab been in production for longer than that. No code needs to be migrated as this is implemented in GoLang over at Gitaly. Closes https://gitlab.com/gitlab-org/gitaly/issues/314
* | | | | | | Add gitlab-pages admin ping rake taskJacob Vosmaer (GitLab)2018-04-272-0/+126
| |/ / / / / |/| | | | |
* | | | | | Merge branch 'performance/gb/improve-pipeline-creation-service' into 'master'Kamil Trzciński2018-04-261-5/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve pipeline creation service performance Closes #37987 See merge request gitlab-org/gitlab-ce!18582
| * | | | | Do not save associated records for pipeline builds twiceGrzegorz Bizon2018-04-251-5/+1
| | |/ / / | |/| | |
* | | | | Merge branch 'zj-storage-path-deprecation' into 'master'Douwe Maan2018-04-256-34/+28
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | Legacy disk path refactor Closes gitaly#1111 See merge request gitlab-org/gitlab-ce!18364
| * | | | Gitlab::Shell works on shard name, not pathZeger-Jan van de Weg2018-04-256-34/+28
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
* | | | Cleanup after adding MR diff's commit_count (try 2)Jan Provaznik2018-04-251-1/+1
| |/ / |/| | | | | | | | | | | | | | * processes any pending records which are not migrated yet * bumps import_export version because of new commits_count attribute * removes commits_count fallback method