summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge branch 'sh-fix-discussions-api-perf' into 'master'Douglas Barbosa Alexandre2019-08-151-10/+16
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate many Gitaly calls in discussions API Closes #65957 See merge request gitlab-org/gitlab-ce!31834
| * | | | | | | | Eliminate many Gitaly calls in discussions APIStan Hu2019-08-151-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the API to retrieve discussions from merge requests often generated hundreds of Gitaly calls to determine whether a system note should be shown to the user. It did this by: 1. Rendering the Markdown 2. Extracting cross-references from the Markdown 3. For cross-references that were commits, a Gitaly FindCommit RPC would be issued to validate that the commit exists. The last step is unnecessary because we don't need to display a commit if the user doesn't have access to the project in the first place. `RendersNotes#prepare_notes_for_rendering` is already used in `MergeRequestsController`, which is why we don't see N+1 Gitaly calls there. We use it here to optimize the note redaction process. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
* | | | | | | | | Merge branch 'fix-broken-ee-master-prepend-todos-api' into 'master'Stan Hu2019-08-151-0/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds EE prepend, which for some reason was missing See merge request gitlab-org/gitlab-ce!31851
| * | | | | | | | | Adds EE prepend, which for some reason was missingfix-broken-ee-master-prepend-todos-apiAlex Kalderimis2019-08-151-0/+2
| | | | | | | | | |
* | | | | | | | | | Merge branch '65278-livesum-puma-phase' into 'master'Kamil TrzciƄski2019-08-151-3/+0
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove :puma_phase metrics See merge request gitlab-org/gitlab-ce!31773
| * | | | | | | | | | Remove :puma_phase metrics65278-livesum-puma-phaseAleksei Lipniagov2019-08-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't use phase restarts, as we use `preload_app`: https://github.com/puma/puma/blob/master/README.md#clustered-mode `:puma_phase` values will always be zero.
* | | | | | | | | | | Remove prepend_if_ee from CE codebaseLuke Duncalfe2019-08-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31789
* | | | | | | | | | | CE-specific changes to allow design Todos13494-todo-s-not-rendering-when-there-is-a-design-management-related-todo-ceLuke Duncalfe2019-08-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CE-specific changes for: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15129 Co-Authored-By: Alex Kalderimis <akalderimis@gitlab.com> Co-Authored-By: Luke Duncalfe <lduncalfe@eml.cc>
* | | | | | | | | | | Make ruby 2.6 the officially supported versionHordur Freyr Yngvason2019-08-141-1/+1
| | | | | | | | | | |
* | | | | | | | | | | Make use of Gitlab::KubernetesJoĂŁo Cunha2019-08-142-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - refactor Knative and Prometheus
* | | | | | | | | | | Migrates Snowplow backend from EE to CEJeremy Jackson2019-08-142-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces several changes, but these are all just ported from the EE project.
* | | | | | | | | | | Track page views for cycle analytics show pageAdam Hegyi2019-08-142-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new counter 'cycle_analytics_views' to the usage data metrics to count the page views for cycle analytics show page.
* | | | | | | | | | | Merge branch 'limit-amount-of-needs' into 'master'Grzegorz Bizon2019-08-141-1/+19
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `ci_dag_limit_needs` See merge request gitlab-org/gitlab-ce!31803
| * | | | | | | | | | | Add `ci_dag_limit_needs` feature flaglimit-amount-of-needsKamil TrzciƄski2019-08-141-1/+19
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes to limit `needs:` to 5 by default. Allow to increase the limit to 50 with disable of FF.
* | | | | | | | | | | Merge branch 'sh-optimize-commit-deltas-post-receive' into 'master'Nick Thomas2019-08-141-2/+3
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce Gitaly calls in PostReceive Closes #65878 See merge request gitlab-org/gitlab-ce!31741
| * | | | | | | | | | Reduce Gitaly calls in PostReceivesh-optimize-commit-deltas-post-receiveStan Hu2019-08-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reduces I/O load and memory utilization during PostReceive for the common case when no project hooks or services are set up. We saw a Gitaly N+1 issue in `CommitDelta` when many tags or branches are pushed. We can reduce this overhead in the common case because we observe that most new projects do not have any Web hooks or services, especially when they are first created. Previously, `BaseHooksService` unconditionally iterated through the last 20 commits of each ref to build the `push_data` structure. The `push_data` structured was used in numerous places: 1. Building the push payload in `EventCreateService` 2. Creating a CI pipeline 3. Executing project Web or system hooks 4. Executing project services 5. As the return value of `BaseHooksService#execute` 6. `BranchHooksService#invalidated_file_types` We only need to generate the full `push_data` for items 3, 4, and 6. Item 1: `EventCreateService` only needs the last commit and doesn't actually need the commit deltas. Item 2: In addition, `Ci::CreatePipelineService` only needed a subset of the parameters. Item 5: The return value of `BaseHooksService#execute` also wasn't being used anywhere. Item 6: This is only used when pushing to the default branch, so if many tags are pushed we can save significant I/O here. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65878 Fic
* | | | | | | | | | | Merge branch 'require-needs-to-be-present' into 'master'Grzegorz Bizon2019-08-144-20/+47
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Require `needs:` to be present Closes #65839 See merge request gitlab-org/gitlab-ce!31761
| * | | | | | | | | | Require `needs:` to be presentrequire-needs-to-be-presentKamil TrzciƄski2019-08-134-20/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the `needs:` logic to require that all jobs to be present. Instead of skipping do fail the pipeline creation if `needs:` dependency is not found.
* | | | | | | | | | | Add usage pings for source code pushesIgor2019-08-132-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Source Code Usage Ping for Create SMAU
* | | | | | | | | | | Merge branch 'bump_helm_kubectl_gitlab' into 'master'Douglas Barbosa Alexandre2019-08-131-2/+2
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump Helm to 2.14.3 and kubectl to 1.11.10 See merge request gitlab-org/gitlab-ce!31716
| * | | | | | | | | | | Bump Helm to 2.14.3 and kubectl to 1.11.10bump_helm_kubectl_gitlabThong Kuah2019-08-131-2/+2
| | |_|_|_|/ / / / / / | |/| | | | | | | | |
* | | | | | | | | | | Merge branch 'expand-variables-only-when-needed' into 'master'Stan Hu2019-08-131-3/+15
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand variables only when needed See merge request gitlab-org/gitlab-ce!31772
| * | | | | | | | | | | Expand variables only when neededKamil TrzciƄski2019-08-131-3/+15
| | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes us to expand variables only when needed, instead of requesting all variables each time. This specifically helps in situation when explicit name of `environment: production` is used.
* | | | | | | | | | | Only expire tag cache once per pushsh-only-flush-tags-once-per-pushStan Hu2019-08-131-0/+6
| |_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously each tag in a push would invoke the Gitaly `FindAllTags` RPC since the tag cache would be invalidated with every tag. We can eliminate those extraneous calls by expiring the tag cache once in `PostReceive` and taking advantage of the cached tags. Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/65795
* | | | | | | | | | Merge branch '65803-invalidate-branches-cache-on-refresh' into 'master'Bob Van Landuyt2019-08-131-0/+6
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only expire branch cache once per push See merge request gitlab-org/gitlab-ce!31653
| * | | | | | | | | Rename branches_exist? -> includes_branches?65803-invalidate-branches-cache-on-refreshStan Hu2019-08-091-5/+3
| | | | | | | | | |
| * | | | | | | | | Invalidate branches cache on PostReceivePatrick Bajao2019-08-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever `PostReceive` is enqueued, `UpdateMergeRequestsWorker` is enqueued and `MergeRequests::RefreshService` is called, it'll check if the source branch of each MR asssociated to the push exists or not via `MergeRequest#source_branch_exists?`. The said method will call `Repository#branch_exists?` which is cached in `Rails.cache`. When the cache contains outdated data and the source branch actually exists, the `MergeRequests#RefreshService` job will close associated MRs which is not correct. The fix is to expire the branches cache of the project so we have updated data during the post receive hook which will help in the accuracy of the check if we need to close associated MRs or not.
* | | | | | | | | | Require `stage:` to be set with `needs:`Kamil TrzciƄski2019-08-133-0/+18
| |_|_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we are unsure what would be the behavior of `stage:` when we work on DAG. Let's make `stage:` to be required today with `needs:`.
* | | | | | | | | Upgrade Gitaly to v1.59.0GitalyBot2019-08-131-1/+1
| |_|/ / / / / / |/| | | | | | |
* | | | | | | | Improve quick action error messagesHeinrich Lee Yu2019-08-133-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Standardize punctuation and format
* | | | | | | | Merge branch 'ce-12547-load-search-counts-async' into 'master'Michael Kozono2019-08-123-0/+49
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load search result counts asynchronously (CE) See merge request gitlab-org/gitlab-ce!31663
| * | | | | | | | Load search result counts asynchronouslyMarkus Koller2019-08-123-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Querying all counts for the different search results in the same request led to timeouts, so we now only calculate the count for the *current* search results, and request the others in separate asynchronous calls.
* | | | | | | | | Merge branch 'sh-fix-import-export-suggestions' into 'master'Michael Kozono2019-08-121-1/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly save suggestions in project exports Closes #65880 See merge request gitlab-org/gitlab-ce!31690
| * | | | | | | | Properly save suggestions in project exportssh-fix-import-export-suggestionsStan Hu2019-08-101-1/+1
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously imports would fail if a merge request note included a suggestion with an `ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection` exception. This was happening because suggestions were listed as a descendant of merge requests, but this doesn't work because suggestions are directly associated with notes, not merge requests, and that association is lost. Rails also disallows creating intializing a has_many association through a different object. We fix this by making `suggestions` a child of `notes` within a merge request. This doesn't fix previously broken exported project exports, but new exports will work. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65880
* | | | | | | | Merge branch '65790-highlight' into 'master'Annabel Dunstone Gray2019-08-121-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds highlight to collapsible line in job log Closes #65790 See merge request gitlab-org/gitlab-ce!31665
| * | | | | | | | Adds highlight to collapsible lineFilipa Lacerda2019-08-121-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the job log adds a highlight when hovering the collapsible line
* | | | | | | | Merge branch '65278-fix-puma-master-counter-wipe' into 'master'Stan Hu2019-08-121-3/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix active metric files being wiped after the app starts See merge request gitlab-org/gitlab-ce!31668
| * | | | | | | | Remove worker label from puma terminations metric65278-fix-puma-master-counter-wipeAleksei Lipniagov2019-08-121-3/+1
| |/ / / / / / /
* | | | | | | | Update Gitaly server and gem to 1.58.0Jacob Vosmaer2019-08-121-22/+0
| | | | | | | |
* | | | | | | | Merge branch 'georgekoltsov/63408-user-mapping' into 'master'Grzegorz Bizon2019-08-124-4/+10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add author lines to project import comments See merge request gitlab-org/gitlab-ce!31579
| * | | | | | | | Add code review suggestionsGeorge Koltsov2019-08-121-4/+4
| | | | | | | | |
| * | | | | | | | Apply code review feedbackGeorge Koltsov2019-08-081-6/+4
| | | | | | | | |
| * | | | | | | | Add author lines to project import commentsGeorge Koltsov2019-08-074-5/+13
| | | | | | | | |
* | | | | | | | | Add changelog entryGeorge Koltsov2019-08-121-1/+1
| | | | | | | | |
* | | | | | | | | Add BitBucketServerImport project filteringGeorge Koltsov2019-08-121-1/+2
| |/ / / / / / / |/| | | | | | |
* | | | | | | | Split MR widget into cached and non-cached serializersIgor2019-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Splits auto-refreshing of MR widget into 2 requests: - the one which uses etag-caching and invalidates the fields on change - the one without caching The idea is to gradually move all the fields to etag-cached endpoint
* | | | | | | | Merge branch 'issue_58494' into 'master'Robert Speicher2019-08-091-1/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent rewritting plain links as embedded Closes #58494 See merge request gitlab-org/gitlab-ce!31489
| * | | | | | | | Prevent rewritting plain links as embeddedissue_58494Felipe Artur2019-08-071-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents rewritting plain image/video links as embedded when moving issues.
* | | | | | | | | Remove gfm_embed_metrics flag from BETristan Read2019-08-093-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the feature flag that controls whether metrics dashboard urls unfurl the metrics dashboard charts.
* | | | | | | | | Merge branch 'revert-d61dab91' into 'master'Bob Van Landuyt2019-08-092-8/+7
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "Merge branch '65152-selective-highlight' into 'master'" See merge request gitlab-org/gitlab-ce!31643