summaryrefslogtreecommitdiff
path: root/spec/lib
Commit message (Collapse)AuthorAgeFilesLines
* Tracking of custom eventscustom-events-trackingYorick Peterse2016-08-175-2/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitLab Performance Monitoring is now able to track custom events not directly related to application performance. These events include the number of tags pushed, repositories created, builds registered, etc. The use of these events is to get a better overview of how a GitLab instance is used and how that may affect performance. For example, a large number of Git pushes may have a negative impact on the underlying storage engine. Events are stored in the "events" measurement and are not prefixed with "rails_" or "sidekiq_", this makes it easier to query events with the same name triggered from different parts of the application. All events being stored in the same measurement also makes it easier to downsample data. Currently the following events are tracked: * Creating repositories * Removing repositories * Changing the default branch of a repository * Pushing a new tag * Removing an existing tag * Pushing a commit (along with the branch being pushed to) * Pushing a new branch * Removing an existing branch * Importing a repository (along with the URL we're importing) * Forking a repository (along with the source/target path) * CI builds registered (and when no build could be found) * CI builds being updated * Rails and Sidekiq exceptions Fixes gitlab-org/gitlab-ce#13720
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski2016-08-166-38/+223
|\ | | | | | | pipeline-hooks-without-slack
| * Load issues and merge requests templates from repositoryFelipe Artur2016-08-164-2/+221
| |
| * Merge remote-tracking branch 'dev/master'Ruben Davila2016-08-161-1/+2
| |\
| | * Merge branch 'fix/export-att-inclusion' into 'master' Douwe Maan2016-08-151-1/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix attribute inclusion import/export config ignored in some cases In the `import_export.yml` file we define the inclusion of some of the attributes. For some reason, this isn't working in certain cases - very unfortunate this includes `user`. This has been introduced in 8.10.3. Related https://gitlab.com/gitlab-org/gitlab-ce/issues/20802 See merge request !1982
| | | * Fix attribute inclusion in import/export config ignored in some casesJames Lopez2016-08-111-1/+2
| | | |
| * | | Merge branch 'akismet-submittable' into 'master' Robert Speicher2016-08-151-35/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submit to Akismet Part 1 (Issues) Related to #5932 #5573 gitlab-com/infrastructure#14 See merge request !5538
| | * | | Refactored AkismetHelper into AkismetService and cleaned up `Spammable`Patricio Cano2016-08-151-24/+0
| | | | | | | | | | | | | | | | | | | | - Refactored SpamCheckService into SpamService
| | * | | Refactored spam related code even furtherPatricio Cano2016-08-151-11/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | - Removed unnecessary column from `SpamLog` - Moved creation of SpamLogs out of its own service and into SpamCheckService - Simplified code in SpamCheckService. - Moved move spam related code into Spammable concern
* | | | Merge branch 'fix-failing-tests' into pipeline-hooks-without-slackKamil Trzcinski2016-08-157-56/+314
|\ \ \ \ | |/ / /
| * | | Add small corrections to test coverage report badgeGrzegorz Bizon2016-08-151-3/+3
| | | |
| * | | Add metadata and template methods for coverage badgeGrzegorz Bizon2016-08-151-0/+12
| | | |
| * | | Add template class for coverage report badgeGrzegorz Bizon2016-08-151-0/+130
| | | |
| * | | Extract the abstract base class of badge metadataGrzegorz Bizon2016-08-152-0/+12
| | | |
| * | | Add coverage report badge metadata classGrzegorz Bizon2016-08-151-0/+24
| | | |
| * | | Extract common badge metadata test examplesGrzegorz Bizon2016-08-152-19/+23
| | | |
| * | | Implement the main class of test coverage badgeGrzegorz Bizon2016-08-151-8/+68
| | | |
| * | | Refactor badge template and metadata classesGrzegorz Bizon2016-08-153-44/+39
| | | |
| * | | Move badges to separate modules and add base classGrzegorz Bizon2016-08-152-4/+6
| | | |
| * | | Add empty test coverage badge class and specsGrzegorz Bizon2016-08-151-0/+19
| |/ /
* | | Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski2016-08-151-0/+99
|\ \ \ | |/ /
| * | Change the order of the access rules to check simpler first, and add specschange-access-updateAlejandro Rodríguez2016-08-121-0/+99
| | |
* | | Merge branch 'improve-pipeline-processing' into pipeline-hooks-without-slackKamil Trzcinski2016-08-122-8/+39
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/models/commit_status.rb # app/services/ci/create_pipeline_service.rb # spec/models/ci/pipeline_spec.rb
| * | Merge remote-tracking branch 'origin/master' into improve-pipeline-processingKamil Trzcinski2016-08-121-0/+30
| |\ \
| | * | api for generating new merge requestScott Le2016-08-111-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRY code + fix rubocop Add more test cases Append to changelog DRY changes list find_url service for merge_requests use GET for getting merge request links remove files rename to get_url_service reduce loop add test case for cross project refactor tiny thing update changelog
| * | | Fix test failures, that did occur because of missing previously used ↵Kamil Trzcinski2016-08-111-7/+9
| | | | | | | | | | | | | | | | `reload_status!` call
| * | | Use state machine for pipeline event processingKamil Trzcinski2016-08-111-1/+0
| |/ /
* | | Simplify the name for data builder, feedback:Lin Jen-Shin2016-08-124-4/+4
| | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
* | | Prefer described_class, feedback:Lin Jen-Shin2016-08-123-3/+3
| | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13810811 And other similar places.
* | | Enhance a pipeline event tests to analyse number of returned buildsKamil Trzcinski2016-08-111-2/+6
| | |
* | | Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski2016-08-114-13/+28
|\ \ \ | |/ / | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/services/ci/create_pipeline_service.rb # spec/models/project_services/hipchat_service_spec.rb
| * | Merge branch 'refactor-builds-creation-service' into 'master' Rémy Coutable2016-08-113-10/+12
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor pipeline creation service ## What does this MR do? This refactors GitLab CI build processing: all builds for pipeline are pre-created when a pipeline object is created. The builds are created with a new introduced status `created`. The builds are then automatically promoted to `pending` when a previous stage do succeed. This significantly simplifies pipeline processing code solving a lot of problems of lazily initialisation of previous approach (builds were created on-demand). ## Why was this MR needed? The previous mechanism had a lot of flows (shown in related issues) in how it work, but also in code design. Removing cross model-service-library dependencies. The current approach moves a build creation to single place `CreatePipelineService` and removes a dynamic dependency on `config_processor` significantly simplifying a build creation and pipeline processing. Pipeline processing is implemented in `ProcessPipelineService`. This also allows to easily extend GitLab with Manual Actions which is part of 8.10 direction issue. ## Migration problem ~~This MR removes the a on-demand creation of builds in pipelines. Pipelines that are running and are in mid-stage (some stages started, but not all) will not be fully evaluated after application restart. This happens, because the code responsible for on-demand creation is removed. There's no easy way to migrate existing pipelines, other than doing offline migration and putting pipeline processing in migration code (which seems to be a really bad idea).~~ To support old pipelines I added a lazy initialization of builds if none is found. ## What are the relevant issue numbers? Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/12839 Solves: https://gitlab.com/gitlab-org/gitlab-ce/issues/18644 https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/289 Allows to easily implement: https://gitlab.com/gitlab-org/gitlab-ce/issues/17010 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] 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) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5295
| | * | Pre-create all builds for Pipeline when a trigger is receivedKamil Trzcinski2016-08-113-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change simplifies a Pipeline processing by introducing a special new status: created. This status is used for all builds that are created for a pipeline. We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped). This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled. This also allows us to visualise a full pipeline (with created builds). This also removes an after_touch used for updating a pipeline state parameters. Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
| * | | Fix front-end for branches that happen to contain urlencoding escape ↵10772-fix-urlencoded-branchnameElliot2016-08-111-3/+16
| |/ / | | | | | | | | | | | | | | | characters (e.g. %) Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slackLin Jen-Shin2016-08-1137-218/+504
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (233 commits) Fix awardable button mutuality loading spinners Update CHANGELOG for 8.10.5 Clean up project destruction Small refactor of doc/development/README.md Avoid commit lookup on diff_helper Removed extra newline from redis_spec.rb Used cached value of project count to reduce DB load Remove duplicate link_to statements Mention add_column_with_default in downtime guide Add missing space to generic badge template Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects spellcheck Add svg guidelines to ui guide Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense ...
| * | Merge branch 'feature/svg-badge-template' into 'master' Douwe Maan2016-08-103-69/+164
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use badge image template instead of using separate images ## What does this MR do? Makes it possible to use template for badge instead of having multiple files. ## Are there points in the code the reviewer needs to double check? We also have a deprecated badge in `controllers/ci/projects_controller.rb`. We decided to leave it until 9.0, so we still have images in `public/ci/` until 9.0. ## Why was this MR needed? We are going to implement build coverage badge, and we do not want to store 101 SVG images for each percentage value. ## What are the relevant issue numbers? #3714 ## Screenshots (if relevant) ![new_build_badge](/uploads/f1d4ed5e34278eb01f48994b5b0579f1/new_build_badge.png) ## Does this MR meet the acceptance criteria? - [ ] ~~[CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ (refactoring) - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~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] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] ~~[Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)~~ (refactoring) See merge request !5520
| | * Extend build badge specs to cover multiple pipelinesGrzegorz Bizon2016-08-091-14/+26
| | |
| | * Merge branch 'master' into feature/svg-badge-templateGrzegorz Bizon2016-08-097-14/+77
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (52 commits) remove offending empty line Namespace EnableDeployKeyService under Projects Update version_sorter and use new interface for faster tag sorting Avoid to show the original password field when password is automatically seted Support pending invitation project members importing projects Added concern for a faster "cache_key" method Update templates "This file is managed by gitlab-ctl. Manual changes will be erased!" Remove legacy Ci::StaticModel we do not use anymore Revert "Defend against 'Host' header injection" Simplify feature introduction note Add migration-related tips to the "Merge Request Guidelines" doc Enable Style/SpaceAroundEqualsInParameterDefault cop Enable Style/EmptyLinesAroundClassBody cop Enable Style/EmptyLinesAroundModuleBody cop Ensure we are looking for the right dropdown inside the form wrapper Set for for labels and ID for dropdowns on create form Fix .panel-title style Refine selector for form submit button Fix spelling. `braches` to `branches` ...
| | * | Improve builds badge specs, remove legacy methodsGrzegorz Bizon2016-08-081-25/+15
| | | |
| | * | Merge branch 'master' into feature/svg-badge-templateGrzegorz Bizon2016-08-0839-454/+1126
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (363 commits) Added changelog item for issuable form dropdowns Add 'run tests' docs from GDK Bump gitlab_git to lazy load compare commits Add examples to repository files API (!5465) Ignore URLs starting with // (!5677) Add failing test for #7032 Update timeago to shorter representation Add missing DOWNTIME constant to the AddTimestampsToMembersAgain migration Added guide about migrations and downtime Update CHANGELOG for 8.10.4 Add a data migration to fix some missing timestamps in the members table (again) Move abilities by subject class to a dedicated method Remove unnecessary empty line after css var Set consistency in list text height css Add description to text/plain emails Fix Rename `add_users_into_project` and `projects_ids` fix spec Underscore variable to camelCase using shared path for project import uploads and refactored gitlab remove export worker Structure the development documentation ...
| | * | | Add badge template class to use with SVG ERB templateGrzegorz Bizon2016-07-281-0/+76
| | | | |
| | * | | Calculate build status only in build badge classGrzegorz Bizon2016-07-281-10/+13
| | | | |
| | * | | Extract build status badge metadata to separate classGrzegorz Bizon2016-07-282-27/+41
| | | | |
| * | | | Removed extra newline from redis_spec.rbYorick Peterse2016-08-101-1/+0
| | | | |
| * | | | Merge branch 'gh-pull-requests' into 'master' Douwe Maan2016-08-093-83/+41
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check out GH pull requests locally where the source/target branch had been deleted ## What does this MR do? Check out GitHub pull requests where source/target branches that had been deleted locally rather than temporarily restoring them on GitHub using their References API. This helps us to not get rate limited, and allow us to import cross-repository pull requests (those from forks). ## What are the relevant issue numbers? Fixes #15528 Fixes #17766 Fixes #19310 Fixes #19439 Fixes #19998 Fixes #20153 Fixes #20552 Fixes https://gitlab.com/gitlab-com/support-forum/issues/801 #20385 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [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] 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 !5630
| | * | | | Prefixes removed branches name with PR number when importing PR from GHgh-pull-requestsDouglas Barbosa Alexandre2016-08-082-8/+37
| | | | | |
| | * | | | Remove SHA suffix for removed branches name when importing PR from GHDouglas Barbosa Alexandre2016-08-081-7/+1
| | | | | |
| | * | | | Allow users to import cross-repository pull requests from GitHubDouglas Barbosa Alexandre2016-08-041-4/+4
| | | | | |
| | * | | | Does not need to disable GitHub webhooks since PRs are check out locallyDouglas Barbosa Alexandre2016-08-041-65/+0
| | | | | |
| * | | | | Merge branch 'brodock/gitlab-ce-feature/redis-sentinel'Douwe Maan2016-08-091-0/+80
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # lib/gitlab/redis.rb