summaryrefslogtreecommitdiff
path: root/spec/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add support for parent directories in `StringPath`Grzegorz Bizon2016-01-141-4/+14
| | | | | | | | | | This support is not completed though, as parent directory that is first in collection returned by `directories!` is not iterable yet.
| * Add support for root path for `StringPath`Grzegorz Bizon2016-01-141-1/+23
| |
| * Add implementation of remaining methods in `StringPath`Grzegorz Bizon2016-01-141-10/+43
| |
| * Improve `StringPath` specs (DRY)Grzegorz Bizon2016-01-141-10/+19
| |
| * Add `parent` iteration implementation to `StringPath`Grzegorz Bizon2016-01-141-1/+10
| |
| * Add new methods to StringPathGrzegorz Bizon2016-01-141-1/+32
| |
| * Add implementation of StringPath classGrzegorz Bizon2016-01-141-0/+21
| | | | | | | | | | | | | | `StringPath` class is something similar to Ruby's `Pathname` class, but does not involve any IO operations. `StringPath` objects require passing string representation of path, and array of paths that represents universe to constructor to be intantiated.
| * Merge branch 'feature/ldap-sync-edgecases' into 'master' Douwe Maan2016-01-141-21/+14
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LDAP Sync blocked user edgecases Allow GitLab admins to block otherwise valid GitLab LDAP users (https://gitlab.com/gitlab-org/gitlab-ce/issues/3462) Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other. Expected behavior: - [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?` - [x] "ldap_blocked" users can't be unblocked by the Admin UI - [x] "ldap_blocked" users can't be unblocked by the API - [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked" - [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization - [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked` Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users: ![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png) There will be another MR for the EE version. See merge request !2242
| | * fixed LDAP activation on login to use new ldap_blocked statefeature/ldap-sync-edgecasesGabriel Mazetto2016-01-141-3/+2
| | |
| | * LDAP synchronization block/unblock new statesGabriel Mazetto2016-01-081-20/+14
| | |
| * | Randomize metrics sample intervalsconfigure-randomize-metrics-sample-intervalYorick Peterse2016-01-131-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sampling data at a fixed interval means we can potentially miss data from events occurring between sampling intervals. For example, say we sample data every 15 seconds but Unicorn workers get killed after 10 seconds. In this particular case it's possible to miss interesting data as the sampler will never get to actually submitting data. To work around this (at least for the most part) the sampling interval is randomized as following: 1. Take the user specified sampling interval (15 seconds by default) 2. Divide it by 2 (referred to as "half" below) 3. Generate a range (using a step of 0.1) from -"half" to "half" 4. Every time the sampler goes to sleep we'll grab the user provided interval and add a randomly chosen "adjustment" to it while making sure we don't pick the same value twice in a row. For a specified timeout of 15 this means the actual intervals can be anywhere between 7.5 and 22.5, but never can the same interval be used twice in a row. The rationale behind this change is that on dev.gitlab.org I'm sometimes seeing certain Gitlab::Git/Rugged objects being retained, but only for a few minutes every 24 hours. Knowing the code of Gitlab and how much memory it uses/leaks I suspect we're missing data due to workers getting terminated before the sampler can write its data to InfluxDB.
| * | Merge branch 'remove-application-frames-from-views' into 'master' Yorick Peterse2016-01-122-17/+1
| |\ \ | | | | | | | | See merge request !2392
| | * | Stop tracking call stacks for instrumented viewsremove-application-frames-from-viewsYorick Peterse2016-01-122-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Where a vew is called from doesn't matter as much. We already know what action they belong to and this is more than enough information. By removing the file/line number from the list of tags we should also be able to reduce the number of series stored in InfluxDB.
| * | | Track memory allocated during a transactionYorick Peterse2016-01-121-4/+25
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This gives a very rough estimate of how much memory is allocated during a transaction. This only works reliably when using a single-threaded application server and a Ruby implementation with a GIL as otherwise memory allocated by other threads might skew the statistics. Sadly there's no way around this as Ruby doesn't provide a reliable way of gathering accurate object sizes upon allocation on a per-thread basis.
| * | Tag all transaction metrics with an "action" tagYorick Peterse2016-01-113-13/+23
| | | | | | | | | | | | | | | | | | | | | Without this it's impossible to find out what methods/views/queries are executed by a certain controller or Sidekiq worker. While this will increase the total number of series it should stay within reasonable limits due to the amount of "actions" being small enough.
| * | Merge branch 'api-project-upload' into 'master' Robert Speicher2016-01-081-4/+7
| |\ \ | | |/ | |/| | | | | | | | | | | | | Add API project upload endpoint Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4317 See merge request !2329
| | * Update specDouwe Maan2016-01-071-4/+7
| | |
| * | Merge branch 'suppress-allow-failure-builds' into 'master' Stan Hu2016-01-081-0/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppress e-mails on failed builds if allow_failure is set Every time I push to GitLab, I get > 2 emails saying a spec failed when I don't care about the benchmarks and others that have `allow_failure` set to `true`. @ayufan mentioned creating a summary e-mail to prevent getting one e-mail per build, but the latter might actually be desirable. For example, I do want to know if Rubocop errors fail right away. See merge request !2178
| | * | Suppress e-mails on failed builds if allow_failure is setStan Hu2016-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | Every time I push to GitLab, I get > 2 emails saying a spec failed when I don't care about benchmarks and other specs that have `allow_failure` set to `true`.
| * | | Add spec for single-item task listsrs-single-item-task-list-specRobert Speicher2016-01-071-0/+6
| | | |
| * | | Merge branch 'milestone-ref' into 'master' Robert Speicher2016-01-071-0/+75
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Link to milestone in "Milestone changed" system note Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4141 See merge request !2203
| | * | Milestone reference is a Markdown linkmilestone-refDouwe Maan2016-01-071-1/+3
| | | |
| | * | Remove icon from milestone reference.Douwe Maan2016-01-051-2/+2
| | | |
| | * | Merge branch 'master' into milestone-refDouwe Maan2016-01-0515-6/+820
| | |\ \
| | * \ \ Merge branch 'master' into milestone-refDouwe Maan2015-12-241-0/+15
| | |\ \ \
| | * | | | Render milestone links as referencesDouwe Maan2015-12-241-0/+73
| | | | | |
| * | | | | Store request methods/URIs as valuesYorick Peterse2016-01-072-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since filtering by these values is very rare (they're mostly just displayed as-is) we don't need to waste any index space by saving them as tags. By storing them as values we also greatly reduce the number of series in InfluxDB.
| * | | | | Removed UUIDs from metrics transactionsYorick Peterse2016-01-071-2/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | While useful for finding out what methods/views belong to a transaction this might result in too much data being stored in InfluxDB.
| * | | | Revert "Store SQL/view timings in milliseconds"Yorick Peterse2016-01-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7549102bb727daecc51da84af39956b32fc41537. Apparently I was wrong about ActiveSupport::Notifications::Event#duration returning the duration in seconds, instead it returns it in milliseconds already.
| * | | | Store SQL/view timings in millisecondsYorick Peterse2016-01-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Transaction timings are also already stored in milliseconds, this keeps things consistent.
| * | | | Ensure that we're only importing local pull requestsDouglas Barbosa Alexandre2016-01-051-0/+22
| | | | |
| * | | | Generate separate comments when importing GitHub Issues into GitLabDouglas Barbosa Alexandre2016-01-053-4/+152
| | | | |
| * | | | Refactoring GithubImport::ImporterDouglas Barbosa Alexandre2016-01-052-0/+233
| | |_|/ | |/| |
| * | | Merge branch 'rs-relative-links-to-root' into 'master' Douwe Maan2016-01-051-0/+8
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support a single directory traversal in RelativeLinkFilter Prior, if we were viewing a blob at `https://example.com/namespace/project/blob/master/doc/some-file.md` and it contained a relative link such as `[README](../README.md)`, the resulting link when viewing the blob would be: `https://example.com/namespace/project/blob/README.md` which omits the `master` ref, resulting in a 404. Fixes https://gitlab.com/gitlab-org/release-tools/issues/3 See merge request !2247
| | * | | Support a single directory traversal in RelativeLinkFilterrs-relative-links-to-rootRobert Speicher2015-12-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior, if we were viewing a blob at `https://example.com/namespace/project/blob/master/doc/some-file.md` and it contained a relative link such as `[README](../README.md)`, the resulting link when viewing the blob would be: `https://example.com/namespace/project/blob/README.md` which omits the `master` ref, resulting in a 404.
| * | | | Merge branch 'metrics-tuning' into 'master' Dmitriy Zaporozhets2016-01-058-136/+74
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tuning of metrics data to store This removes data we don't really need, as well as making sure we don't overload any cache stores or databases. See merge request !2265
| | * | | | Fix Rubocop styling in AR subscriber specsmetrics-tuningYorick Peterse2016-01-041-1/+1
| | | | | |
| | * | | | Automatically prefix transaction series namesYorick Peterse2016-01-045-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures Rails and Sidekiq transactions are split into the series "rails_transactions" and "sidekiq_transactions" respectively.
| | * | | | Use separate series for Rails/Sidekiq sample statsYorick Peterse2016-01-041-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for any tags to differentiate between Sidekiq and Rails statistics while still being able to separate the two.
| | * | | | Track total method call times per transactionYorick Peterse2016-01-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to see where time is spent without having to aggregate all the individual points in the method_calls series.
| | * | | | Track total query/view timings in transactionsYorick Peterse2016-01-042-0/+38
| | | | | |
| | * | | | Ability to increment custom transaction valuesYorick Peterse2016-01-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used to store/increment the total query/view rendering timings on a per transaction basis. This in turn can greatly reduce the amount of metrics stored.
| | * | | | Removed tracking of hostnames for metricsYorick Peterse2015-12-312-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't hugely useful and mostly wastes InfluxDB space. We can re-add this whenever needed (but only once we really need it).
| | * | | | Use separate series for Rails/Sidekiq transactionsYorick Peterse2015-12-315-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | This removes the need for tagging all metrics with a "process_type" tag.
| | * | | | Cache InfluxDB settings after the first useYorick Peterse2015-12-311-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we don't need to load anything from either PostgreSQL or the Rails cache whenever creating new InfluxDB connections.
| | * | | | Removed tracking of raw SQL queriesYorick Peterse2015-12-312-125/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This particular setup had 3 problems: 1. Storing SQL queries as tags is very inefficient as InfluxDB ends up indexing every query (and they can get pretty large). Storing these as values instead means we can't always display the SQL as easily. 2. We already instrument ActiveRecord query methods, thus we already have timing information about database queries. 3. SQL obfuscation is difficult to get right and I'd rather not expose sensitive data by accident.
| * | | | | Optimize CSS expressions produced by Nokogiriautocomplete-performanceYorick Peterse2015-12-311-0/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nokogiri produces inefficient XPath expressions when given CSS expressions such as "a.gfm". Luckily these expressions can be optimized quite easily while still achieving the same results. In the two cases where this optimization is applied the run time has been reduced from around 170 ms to around 15 ms.
| * | | | Removed various default metrics tagsreduce-influxdb-tagsYorick Peterse2015-12-311-3/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | While it's useful to keep track of the different versions (Ruby, GitLab, etc) doing so for every point wastes disk space and possibly also RAM (which InfluxDB is all to eager to gobble up). If we want to see the performance differences between different GitLab versions simply looking at the performance since the last release date should suffice.
| * | | Write to InfluxDB directly via UDPYorick Peterse2015-12-294-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for Sidekiq and any overhead/problems introduced by TCP. There are a few things to take into account: 1. When writing data to InfluxDB you may still get an error if the server becomes unavailable during the write. Because of this we're catching all exceptions and just ignore them (for now). 2. Writing via UDP apparently requires the timestamp to be in nanoseconds. Without this data either isn't written properly. 3. Due to the restrictions on UDP buffer sizes we're writing metrics one by one, instead of writing all of them at once.
| * | | Strip newlines from obfuscated SQLYorick Peterse2015-12-291-0/+6
| | | | | | | | | | | | | | | | | | | | Newlines aren't really needed and they may mess with InfluxDB's line protocol.