Skip to content
Snippets Groups Projects
Commit 1308dc5e authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent f0707f41
No related branches found
No related tags found
No related merge requests found
Showing
with 74 additions and 18 deletions
Loading
Loading
@@ -61,6 +61,8 @@ class MergeRequest::Pipelines
pipelines.joins(shas_table)
end
 
# NOTE: this method returns only parent merge request pipelines.
# Child merge request pipelines have a different source.
def triggered_by_merge_request
source_project.ci_pipelines
.where(source: :merge_request_event, merge_request: merge_request)
Loading
Loading
Loading
Loading
@@ -5,6 +5,9 @@ class WikiPage
PageChangedError = Class.new(StandardError)
PageRenameError = Class.new(StandardError)
 
MAX_TITLE_BYTES = 245
MAX_DIRECTORY_BYTES = 255
include ActiveModel::Validations
include ActiveModel::Conversion
include StaticModel
Loading
Loading
@@ -51,6 +54,7 @@ class WikiPage
 
validates :title, presence: true
validates :content, presence: true
validate :validate_path_limits, if: :title_changed?
 
# The GitLab ProjectWiki instance.
attr_reader :wiki
Loading
Loading
@@ -262,7 +266,7 @@ class WikiPage
end
 
def title_changed?
title.present? && self.class.unhyphenize(@page.url_path) != title
title.present? && (@page.nil? || self.class.unhyphenize(@page.url_path) != title)
end
 
# Updates the current @attributes hash by merging a hash of params
Loading
Loading
@@ -324,4 +328,16 @@ class WikiPage
set_attributes
@persisted = errors.blank?
end
def validate_path_limits
*dirnames, title = @attributes[:title].split('/')
if title.bytesize > MAX_TITLE_BYTES
errors.add(:title, _("exceeds the limit of %{bytes} bytes for page titles") % { bytes: MAX_TITLE_BYTES })
end
if dirnames.any? { |d| d.bytesize > MAX_DIRECTORY_BYTES }
errors.add(:title, _("exceeds the limit of %{bytes} bytes for directory names") % { bytes: MAX_DIRECTORY_BYTES })
end
end
end
Loading
Loading
@@ -116,7 +116,7 @@ module Ci
 
def merge_request_presenter
strong_memoize(:merge_request_presenter) do
if pipeline.triggered_by_merge_request?
if pipeline.merge_request?
pipeline.merge_request.present(current_user: current_user)
end
end
Loading
Loading
Loading
Loading
@@ -25,7 +25,7 @@ class PipelineEntity < Grape::Entity
expose :flags do
expose :stuck?, as: :stuck
expose :auto_devops_source?, as: :auto_devops
expose :merge_request_event?, as: :merge_request
expose :merge_request?, as: :merge_request
expose :has_yaml_errors?, as: :yaml_errors
expose :can_retry?, as: :retryable
expose :can_cancel?, as: :cancelable
Loading
Loading
@@ -59,11 +59,11 @@ class PipelineEntity < Grape::Entity
 
expose :tag?, as: :tag
expose :branch?, as: :branch
expose :merge_request_event?, as: :merge_request
expose :merge_request?, as: :merge_request
end
 
expose :commit, using: CommitEntity
expose :merge_request_event_type, if: -> (pipeline, _) { pipeline.merge_request_event? }
expose :merge_request_event_type, if: -> (pipeline, _) { pipeline.merge_request? }
expose :source_sha, if: -> (pipeline, _) { pipeline.merge_request_pipeline? }
expose :target_sha, if: -> (pipeline, _) { pipeline.merge_request_pipeline? }
expose :yaml_errors, if: -> (pipeline, _) { pipeline.has_yaml_errors? }
Loading
Loading
@@ -104,7 +104,7 @@ class PipelineEntity < Grape::Entity
end
 
def has_presentable_merge_request?
pipeline.triggered_by_merge_request? &&
pipeline.merge_request? &&
can?(request.current_user, :read_merge_request, pipeline.merge_request)
end
 
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@ module MergeRequests
##
# UpdateMergeRequestsWorker could be retried by an exception.
# pipelines for merge request should not be recreated in such case.
return false if !allow_duplicate && merge_request.find_actual_head_pipeline&.triggered_by_merge_request?
return false if !allow_duplicate && merge_request.find_actual_head_pipeline&.merge_request?
return false if merge_request.has_no_commits?
 
true
Loading
Loading
Loading
Loading
@@ -11,6 +11,7 @@
"no_containers_image" => image_path('illustrations/docker-empty-state.svg'),
"containers_error_image" => image_path('illustrations/docker-error-state.svg'),
"registry_host_url_with_port" => escape_once(registry_config.host_port),
is_group_page: true,
character_error: @character_error.to_s } }
- else
#js-vue-registry-images{ data: { endpoint: group_container_registries_path(@group, format: :json),
Loading
Loading
Loading
Loading
@@ -8,6 +8,6 @@
%button.btn.btn-sm{ "@click" => "cancelDiscardConfirmation(file)" } Cancel
.editor-wrap{ ":class" => "classObject" }
.loading
%i.fa.fa-spinner.fa-spin
.spinner.spinner-md
.editor
%pre{ "style" => "height: 350px" }
Loading
Loading
@@ -11,7 +11,7 @@
#conflicts{ "v-cloak" => "true", data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json),
resolve_conflicts_path: resolve_conflicts_project_merge_request_path(@merge_request.project, @merge_request) } }
.loading{ "v-if" => "isLoading" }
%i.fa.fa-spinner.fa-spin
.spinner.spinner-md
 
.nothing-here-block{ "v-if" => "hasError" }
{{conflictsData.errorMessage}}
Loading
Loading
Loading
Loading
@@ -30,7 +30,8 @@
= dropdown_content
= dropdown_loading
.card-footer
.text-center= icon('spinner spin', class: 'js-source-loading')
.text-center
.js-source-loading.mt-1.spinner.spinner-sm
%ul.list-unstyled.mr_source_commit
 
.col-lg-6
Loading
Loading
@@ -58,7 +59,8 @@
= dropdown_content
= dropdown_loading
.card-footer
.text-center= icon('spinner spin', class: "js-target-loading")
.text-center
.js-target-loading.mt-1.spinner.spinner-sm
%ul.list-unstyled.mr_target_commit
 
- if @merge_request.errors.any?
Loading
Loading
Loading
Loading
@@ -47,4 +47,5 @@
= render 'projects/merge_requests/pipelines', endpoint: url_for(safe_params.merge(action: 'pipelines', format: :json)), disable_initialization: true
 
.mr-loading-status
= spinner
.loading.hide
.spinner.spinner-md
Loading
Loading
@@ -88,7 +88,8 @@
show_whitespace_default: @show_whitespace_default.to_s }
 
.mr-loading-status
= spinner
.loading.hide
.spinner.spinner-md
 
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees
 
Loading
Loading
Loading
Loading
@@ -17,9 +17,13 @@
= icon('lightbulb-o')
- if @page.persisted?
= s_("WikiEditPageTip|Tip: You can move this page by adding the path to the beginning of the title.")
= link_to icon('question-circle'), help_page_path('user/project/wiki/index', anchor: 'moving-a-wiki-page'), target: '_blank'
= link_to icon('question-circle'), help_page_path('user/project/wiki/index', anchor: 'moving-a-wiki-page'),
target: '_blank', rel: 'noopener noreferrer'
- else
= s_("WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories.")
= succeed '.' do
= link_to _('Learn more'), help_page_path('user/project/wiki/index', anchor: 'creating-a-new-wiki-page'),
target: '_blank', rel: 'noopener noreferrer'
.form-group.row
.col-sm-12= f.label :format, class: 'control-label-full-width'
.col-sm-12
Loading
Loading
---
title: Replaced underscore with lodash for spec/javascripts/vue_shared/components
merge_request: 25018
author: Shubham Pandey
type: other
---
title: Limit length of wiki file/directory names
merge_request: 24364
author:
type: changed
---
title: Allow running child pipelines as merge request pipelines
merge_request: 23884
author:
type: fixed
---
title: Fix false matches of substitution-based quick actions in text
merge_request: 24699
author:
type: fixed
Loading
Loading
@@ -119,3 +119,7 @@ This limit can be configured for self hosted installations when [enabling
Elasticsearch](../integration/elasticsearch.md#enabling-elasticsearch).
 
NOTE: **Note:** Set the limit to `0` to disable it.
## Wiki limits
- [Length restrictions for file and directory names](../user/project/wiki/index.md#length-restrictions-for-file-and-directory-names).
Loading
Loading
@@ -65,10 +65,13 @@ maximum memory threshold (in bytes) for the Unicorn worker killer by
setting the following values `/etc/gitlab/gitlab.rb`:
 
```ruby
unicorn['worker_memory_limit_min'] = "400 * 1 << 20"
unicorn['worker_memory_limit_max'] = "650 * 1 << 20"
unicorn['worker_memory_limit_min'] = "1024 * 1 << 20"
unicorn['worker_memory_limit_max'] = "1280 * 1 << 20"
```
 
NOTE: **Note:**
These values apply to GitLab 12.7.0 or newer versions. For older GitLab versions please consult [previous worker memory limits](https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/12.6.0+ee.0/files/gitlab-cookbooks/gitlab/attributes/default.rb#L422-423).
Otherwise, you can set the `GITLAB_UNICORN_MEMORY_MIN` and `GITLAB_UNICORN_MEMORY_MAX`
[environment variables](../environment_variables.md).
 
Loading
Loading
Loading
Loading
@@ -425,10 +425,12 @@ It is also possible to use GraphQL outside of Vue by directly importing
and using the default client with queries.
 
```javascript
import defaultClient from '~/lib/graphql';
import createDefaultClient from '~/lib/graphql';
import query from './query.graphql';
 
defaultClient.query(query)
const defaultClient = createDefaultClient();
defaultClient.query({ query })
.then(result => console.log(result));
```
 
Loading
Loading
doc/install/aws/img/aws_diagram.png

491 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment