summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fix-relative-root-emoji-support' into 'master' Stan Hu2016-07-011-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix emoji paths in relative root configurations ## What does this MR do? If a site specifies a relative URL root, emoji files would omit the path from the URL, leading to lots of 404s. ## Are there points in the code the reviewer needs to double check? At first, I tried to use `ActionView::Helpers::AssetUrlHelper.asset_url` since this is what it's intended to do. But this helper function is extremely slow, and it took minutes to generate the URLs for the hundreds of links needed for each emoji. ## Why was this MR needed? Because emojis were broken in relative URL installations ## What are the relevant issue numbers? #15642 ## Does this MR meet the acceptance criteria? - [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [X] Added for this feature/bug - [x] All builds are passing - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [X] Branch has no merge conflicts with `master` (if you do - rebase it please) - [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5027
| * Fix emoji paths in relative root configurationsStan Hu2016-07-011-0/+15
| | | | | | | | | | | | | | If a site specifies a relative URL root, emoji files would omit the path from the URL, leading to lots of 404s. Closes #15642
* | use has_many relationship with eventsJames Lopez2016-07-011-0/+6
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-07-016-6/+84
|\ \ | |/ | | | | fix/import-export-events
| * Import from Github using Personal Access Tokens.Eric K Idema2016-06-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This stands as an alternative to using OAuth to access a user's Github repositories. This is setup in such a way that it can be used without OAuth configuration. From a UI perspective, the how to import modal has been replaced by a full page, which includes a form for posting a personal access token back to the Import::GithubController. If the user has logged in via GitHub, skip the Personal Access Token and go directly to Github for an access token via OAuth.
| * Merge branch 'rubocop/enable-unneeded-capital-w-cop' into 'master' Robert Speicher2016-06-301-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/UnneededCapitalW Rubocop cop ## What does this MR do? This MR enables Rubocop cop that checks if `%W[]`, which supports interpolation, is needed. ## What are the relevant issue numbers? #17478 See merge request !5010
| | * Enable Style/UnneededCapitalW Rubocop coprubocop/enable-unneeded-capital-w-copGrzegorz Bizon2016-06-301-3/+3
| | |
| * | Create (if necessary) and link the gitlab-shell secret file on the rake ↵shardsAlejandro Rodríguez2016-06-291-0/+23
| | | | | | | | | | | | install task
| * | Refactor repository paths handling to allow multiple git mount pointsAlejandro Rodríguez2016-06-291-0/+5
| |/
| * Handle case when Redis cache returns an empty settingStan Hu2016-06-291-2/+9
| |
| * Fix database migrations when Redis is not runningStan Hu2016-06-291-0/+29
| | | | | | | | | | | | | | | | | | | | If Redis were not running or USE_DB were set to false, the application settings retrieval would fail completely. This change only attempts to use the cache if the system actually wants to connect to the DB and rescues any failures in talking to Redis. Closes #17557
| * Enable Style/SpaceAfterComma Rubocop coprubocop/enable-space-after-copsGrzegorz Bizon2016-06-291-2/+2
| |
| * Enable Style/SpaceAfterColon Rubocop copsGrzegorz Bizon2016-06-291-1/+1
| |
* | fixes and refactored JSON specJames Lopez2016-06-291-2022/+4040
| |
* | fixing events for import/exportJames Lopez2016-06-291-2/+5
|/
* Use clock_gettime for all performance timestampsperformance-clock-adjustmentsYorick Peterse2016-06-281-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Process.clock_gettime allows getting the real time in nanoseconds as well as allowing one to get a monotonic timestamp. This offers greater accuracy without the overhead of having to allocate a Time instance. In general using Time.now/Time.new is about 2x slower than using Process.clock_gettime(). For example: require 'benchmark/ips' Benchmark.ips do |bench| bench.report 'Time.now' do Time.now.to_f end bench.report 'clock_gettime' do Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) end bench.compare! end Running this benchmark gives: Calculating ------------------------------------- Time.now 108.052k i/100ms clock_gettime 125.984k i/100ms ------------------------------------------------- Time.now 2.343M (± 7.1%) i/s - 11.670M clock_gettime 4.979M (± 0.8%) i/s - 24.945M Comparison: clock_gettime: 4979393.8 i/s Time.now: 2342986.8 i/s - 2.13x slower Another benefit of using Process.clock_gettime() is that we can simplify the code a bit since it can give timestamps in nanoseconds out of the box.
* support cgi style options, such as erb?parent=jsonhttp://jneen.net/2016-06-271-3/+14
|
* appease rubocophttp://jneen.net/2016-06-271-2/+2
|
* check the tag so that an instance will pass toohttp://jneen.net/2016-06-271-1/+1
|
* fix the spec, using project.change_headhttp://jneen.net/2016-06-271-3/+9
|
* add custom highlighting via .gitattributeshttp://jneen.net/2016-06-271-0/+10
| | | | paired with @stanhu
* Merge branch 'refactor/ci-config-add-entry-error' into 'master' Rémy Coutable2016-06-277-18/+157
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve validations and error handling in new CI config entries ## What does this MR do? This MR improves validation in new CI config. ## Why was this MR needed? With that it will be easier to handle errors during validation and post-processing. ## What are the relevant issue numbers? This is a continuation of #15060 See merge request !4560
| * Merge branch 'master' into refactor/ci-config-add-entry-errorrefactor/ci-config-add-entry-errorGrzegorz Bizon2016-06-2012-7/+5845
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (345 commits) use rails root join fixed a couple of errors spotted in production Fix RangeError exceptions when referring to issues or merge requests outside of max database values Fix bug in `WikiLinkFilter`. Small frontend code fixes and restore 8a2d88f commit Warn about admin privilege to disable GitHub Webhooks Listing GH Webhooks doesn't stop import process for non GH admin users fixup! updated docs for api endpoint award emoji Update CHANGELOG Ensure Todos counters doesn't count Todos for projects pending delete Add endpoints for award emoji on notes Sort API endpoints and implement feedback Add endpoints for Award Emoji Fixed issue with assignee dropdown not selecting correctly Removed update method Re-structured controller spec Renamed issuable param to issuable_id Fix clibpoard buttons on "Check out branch" modal. Track method call times/counts as a single metric Cache todo counters (pending/done) Fix a 'wrong number of arguments' error Added missing mount point for Sidekiq Metrics API, after it got lost on rebase. ...
| * | Extract CI entry config hash validation to validatorGrzegorz Bizon2016-06-171-0/+0
| | |
| * | Merge branch 'master' into refactor/ci-config-add-entry-errorGrzegorz Bizon2016-06-171-1/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (189 commits) Update CHANGELOG for !4659 Center the header logo for all Devise emails Add previews for all customized Devise emails Customize the Devise `unlock_instructions` email Customize the Devise `reset_password_instructions` email Customize the Devise `password_change` emails Use gitlab-git 10.2.0 Use Git cached counters on project show page Fix indentation scss-lint errors Added title attribute to enties in tree view Closes #18353 Banzai::Filter::ExternalLinkFilter use XPath Reduce queries in IssueReferenceFilter Use gitlab_git 10.1.4 Fixed ordering in Project.find_with_namespace Fix images in emails Banzai::Filter::UploadLinkFilter use XPath Turn Group#owners into a has_many association Make project_id nullable ...
| * | | Add first custom validator for new ci configGrzegorz Bizon2016-06-171-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows a standard `ActiveModel` pattern of creating a custom validators. We use `ActiveModel::EachValidator` here that reuses methods provided by `LegacyValidationHelpers`. We will remove `LegacyValidationHelpers` on some point in the future, at the later stages of CI configuration refactoring. It may be possible to rewrite custom validators to use format like: `validates :config, array_of: String`
| * | | Improve CI config entries validations prototypeGrzegorz Bizon2016-06-174-11/+127
| | | |
| * | | Add prototype of CI config node validatorGrzegorz Bizon2016-06-164-31/+9
| | | | | | | | | | | | | | | | | | | | This makes use of `ActiveModel::Validations` encapsulated in a separate class that is accessible from a node object.
| * | | Add class that encapsulates error in new Ci configGrzegorz Bizon2016-06-155-2/+47
| | | |
* | | | Merge branch 'fix/import-export-gitlab-errors' into 'master' Rémy Coutable2016-06-232-0/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix errors found on importing GitLab CE repo Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18968 See merge request !4855
| * | | | fixed pipeline notes issueJames Lopez2016-06-232-0/+29
| | | | |
* | | | | Add Sidekiq queue duration to transaction metrics.Paco Guzman2016-06-231-1/+16
|/ / / /
* | | | Merge branch 'fix_saml_signin' into 'master' Robert Speicher2016-06-221-1/+17
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix subsequent SAML sign ins Fixes a bug when `auto_link_ldap_user` is `true` that causes SAML users to be unable to sign in a second time. Fix the problem for https://gitlab.zendesk.com/agent/tickets/22546 See merge request !4718
| * | | | Fix subsequent SAML sign insDrew Blessing2016-06-221-1/+17
| | |_|/ | |/| |
* | | | Merge branch 'ci-lfs-fetch' into 'master' Rémy Coutable2016-06-211-298/+263
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to fetch LFS from CI ## What does this MR do? This adds support for fetching LFS object from CI jobs (mostly it's made for supporting GitLab CI). ## What is left? - [x] Write tests covering a new authorization mechanism cc @grzesiek @marin See merge request !4465
| * | | | Add test coverage to LFS fetchingci-lfs-fetchKamil Trzcinski2016-06-211-289/+240
| | | | |
| * | | | Merge remote-tracking branch 'origin/master' into ci-lfs-fetchKamil Trzcinski2016-06-2124-38/+6389
| |\ \ \ \ | | |/ / /
| * | | | Merge remote-tracking branch 'origin/master' into ci-lfs-fetchKamil Trzcinski2016-06-1015-228/+314
| |\ \ \ \
| * | | | | WIPKamil Trzcinski2016-06-031-11/+25
| | | | | |
* | | | | | Refactor Gitlab::GitignoresZJ van de Weg2016-06-201-3/+3
| |_|/ / / |/| | | |
* | | | | Track method call times/counts as a single metricYorick Peterse2016-06-173-6/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we'd create a separate Metric instance for every method call that would exceed the method call threshold. This is problematic because it doesn't provide us with information to accurately get the _total_ execution time of a particular method. For example, if the method "Foo#bar" was called 4 times with a runtime of ~10 milliseconds we'd end up with 4 different Metric instances. If we were to then get the average/95th percentile/etc of the timings this would be roughly 10 milliseconds. However, the _actual_ total time spent in this method would be around 40 milliseconds. To solve this problem we now create a single Metric instance per method. This Metric instance contains the _total_ real/CPU time and the call count for every instrumented method.
* | | | | Merge branch 'secure-request-uris' into 'master' Yorick Peterse2016-06-171-0/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Filter out sensitive parameters of metrics data See merge request !4748
| * | | | | Filter out sensitive parameters of metrics dataPaco Guzman2016-06-171-0/+16
| | | | | |
* | | | | | Merge branch 'update-column-in-batches-where' into 'master' Robert Speicher2016-06-171-1/+13
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow customising of queries used for `update_column_in_batches` This MR makes two changes to `add_column_with_default` and `update_column_in_batches`: 1. `add_column_with_default` no longer wraps the entire set of updates in a single transaction, preventing any locks from sticking around for the duration of the entire transaction 2. `update_column_in_batches` now takes a block which can be used to customise the queries. This uses Arel as messing with raw SQL strings is a total pain In !4381 there's a need for updating existing rows/columns in a table in batches using a custom `WHERE` condition. Without the changes in this MR this would not be possible. See merge request !4680
| * | | | | Don't update columns in batches in a transactionYorick Peterse2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that whatever locks are acquired aren't held onto until the end of the transaction (= after _all_ rows have been updated). Timing wise there's also no difference between using a transaction and not using one.
| * | | | | Customizing of update_column_in_batches queriesYorick Peterse2016-06-151-0/+12
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | By passing a block to update_column_in_batches() one can now customize the queries executed. This in turn can be used to only update a specific set of rows instead of simply all the rows in the table.
* | | | | Merge branch 'feature/project-export' into 'master' Douwe Maan2016-06-177-0/+5705
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export project functionality This is a MR for the export functionality of https://gitlab.com/gitlab-org/gitlab-ce/issues/3050, which adds the ability to export single projects. - [x] members - DB data - [x] issues - [x] issue comments - [x] merge requests - [x] merge request diff - [x] merge request comments - [x] labels - [x] milestones - [x] snippets - [x] releases - [x] events - [x] commit statuses - [x] CI builds - File system data - [x] Git repository - [x] wiki - [x] uploads - [ ] ~~CI build traces~~ - [ ] ~~CI build artifacts~~ - [ ] ~~LFS objects~~ - DB configuration - [x] services - [x] web hooks - [x] protected branches - [x] deploy keys - [x] CI variables - [x] CI triggers See merge request !3114
| * | | | fixed merge conflicts on UI branchJames Lopez2016-06-1613-32/+450
| |\ \ \ \
| | * \ \ \ fixed merge conflictsJames Lopez2016-06-1613-32/+450
| | |\ \ \ \
| | | * \ \ \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵feature/project-exportJames Lopez2016-06-1613-32/+450
| | | |\ \ \ \ | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature/project-export # Conflicts: # app/models/ci/pipeline.rb