summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make needs: to require previous jobsmake-needs-strong-connectionKamil Trzciński2019-08-022-12/+38
| | | | | | | | | This changes `needs:` from weak reference to have a strong reference. This means that job will not be created unless all needs are present as part of a pipeline.
* Prevent empty classes in ansi2html conversionLukas '+ alert('Eipi') + ' Eipert2019-08-021-10/+17
| | | | | | | Currently we write out empty CSS classes (`class=""`) every time we create a new tag. This adds 9 unnecessary bytes per span element. In a recent trace, I have counted 11950 span elements. So we transported 105 unnecessary kilobytes!
* Call `GC::Profiler.clear` only in one placeAleksei Lipniagov2019-08-022-28/+17
| | | | | | | | | | | | | | | Previously, both InfluxSampler and RubySampler were relying on the `GC::Profiler.total_time` data which is the sum over the list of captured GC events. Also, both samplers asynchronously called `GC::Profiler.clear` which led to incorrect metric data because each sampler has the wrong assumption it is the only object who calls `GC::Profiler.clear` and thus could rely on the gathered results between such calls. We should ensure that `GC::Profiler.total_time` is called only in one place making it possible to rely on accumulated data between such wipes. Also, we need to track the amount of profiler reports we lost.
* Update regex for docs branches in ciMarcel Amirault2019-08-021-1/+1
| | | | Changes * to + to be more precise with acceptable branch names
* Merge branch '52123-issuable-actions-notesfinder-pderichs' into 'master'Stan Hu2019-08-012-2/+2
|\ | | | | | | | | | | | | Use NotesFinder to fetch notes on API and Controllers Closes #52123 See merge request gitlab-org/gitlab-ce!31300
| * Use NotesFinder in IssuableActions modulePatrick Derichs2019-08-012-2/+2
| | | | | | | | | | | | | | | | | | | | Remove project from NotesFinder constructor Add project parameter to specs Also look for methods in private scope Fix specs to match new NotesFinder constructor
* | Merge branch 'osw-avoid-errors-due-to-concurrent-calls' into 'master'Douwe Maan2019-08-011-2/+3
|\ \ | | | | | | | | | | | | Add exclusive lease to mergeability check process See merge request gitlab-org/gitlab-ce!31082
| * | Add exclusive lease to mergeability check processosw-avoid-errors-due-to-concurrent-callsOswaldo Ferreira2019-07-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Concurrent calls to UserMergeToRef RPC updating a single ref can lead to an opaque fail that is being rescued at Gitaly. So this commit adds an exclusive lease to the mergeability check process with the key as the current MR ID.
* | | Add support for DAGKamil Trzciński2019-08-013-35/+67
| | | | | | | | | | | | | | | | | | This implements the support for `needs:` keyword as part of GitLab CI. That makes some of the jobs to be run out of order.
* | | Merge branch 'sh-backtrace-clean-sidekiq' into 'master'Sean McGivern2019-08-011-0/+3
|\ \ \ | | | | | | | | | | | | | | | | Add additional paths to clean from backtrace See merge request gitlab-org/gitlab-ce!31363
| * | | Add additional paths to clean from backtracesh-backtrace-clean-sidekiqStan Hu2019-07-311-0/+3
| | | | | | | | | | | | | | | | | | | | `Gitlab::Profiler` can also be used to profile Sidekiq jobs. Add some call traces that can be omitted from the backtrace.
* | | | Merge branch 'sh-fix-infite-loop-peek-bar' into 'master'Sean McGivern2019-08-011-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix SystemStackError when Peek bar is active with Rugged calls Closes #65404 See merge request gitlab-org/gitlab-ce!31357
| * | | | Fix SystemStackError when Peek bar is active with Rugged callssh-fix-infite-loop-peek-barStan Hu2019-07-311-2/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Peek attempts to serialize results with `to_json`, which calls `ActiveSupport::JSON`. If an object is passed to `to_json` that contains instance variables, `ActiveSupport` will attempt to recursively traverse all variables. The problem is that we can get into an infinite loop if the instance references to an instance that references to something else that points back to the same instance. To avoid this mess, we just call `to_s` on the object. It appears only `Gitlab::Git::Repository` and `::Repository` are the culprits here. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65404
* | | | Merge branch '65363-add-feature-remove' into 'master'Stan Hu2019-08-011-0/+7
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Add Feature.remove Closes #65363 See merge request gitlab-org/gitlab-ce!31315
| * | | Add new Feature.remove method65363-add-feature-removeAsh McKenzie2019-08-011-0/+7
| | |/ | |/|
* | | Merge branch 'add-project-scope-to-live-trace-feature-flag' into 'master'Lin Jen-Shin2019-07-311-1/+1
|\ \ \ | | | | | | | | | | | | | | | | Add project scope to live trace feature flag See merge request gitlab-org/gitlab-ce!31325
| * | | Add project scope to live trace feature flagadd-project-scope-to-live-trace-feature-flagShinya Maeda2019-07-311-1/+1
| |/ / | | | | | | | | | Add project scope
* | | Merge branch 'fix-sidekiq-memory-killer-warn-message' into 'master'Stan Hu2019-07-311-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix sidekiq memory killer warning message Closes gitlab-com/gl-infra/infrastructure#7371 See merge request gitlab-org/gitlab-ce!31264
| * | | Fix sidekiq memory killer warning messagefix-sidekiq-memory-killer-warn-messageShinya Maeda2019-07-301-1/+1
| | | |
* | | | Adds Sidekiq scheduling latency structured logging fieldAndrew Newdigate2019-07-311-0/+6
| | | |
* | | | Default dependency job stage index to Infinity, and correctly report it as ↵drew2019-07-311-1/+3
| | | | | | | | | | | | | | | | undefined in prior stages
* | | | Allow knative do be uninstalled:João Cunha2019-07-312-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - After uninstalling the knative helm chart it's necessary to also remove some leftover resources to allow the cluster to be clean and knative to be reinstalleable. - Adds knative uninstall disclaimer - Uninstall ksvc before uninstalling knative Make list of Knative and Ingres resources explicit - To avoid deleting unwanted resources we are listing exact which resources will be deleted rather than simply deleting any resource that contains istio or knative words.
* | | | Merge branch '65317-adapt-tae-role-name-change' into 'master'Sean McGivern2019-07-311-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | Fix Danger finding a test reviewer Closes #65317 See merge request gitlab-org/gitlab-ce!31292
| * | | Update regular expression to extract stage nameLin Jen-Shin2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since now the role name can be: "<a href=\"/job-families/engineering/test-automation-engineer/\">Senior Test Automation Engineer</a>, Create:Source Code" We need to cope with </a> in the middle.
* | | | Add support page link in help menuDiego Louzán2019-07-301-1/+1
| |_|/ |/| | | | | | | | Creates a new item in help dropdown to show configured support page link
* | | Merge branch 'sh-fix-gitaly-access-control' into 'master'Douglas Barbosa Alexandre2019-07-301-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Fix exception handling in Gitaly autodetection Closes #65328 See merge request gitlab-org/gitlab-ce!31285
| * | Fix exception handling in Gitaly autodetectionStan Hu2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | In SELinux, the file cannot be written, and `Errno::EACCES`, not `Errno::ACCESS` is thrown. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65328
* | | Fix broken update_project_templates rake taskHordur Freyr Yngvason2019-07-302-20/+52
|/ / | | | | | | | | | | This rake task had been broken for a while. This fixes the breakages, adds a test to help avoid future breakages, and adds a few ergonomic improvements to the task itself.
* | Remove line profiler from performance barSean McGivern2019-07-302-125/+1
|/ | | | | | | | | 1. The output isn't great. It can be hard to find hotspots and, even when you do find them, to find why those are hotspots. 2. It uses some jQuery-specific frontend code which we can remove now that we don't have this any more. 3. It's only possible to profile the initial request, not any subsequent AJAX requests.
* Merge branch 'determinstic_dns_specs' into 'master'Douglas Barbosa Alexandre2019-07-301-1/+4
|\ | | | | | | | | Have deterministic DNS for specs See merge request gitlab-org/gitlab-ce!31086
| * Explicitly reject non http(s) schemesThong Kuah2019-07-291-1/+4
| | | | | | | | Rather than relying on NoMethodError deep inside faraday
* | Merge branch ↵Robert Speicher2019-07-291-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | '63547-add-system-notes-for-when-a-zoom-call-was-added-removed-from-an-issue' into 'master' Resolve "Add system notes for when a zoom call was added/removed from an issue" Closes #63547 See merge request gitlab-org/gitlab-ce!30857
| * | Add system notes for when a zoom call was added/removed from an issue63547-add-system-notes-for-when-a-zoom-call-was-added-removed-from-an-issueJacopo2019-07-291-0/+4
| | | | | | | | | | | | | | | Add a zoom link added / removed system note when a zoom link is being added / removed to the issue description.
* | | Move BaseService to Services directorySarah Yasonik2019-07-295-241/+5
| | | | | | | | | | | | | | | | | | | | | | | | In preparation for embedding specific metrics in issues https://gitlab.com/gitlab-org/gitlab-ce/issues/62971, this commit moves the BaseService for metrics dashboards to a new services subdirectory. This is purely for the sake of organization and maintainability.
* | | Make quick action "commands applied" banner more useful🙈 jacopo beschi 🙉2019-07-297-66/+289
| |/ |/| | | | | | | Extends the quick actions "commands applied" banner to show the quick action preview text, but with everything in past tense.
* | Fix broken master because of security mergeFrancisco Javier López2019-07-291-5/+2
| |
* | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher2019-07-2910-76/+117
|\ \
| * | Extract SanitizeNodeLink and apply to WikiLinkFilterKerri Miller2019-07-265-50/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SanitizationFilter was running before the WikiFilter. Since WikiFilter can modify links, we could see links that _should_ be stopped by SanatizationFilter being rendered on the page. I (kerrizor) had previously addressed the bug in: https://gitlab.com/gitlab-org/gitlab-ee/commit/7bc971915bbeadb950bb0e1f13510bf3038229a4 However, an additional exploit was discovered after that was merged. Working through the issue, we couldn't simply shuffle the order of filters, due to some implicit assumptions about the order of filters, so instead we've extracted the logic that sanitizes a Nokogiri-generated Node object, and applied it to the WikiLinkFilter as well. On moving filters around: Once we start moving around filters, we get cascading failures; fix one, another one crops up. Many of the existing filters in the WikiPipeline chain seem to assume that other filters have already done their work, and thus operate on a "transform anything that's left" basis; WikiFilter, for instance, assumes any link it finds in the markdown should be prepended with the wiki_base_path.. but if it does that, it also turns `href="@user"` into `href="/path/to/wiki/@user"`, which the UserReferenceFilter doesn't see as a user reference it needs to transform into a user profile link. This is true for all the reference filters in the WikiPipeline.
| * | Merge branch 'security-github-ssrf-redirect' into 'master'GitLab Release Tools Bot2019-07-263-3/+26
| |\ \ | | | | | | | | | | | | | | | | Do not allow localhost url redirection in GitHub Integration See merge request gitlab/gitlabhq!3188
| | * | Do not allow localhost url redirection in GitHub Integrationmanojmj2019-07-053-3/+26
| | | |
| * | | Merge branch 'security-remove-take-trigger-ownership-feature' into 'master'GitLab Release Tools Bot2019-07-261-21/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop feature to take ownership of a trigger token Closes #2868 See merge request gitlab/gitlabhq!3198
| | * | | Drop feature to take ownership of a trigger tokenFabio Pitino2019-07-101-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing API and frontend interactions that allowed users to take ownership of a trigger token. Removed mentions from the documentation.
| * | | | Merge branch 'security-dns-ssrf-bypass' into 'master'GitLab Release Tools Bot2019-07-261-2/+11
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Server Side Request Forgery mitigation bypass Closes #2872 See merge request gitlab/gitlabhq!3205
| | * | | | Fix Server Side Request Forgery mitigation bypassFrancisco Javier López2019-07-151-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we can't resolve the hostname or it is invalid, we shouldn't even perform the request. This fix also fixes the problem the SSRF rebinding attack. We can't stub feature flags outside example blocks. Nevertheless, there are some actions that calls the UrlBlocker, that are performed outside example blocks, ie: `set` instruction. That's why we have to use some signalign mechanism outside the scope of the specs.
* | | | | | Merge branch 'remove-peek-pg' into 'master'Stan Hu2019-07-296-71/+36
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace peek-pg with our own implementation Closes #44441 See merge request gitlab-org/gitlab-ce!31187
| * | | | | | Replace peek-pg with our own implementationremove-peek-pgSean McGivern2019-07-266-71/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses an ActiveRecord subscriber to get queries and calculate the total query time from that. This means that the total will always be consistent with the queries in the table. It does however mean that we could potentially miss some queries that don't go through ActiveRecord. Making this change also allows us to unify the response JSON a little bit, making the frontend slightly simpler as a result.
* | | | | | | Merge branch 'resolve-scripts-differences' into 'master'Lin Jen-Shin2019-07-292-2/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport EE changes made to the scripts/ directory See merge request gitlab-org/gitlab-ce!31015
| * | | | | | | Backport EE changes made to the scripts/ directoryresolve-scripts-differencesYorick Peterse2019-07-292-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backport changes made by EE to the files in the scripts/ directory. This comes with a few changes to some scripts to make them work in the single codebase setup.
* | | | | | | | Merge branch 'ce-port-4550-add-project-download-export-audit-event' into ↵Stan Hu2019-07-292-1/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' CE: Add project download & project export audit event See merge request gitlab-org/gitlab-ce!31103
| * | | | | | | | CE: Add project download & project export audit eventce-port-4550-add-project-download-export-audit-eventmanojmj2019-07-262-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds audit events for download of repository and export of project.