summaryrefslogtreecommitdiff
path: root/spec/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'smart-pipeline-duration' into 'master' Rémy Coutable2016-09-081-5/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Smartly calculate real running time and pending time ## What does this MR do? Try to smartly calculate the running time and pending time for pipelines, instead of just use wall clock time from start to end. The algorithm is based on: > Suppose we have A, B, and C jobs: > * A: from 1 to 3 > * B: from 2 to 4 > * C: from 6 to 7 > The processing time should be accumulated from 1 to 4, and 6 to 7, totally 4, excluding retires, and calculate on `%w[success failed running canceled]` jobs (if a job is not finished yet, assume it's `Time.now`) ## Are there points in the code the reviewer needs to double check? I would actually like to test `Gitlab::Ci::PipelineDuration#process_segments`, but it's a private method right now and it's not very convenient to test it. Is there a way to test it without changing the original code too much? Note that I would like to avoid saving merged segments because it's not used and should be garbage collected. ## Screenshots: ![Screen_Shot_2016-09-05_at_6.45.32_PM](/uploads/a82bfaf316661091e383b743a2f11334/Screen_Shot_2016-09-05_at_6.45.32_PM.png) ## 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) - Tests - [x] Added for this feature/bug ## What are the relevant issue numbers? Closes #18260, #19804 See merge request !6084
| * Remove tests for pending_durationLin Jen-Shin2016-09-051-2/+1
| |
| * Just sum all the queuing time, indication for needing more runnersLin Jen-Shin2016-09-021-1/+1
| |
| * Make sure the algorithm did exclude gapsLin Jen-Shin2016-09-021-2/+2
| |
| * Actually we still need to use total - running to get:Lin Jen-Shin2016-09-021-6/+11
| | | | | | | | | | | | real pending time, because that's actually by definition, (the time that it's not running!) or we could end up with awfully complicated algorithm :(
| * Merge remote-tracking branch 'upstream/master' into smart-pipeline-durationLin Jen-Shin2016-09-0214-223/+320
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (289 commits) Fix a typo Change minimum Unicorns required to two Update memory requirements Change the inline code to codeblocks for the new features doc guideline Update CHANGELOG with 8.11.4 entries. removed null return - renamed 'placeTop' to 'placeProfileAvatarsToTop' Change widths of content in MR pipeline tab Add curve to generic commit status pipeline Rubocop syntax 2.3 Some minor updates for upgrade guides for 8.12. Remove inconsistent font weight for sidebar's labels Replace play icon font with svg Project tools visibility level Added todo filter tests Fixed project filtering Review changes, simplified dropdown init Removed select2 from todos feature spec Removed inline JS and improved dropdown labels Added type and action dropdowns, need to finalize by removing all inline and polishing off the selected dropdown states Completed project filter dropdown, still need to move it from inline to ProjectSelect.js (or different) ...
| * | Calculate real queueing time to exclude gaps from:Lin Jen-Shin2016-09-021-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | retries and probably also manual actions! Feedback: * https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14735478 * https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14737804
| * | Fix test for Pipeline#durationLin Jen-Shin2016-08-301-5/+17
| | |
* | | Merge branch 'pipeline-hooks' into 'master' Rémy Coutable2016-09-083-24/+134
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Slack integration for pipeline hooks ## What does this MR do? Add pipeline events to Slack integration ## 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) - Tests - [x] Added for this feature/bug See merge request !5525
| * | | Remove redundant tests, feedback:pipeline-hooksLin Jen-Shin2016-09-062-24/+0
| | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5525#note_14993999
| * | | Merge remote-tracking branch 'upstream/master' into pipeline-hooksLin Jen-Shin2016-09-0615-230/+403
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (368 commits) Don't fail on an empty database Refactor authorization_for_merge_requests.md Support MySQL too, when removing gitorious from import_sources Remove gitorious from import_sources on ApplicationSetting model Add links to new docs in merge_requests.md and workflow/README.md Move merge request versions to its own document Move "Only allow merge requests to be merged if the build succeeds" to new location Move revert_changes.md to new location Move cherry_pick_changes.md to new location Move `wip_merge_requests.md` to a new location Move merge_when_build_succeeds.md to new location Fix missing flash messages on service edit page Move authorization_for_merge_requests.md to new location Move `workflow/merge_requests.md` to `user/project/merge_requests.md` Update README.md Fix randomly failing specs in expand_collapse_diff_spec: Add link on API docs index page Move CHANGELOG entries of !5361, !5451 and !5887 from 8.11 to 8.12 Remove suggested colors hover underline Fix markdown anchor icon interaction ...
| * | | | I am too used to have no spaces around default argsLin Jen-Shin2016-08-292-2/+2
| | | | |
| * | | | Use a completely fake webhook URL, feedback:Lin Jen-Shin2016-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5525#note_14665966
| * | | | empty lines between blocksLin Jen-Shin2016-08-291-1/+1
| | | | |
| * | | | pipeline/build succeeded/failed, feedback:Lin Jen-Shin2016-08-292-4/+4
| | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5525#note_14664613
| * | | | Shorten the line and use methods, feedback:Lin Jen-Shin2016-08-292-12/+21
| | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5525#note_14664637
| * | | | somewhere -> example.gitlab, feedback:Lin Jen-Shin2016-08-292-8/+8
| | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5525#note_14664661
| * | | | Empty line between message =, feedback:Lin Jen-Shin2016-08-292-3/+9
| | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5525#note_14664714
| * | | | Merge remote-tracking branch 'upstream/master' into pipeline-hooksLin Jen-Shin2016-08-266-17/+114
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (107 commits) Fix external issue tracker "Issues" link leading to 404s Fix CHANGELOG entries related to 8.11 release. Fix changelog Reduce contributions calendar data payload Add lock_version to merge_requests table Add hover color to emoji icon Fix wrong Koding link Capitalize mentioned issue timeline notes Fix groups sort dropdown alignment Use icon helper Fix inline emoji text alignment Adds response mime type to transaction metric action when it's not HTML Moved two 8.11 changelog entries to 8.12 Fix markdown link in doc_styleguide.md Display project icon from default branch Reduce number of database queries on builds tab Update CHANGELOG Update Issue board documentation Label list shows all issues (opened or closed) with that label Update CHANGELOG ...
| * | | | Remove old stuffsLin Jen-Shin2016-08-241-2/+2
| | | | |
| * | | | No longer neededLin Jen-Shin2016-08-241-4/+2
| | | | |
| * | | | Merge remote-tracking branch 'upstream/master' into pipeline-hooksLin Jen-Shin2016-08-2462-681/+2603
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (1174 commits) Added CHANGELOG Added unfold test to parallel and added 'diff discussion' context Fix Spinach branches spec Better first match on this MR also Change merge_error column from string to text type Fix typo in gitlab_flow.md entities: make Environment inherit EnvironmentBasic Updated to optimized specs from !5864 Added 'with an unfolded line should not allow commenting' scenario (line 125) Added addtional 'renderable' validator to check 'data-note-type' attr exists Allow passing an index to selectRowAtIndex Fixed enter key in search input not working Fix file links on project page Files view Fix incorrect "stopped impersonation" log message 8.11 is released, long live 8.12 Also check if Akismet is enabled, before showing the `Submit as spam` button. fix location of markdown help location Fix for update 8.10-to-8.11.md doc. Appease the linter. Add Ruby 2.3 upgrade notes. ...
| * \ \ \ \ Merge branch 'master' into pipeline-hooksLin Jen-Shin2016-08-026-44/+340
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (145 commits) Add support for relative links starting with ./ or / to RelativeLinkFilter (!5586) Add failing tests for #19028 Update installation guide for 8.11 Update CHANGELOG for 8.10.3 Catch what warden might throw when profiling requests to re-throw it webhooks: include old revision in MR update events Fix search results for notes without commits API methods should be documented using Grape's DSL Update CHANGELOG Fix RequestProfiler::Middleware error when code is reloaded in development Gitlab::Metrics.current_transaction needs to be public for RailsQueueDuration Fix specs Trim extra displayed carriage returns in diffs and files with CRLFs Avoid line_code and position calculation on line partial for plain view State specific default sort order for issuables refactored wait_for_archived_file method squashed - fixed label and milestone association problems, updated specs and refactored reader class a bit fix return value and spec squashed - fix timing issues in prod importing projects Minor fixes in the Env API endpoints ...
| * | | | | | Add test for running hooks for pipeline after touchedLin Jen-Shin2016-08-011-2/+31
| | | | | | |
| * | | | | | Fix the test due to the format changedLin Jen-Shin2016-08-011-7/+9
| | | | | | |
| * | | | | | Slack pipeline events test and fix some issues along the wayLin Jen-Shin2016-08-011-4/+62
| | | | | | |
| * | | | | | Add pipeline_events to Slack service:Lin Jen-Shin2016-07-301-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add Service#event_names so that we don't have to hard code all event names in ServiceParams. Note that I don't know why we want to call plural on issue_event and merge_request_event so that we still need to hard code them for issues_event and merge_requests_event. See app/helpers/services_helper.rb for those special rules.
| * | | | | | Fix that tricky side-effect issue in the testLin Jen-Shin2016-07-291-2/+4
| | | | | | |
* | | | | | | Merge branch ↵Douwe Maan2016-09-082-59/+74
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '21109-discussion-resolve-runs-a-single-update-query-per-note-but-should-run-a-single-update-query-for-all-notes-instead' into 'master' Optimize discussion notes resolving and unresolving ## What does this MR do? Optimize discussion notes resolving and unresolving ## Are there points in the code the reviewer needs to double check? Some changes had to be made to the discussion spec to account for the fact that notes are not individually updated now. I only focused on adapting them for the purpose of the regression fix, but admittedly they could be further improved in readability. ## 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 - [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) - [ ] 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) ## What are the relevant issue numbers? Closes #21109 See merge request !6141
| * | | | | | | Optimize discussion notes resolving and unresolving21109-discussion-resolve-runs-a-single-update-query-per-note-but-should-run-a-single-update-query-for-all-notes-insteadAlejandro Rodríguez2016-09-062-59/+74
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `update_all` to only require one query per discussion to update the notes resolved status. Some changes had to be made to the discussion spec to accout for the fact that notes are not individually updated now
* | | | | | | Express intentions as expectationsJacob Vosmaer2016-09-071-5/+19
| | | | | | |
* | | | | | | Rename {commit,update_branch}_with_hooksJacob Vosmaer2016-09-071-8/+8
| | | | | | |
* | | | | | | Allow adding multiple commits in commit_with_hooksJacob Vosmaer2016-09-071-0/+19
|/ / / / / /
* | | | | | Merge branch 'safe-ref-updates' into 'master' Douwe Maan2016-09-051-7/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Safer ref updates Use `git update-ref` to prevent clobbering concurrent ref updates. If rugged/libgit2 is temporarily confused, due to concurrent `git gc` for example, then it used to be possible to accidentally reset a ref to an earlier state and lose commits. Because `git update-ref` does not get confused by `git gc`, what will happen now is that the commit based on confused information fails, preventing data loss. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20353 See merge request !6130
| * | | | | | Use 'git update-ref' for safer web commitsJacob Vosmaer2016-09-021-7/+23
| | |_|_|_|/ | |/| | | |
* | | | | | Merge branch 'fix/handle-raw-trace-error-on-old-builds' into 'master' Douwe Maan2016-09-021-0/+60
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle error on trace raw download with old builds (DB stored) ## What does this MR do? Handles error on `raw build trace` download action for old builds (which are stored in DB instead of file). ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? At the beginning build traces were stored in database but at some point we moved to store them in files. All trace related actions are aware of this, but not `raw trace download`. ## What are the relevant issue numbers? Fixes #18900 ## 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 - [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) See merge request !4822
| * | | | | Update specs - add mocks to simulate old versionsTomasz Maczukin2016-09-011-23/+32
| | | | | |
| * | | | | Add specsTomasz Maczukin2016-09-011-0/+51
| | | | | |
* | | | | | Merge branch 'sh-reload-find-branch' into 'master' Yorick Peterse2016-09-011-0/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize branch lookups and force a repository reload for Repository#find_branch See merge request !6087
| * | | | | | Optimize branch lookups and force a repository reload for Repository#find_branchsh-reload-find-branchStan Hu2016-09-011-0/+18
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `git gc` runs and `Repository` has an instance to `Rugged::Repository`, a bug in libgit2 may cause the instance to return a stale value or a missing branch. This change not only optimizes the branch lookup so we don't have to iterate through every branch, but it also works around the `git gc` issue by forcing a repository reload every time `Repository#find_branch` is called. See: https://github.com/libgit2/libgit2/issues/1534 Closes #15392, #21470
* | | | | | Merge branch 'issue_19734' into 'master' Douwe Maan2016-09-015-7/+120
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Project tools visibility level ## part of #19734 ![project_features_access_level](/uploads/81ec7185d4e61d7578652020209af925/project_features_access_level.png) ## 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 !5606
| * | | | | | Project tools visibility levelFelipe Artur2016-09-015-7/+120
| |/ / / / /
* | | | | | Merge branch 'js-tooltips-for-mentions' into 'master' Robert Speicher2016-09-011-10/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use JavaScript tooltips for mentions ## What does this MR do? - use JavaScript tooltips instead of plain title for mentions (issue, merge request, snippet, user, group, commit, commit range, milestone) ## Why was this MR needed? JavaScript tooltips look nicer and can wrap. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5261#note_13106713, fixes #21500 See merge request !5301
| * | | | | | Use JavaScript tooltips for mentions (!5301)winniehell2016-09-011-10/+0
| | | | | | |
* | | | | | | Merge branch '20601-emoji-tooltip-in-chronological-order' into 'master' Robert Speicher2016-09-011-0/+10
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Order award tooltips by their created_at date ## What are the relevant issue numbers? Closes #20601 See merge request !6086
| * | | | | | Order award tooltips by their created_at dateAndrew Smith2016-09-011-0/+10
| | |_|_|_|/ | |/| | | |
* | | | | | don't use a deprecated api in ability_spechttp://jneen.net/2016-08-301-2/+2
| | | | | |
* | | | | | add project_policy_spec to replace .project_abilities spechttp://jneen.net/2016-08-301-64/+0
| | | | | |
* | | | | | remove Ability.abilitieshttp://jneen.net/2016-08-302-14/+11
| | | | | |
* | | | | | remove six, and use a Set insteadhttp://jneen.net/2016-08-302-4/+2
| | | | | |