summaryrefslogtreecommitdiff
path: root/spec/lib
Commit message (Collapse)AuthorAgeFilesLines
* Change the order of the access rules to check simpler first, and add specschange-access-updateAlejandro Rodríguez2016-08-121-0/+99
|
* 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
|/
* 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 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
| * | | | | Small refactor in Redis class and improved specsGabriel Mazetto2016-08-061-2/+5
| | | | | |
| * | | | | Fixed specs for Gitlab::Redis and code for Redis Sentinel supportGabriel Mazetto2016-08-041-20/+16
| | | | | |
| * | | | | Specs for RedisConfigGabriel Mazetto2016-08-041-0/+81
| |/ / / / | | | | | | | | | | | | | | | Make sure :url is not present on RedisConfig.params after parsing
* | | | | Merge branch 'relative-link-filter-ref' into 'master' Robert Speicher2016-08-091-2/+18
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not look up commit again when it is passed to RelativeLinkFilter ## What does this MR do? Use `context[:commit]` in RelativeLinkFilter instead of looking up commit using `context[:ref]`. ## Why was this MR needed? Even though the commit object was already passed, unnecessary I/O is done to retrieve the commit object. ## What are the relevant issue numbers? Fixes #20026 See merge request !5455
| * | | | | Add failing test for #20026winniehell2016-08-021-2/+18
| | | | | |
* | | | | | Merge branch 'fix/import-mr-source' into 'master' Robert Speicher2016-08-092-3/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix importing with an invalid MR source project Source project shouldn't be -1 when both source and target are the same in the original export. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20611 See merge request !5679
| * | | | | | fix MR source project assignmentfix/import-mr-sourceJames Lopez2016-08-092-3/+25
| | |_|_|_|/ | |/| | | |
* | | | | | Merge branch 'fix/improve-ci-node-validatable-to-prevent-memory-leak' into ↵Stan Hu2016-08-091-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Memoize CI config node validator to prevent leaks ## What does this MR do? This MR memoizes CI configuration node validator, to prevent possible memory leak described in #20698. ## Why was this MR needed? See #20698 ## What are the relevant issue numbers? Closes #20698 ## Does this MR meet the acceptance criteria? - [ ] ~~[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 - [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 !5733
| * | | | | | Memoize CI config node validator to prevent leaksfix/improve-ci-node-validatable-to-prevent-memory-leakGrzegorz Bizon2016-08-091-0/+4
| |/ / / / /
* | | | | | adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-0911-35/+35
| | | | | |
* | | | | | fixes part1 of files to start using active tensetiagonbotelho2016-08-091-2/+2
|/ / / / /
* | | | | Merge branch 'rubocop/enable-more-cops-for-empty-lines' into 'master' Robert Speicher2016-08-084-7/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable some Rubocop cops related to new lines ## What does this MR do? This MR enabled two additional Rubocop cops: Keeps track of empty lines around block bodies. `Style/EmptyLinesAroundBlockBody` Keeps track of empty lines around method bodies. ` Style/EmptyLinesAroundMethodBody` See merge request !5637
| * | | | | Remove empty context from CI config processor specsrubocop/enable-more-cops-for-empty-linesGrzegorz Bizon2016-08-051-3/+0
| | | | | |
| * | | | | Enable some Rubocop cops related to new linesGrzegorz Bizon2016-08-035-5/+0
| |/ / / /
* | | | | Merge branch 'git-http-push-check' into 'master' Robert Speicher2016-08-081-6/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop 'git push' over HTTP early Before this change we always let users push Git data over HTTP before deciding whether to accept to push. This was different from pushing over SSH where we terminate a 'git push' early if we already know the user is not allowed to push. This change let Git over HTTP follow the same behavior as Git over SSH. We also distinguish between HTTP 404 and 403 responses when denying Git requests, depending on whether the user is allowed to know the project exists. See merge request !5639
| * | | | | Fix ArgumentError in GitAccess specsJacob Vosmaer2016-08-041-6/+6
| |/ / / /
* | | | | Merge branch 'fix/import-pending-user' into 'master' Rémy Coutable2016-08-081-0/+20
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support pending invitation project members importing projects Adds support for pending invitation project members on Import/Export - previously the import would fail. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19973 - [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 !5683
| * | | | | Support pending invitation project members importing projectsJames Lopez2016-08-081-0/+20
| | |_|_|/ | |/| | |
* | | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2016-08-081-0/+5
|\ \ \ \ \ | |/ / / /
| * | | | Add failing test for #7032winniehell2016-08-051-0/+5
| | |/ / | |/| |
* | | | Merge branch ↵Douwe Maan2016-08-051-1/+51
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '14898-protected-branches-developer-can-not-push-without-permission' into 'master' Developer cannot push to protected branch when project is empty or he has not been granted permission to do so This MR was created following !1979 and !1978 Closes #14898 See merge request !1980
| * | | changes default_branch_protection to allow devs_can_merge protection option ↵tiagonbotelho2016-08-041-1/+12
| | | | | | | | | | | | | | | | aswell
| * | | developer cannot push to protected branch when project is empty or he has ↵tiagonbotelho2016-08-021-0/+39
| | | | | | | | | | | | | | | | not been granted permission to do so
* | | | Merge branch '20527-fork-commits-have-impact-on-original-project' into 'master' Rémy Coutable2016-08-041-0/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don’t close issues on original project Closes #20527 -> https://gitlab.com/gitlab-org/gitlab-ce/issues/20527 See merge request !1981
| * | | | Don’t close issues on original project from a forkPaco Guzman2016-08-041-0/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Paco Guzman <pacoguzmanp@gmail.com>
* | | | | Merge branch 'fix/import-error' into 'master' Rémy Coutable2016-08-041-0/+30
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Import/Export error checking versions Fixes small bug preventing the correct error message about Import/Export version being displayed. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20536 - [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 !5638
| * | | | Fix Import/Export error checking versionsfix/import-errorJames Lopez2016-08-031-0/+30
| | |/ / | |/| |