summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update the gitlab-shell version in the tmp/tests directory to the right versionupdate-gitlab-shell-in-testsStan Hu2016-08-031-2/+8
| | | | | | Previously the gitlab-shell version would never be updated if the directory existed via the `gitlab:shell:install` Rake task. This could lead to incompatibility issues or random errors.
* Merge branch 'fix-downtime-check-compare-with-branch' into 'master' Yorick Peterse2016-08-021-20/+6
|\ | | | | | | | | Always compare with FETCH_HEAD in downtime_check See merge request !5619
| * Always compare with FETCH_HEAD in downtime_checkYorick Peterse2016-08-021-20/+6
| | | | | | | | | | This ensures this CI step works properly even when doing a shallow clone.
* | fix TODO comment [ci skip]James Lopez2016-08-021-1/+1
|/
* Add support for relative links starting with ./ or / to RelativeLinkFilter ↵winniehell2016-08-021-0/+3
| | | | (!5586)
* Catch what warden might throw when profiling requests to re-throw itfix/request-profiler-error-when-unauthenticatedAhmad Sherif2016-08-011-2/+8
| | | | Closes #20488
* Merge branch 'fix/request-profiler-middleware-error-on-reload' into 'master' Douwe Maan2016-08-011-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix RequestProfiler::Middleware error when code is reloaded in development ## What does this MR do? It explicitly requires `Gitlab::RequestProfiler::Middleware` before inserting it in the stack instead of autoloading it. ## Are there points in the code the reviewer needs to double check? N/A ## Why was this MR needed? It fixes #20452 ## What are the relevant issue numbers? #20452 ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - ~~Tests~~ - [ ] ~~Added for this feature/bug~~ - [ ] ~~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 !5593
| * Fix RequestProfiler::Middleware error when code is reloaded in developmentfix/request-profiler-middleware-error-on-reloadAhmad Sherif2016-08-011-0/+1
| | | | | | | | Closes #20452
* | Merge branch 'fix/use-fewer-queries-for-ci-charts' into 'master' Douwe Maan2016-08-011-26/+70
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use fewer queries for CI charts ## What does this MR do? It reduces number of queries sent for aggregating counts for CI graphs. ## Are there points in the code the reviewer needs to double check? N/A ## Why was this MR needed? For this project (gitlab-ce), loading `/graphs/master/ci` is so slow it times out eventually. I did a quick benchmarking on production and found that it can take 72.5 seconds to only load the controller action variables (there are queries done from the view, didn't look into those). This MR reduces the time to about 2.5 seconds. Extra improvement could be done by introducing an index on `gl_project_id` and `created_at` for `ci_builds` table, but I can't confirm that right now. ## What are the relevant issue numbers? #20262 ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~[ ] API support added~~ - ~~Tests~~ - ~~[ ] 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 !5502
| * | Use fewer queries for CI chartsfix/use-fewer-queries-for-ci-chartsAhmad Sherif2016-07-271-26/+70
| | |
* | | Merge branch 'fix/importing-io-timing-issue' into 'master' Rémy Coutable2016-08-011-1/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix timing problems running imports on production Fixes https://gitlab.com/gitlab-com/infrastructure/issues/151 I've found out that in staging, the imported file is not copied fully by the time sidekiq runs the job, this should hopefully fix it. (Tested against staging). See merge request !5523
| * | | refactored wait_for_archived_file methodfix/importing-io-timing-issueJames Lopez2016-08-011-6/+4
| | | |
| * | | fix return value and specJames Lopez2016-08-011-1/+1
| | | |
| * | | squashed - fix timing issues in prod importing projectsJames Lopez2016-08-011-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added changelog fix specs refactored code based on feedback fix rubocop warning
* | | | Merge branch '20473-rails-queue-duration' into 'master' Yorick Peterse2016-08-011-2/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Gitlab::Metrics.current_transaction needs to be public for RailsQueueDuration See merge request !5592
| * | | | Gitlab::Metrics.current_transaction needs to be public for RailsQueueDurationPaco Guzman2016-08-011-2/+1
| | |_|/ | |/| |
* | | | Trim extra displayed carriage returns in diffs and files with CRLFsStan Hu2016-08-011-1/+1
|/ / / | | | | | | | | | Closes #20440
* | | Merge branch 'fix/labels-milestones-import' into 'master' Rémy Coutable2016-08-016-93/+173
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Importing labels and milestones associations - Import/Export Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19510 and https://gitlab.com/gitlab-org/gitlab-ce/issues/19447 - [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 !5426
| * | | squashed - fixed label and milestone association problems, updated specs and ↵fix/labels-milestones-importJames Lopez2016-08-016-93/+173
| |/ / | | | | | | | | | refactored reader class a bit
* | | Merge branch 'zj-env-external-url' into 'master' Rémy Coutable2016-08-013-0/+92
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an URL field to Enviroments ## What does this MR do? Adds a field to the `enviroments` table to expose later in other features. Now I see the task list below, I noticed I forgot some minor things, but Ill adress those after the first review. ## Are there points in the code the reviewer needs to double check? The field is a string on the database, thus limited to 255 chars, which seems more than enough. ## What are the relevant issue numbers? Closes #19527 ## Screenshots (if relevant) ![Screen_Shot_2016-07-25_at_15.22.16](/uploads/5c3f39466f8e2114195270006aed20c0/Screen_Shot_2016-07-25_at_15.22.16.png)![Screen_Shot_2016-07-25_at_15.22.53](/uploads/408cf86610137dd4a861d15dcd677a2c/Screen_Shot_2016-07-25_at_15.22.53.png)![Screen_Shot_2016-07-25_at_15.23.10](/uploads/927c506931f4e0338cdbbc58678bd308/Screen_Shot_2016-07-25_at_15.23.10.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] API support 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] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5469
| * | Minor fixes in the Env API endpointszj-env-external-urlZ.J. van de Weg2016-08-011-1/+5
| | |
| * | Use Grape DSL for environment endpointsZ.J. van de Weg2016-07-292-48/+47
| | | | | | | | | | | | Also a couple of minor edits for this branch are included
| * | Incorporate feedbackZ.J. van de Weg2016-07-291-4/+1
| | |
| * | Add API support for environmentsZ.J. van de Weg2016-07-293-0/+92
| | |
* | | Merge branch 'fix/import-project-hooks' into 'master' Douwe Maan2016-07-292-1/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix repo hooks missing on import Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19556 Repo hooks are missing from imported projects - [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 !5549
| * | | fix repo hooks missing on importfix/import-project-hooksJames Lopez2016-07-282-1/+19
| | | | | | | | | | | | | | | | fix spec and added changelog
* | | | Merge branch 'ability-batch-issue-checking' into 'master' Robert Speicher2016-07-291-3/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize checking if a user can read multiple issues ## What does this MR do? This optimizes various parts of the code so it can more efficiently check if a user can read a list of issues. ## Are there points in the code the reviewer needs to double check? Yes, in particular `Ability.issues_readable_by_user` should be checked to make sure it correctly allows/restricts access to issues. ## Why was this MR needed? Currently the general approach to checking if one can read an issue is to iterate over the issues to check and call `can?(user, :read_issue, issue)` for every issue. This is not efficient as the same work has to be done for every issue. ## What are the relevant issue numbers? * #15607 * #17463 See merge request !5370
| * | | | Method for returning issues readable by a userability-batch-issue-checkingYorick Peterse2016-07-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method Ability.issues_readable_by_user takes a list of users and an optional user and returns an Array of issues readable by said user. This method in turn is used by Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this method no longer needs to get all the available abilities just to check if a user has the "read_issue" ability. To test this I benchmarked an issue with 222 comments on my development environment. Using these changes the time spent in nodes_visible_to_user was reduced from around 120 ms to around 40 ms.
* | | | | Merge branch 'rubocop/enable-access-modifiers-cops' into 'master' Robert Speicher2016-07-298-66/+76
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Rubocop cops that check access modifiers ## What does this MR do? This MR enables Rubocop cops that detect methods that should be restricted but are the part of public API because of access modifiers used improperly. This also fixes existing offenses. ## Why was this MR needed? Some method in our codebase are public instead of being private because it is sometimes difficult to get it right without static analysis. ## What are the relevant issue numbers? See #17478 Closes #17372 See merge request !5014
| * | | | | Enable Rubocop cops for invalid access modifiersrubocop/enable-access-modifiers-copsGrzegorz Bizon2016-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables following cops: Check for useless access modifiers Lint/UselessAccessModifier Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work. Lint/IneffectiveAccessModifier This also disables two false possitives in concerns.
| * | | | | Fix method visiblity in emoji filter classGrzegorz Bizon2016-07-191-5/+5
| | | | | |
| * | | | | Fix methods visibility in markdown filter classGrzegorz Bizon2016-07-191-7/+7
| | | | | |
| * | | | | Fix method visibility in gitlab metrics classGrzegorz Bizon2016-07-191-2/+2
| | | | | |
| * | | | | Make banzai module that handles markdown singletonGrzegorz Bizon2016-07-191-7/+9
| | | | | |
| * | | | | Fix method visibility in inline diff classGrzegorz Bizon2016-07-191-35/+39
| | | | | |
| * | | | | Fix methods visibility in gitlab database moduleGrzegorz Bizon2016-07-191-2/+4
| | | | | |
| * | | | | Refactor gitlab themes module to make it singletonGrzegorz Bizon2016-07-191-7/+9
| | | | | |
* | | | | | Merge branch 'refactor/ci-config-move-job-entries' into 'master' Rémy Coutable2016-07-2920-260/+524
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CI job config entries from legacy to new config ## What does this MR do? This MR extracts jobs configuration logic from legacy CI config processor to the new code. ## What are the relevant issue numbers? #15060 ## Does this MR meet the acceptance criteria? - 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) See merge request !5087
| * | | | | Improve code, remove unused validator, improve namesGrzegorz Bizon2016-07-299-33/+19
| | | | | |
| * | | | | Merge branch 'master' into refactor/ci-config-move-job-entriesGrzegorz Bizon2016-07-2220-147/+333
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (183 commits) Add a spec for #20079. Skip repository storage path valitaions on test environment Use Pathname to make the repository storage path validations more robust Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects Change nav link snippet controller Reduce min width of pipeline table Retrieve rendered HTML from cache in one request Explain CI_PROJECT_NAMESPACE better Bump vmstat version to fix issues reporting on FreeBSD Fix sha icon positioning on safari Don't drop in DropAndReaddHasExternalWikiInProjects Mobile view for commit status Fix ci icons getting cut off Update CHANGELOG Extract helper methods to clean up RepositoryArchiveCleanUpService spec Use Dir.mktmpdir instead of FileUtils.mkdir_p in the spec Fix firefox rendering of SVGs Fix icons on commits page and builds page Add new fork SVG to fix weird styling of other SVGs Bug fixes ...
| * | | | | | Move job dependencies entry to the new CI configGrzegorz Bizon2016-07-202-15/+13
| | | | | | |
| * | | | | | Add minor readability, style improvements in CI configGrzegorz Bizon2016-07-207-19/+20
| | | | | | |
| * | | | | | Merge branch 'master' into refactor/ci-config-move-job-entriesGrzegorz Bizon2016-07-2038-287/+514
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (321 commits) Fix the Sentry spam from CSP violations by disabling it. Limit git rev-list output count to one in forced push check Ensure Owners are included in the scope for authorized_projects Fix alignment of icons on project page Fix ci_status_helper_spec to look for new SVGs use 2.0.5, actually (2.0.4 was a bad release) upgrade rouge to 2.0.4 Fix help page paths to make sure shortcuts and the UI help page work. fixes an issue cause by a bad merge Vertically align status icon within table Add new icons for every CI status Add global style for running icon Align running icon in merge request Add new running icon; add a bunch of styles to get svg to match existing fa icons Improve code design Fix broken builds_for_ref Move when tests before to make it no conflict with manual-actions Use value of `yaml_variables` and `when` from config_processor if undefined Add CHANGELOG entry CHANGELOG item ... Conflicts: lib/ci/gitlab_ci_yaml_processor.rb spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
| * | | | | | | Move job environment validation to new CI configGrzegorz Bizon2016-07-194-17/+15
| | | | | | | |
| * | | | | | | Move tags and allow_failure CI entries to new configGrzegorz Bizon2016-07-182-8/+8
| | | | | | | |
| * | | | | | | Validate allowed keys only in new CI configGrzegorz Bizon2016-07-182-19/+5
| | | | | | | |
| * | | | | | | Improve valid keys validation for CI config nodesGrzegorz Bizon2016-07-185-24/+12
| | | | | | | |
| * | | | | | | Move job artifacts configuration new CI config codeGrzegorz Bizon2016-07-185-21/+71
| | | | | | | |
| * | | | | | | Move job variables config entry to new CI configGrzegorz Bizon2016-07-182-17/+5
| | | | | | | |
| * | | | | | | Move except and only job nodes to new CI configGrzegorz Bizon2016-07-182-1/+35
| | | | | | | |