Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-16 09:12:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-16 09:12:45 +0300
commit3e4c70d0708bdbf27edf4bbd3f01b85a921f759e (patch)
tree58b55a16c96d6f044a5a75253fdf7bce8ab3ee57 /app
parent555976016b899c8507cd58196e6c9f647fa6b19e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/boards/components/board_content.vue4
-rw-r--r--app/assets/javascripts/boards/components/board_list.vue4
-rw-r--r--app/assets/javascripts/sortable/constants.js1
-rw-r--r--app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue3
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue4
-rw-r--r--app/models/ci/pipeline.rb11
-rw-r--r--app/models/concerns/enums/ci/pipeline.rb12
-rw-r--r--app/models/service_desk/custom_email_credential.rb2
-rw-r--r--app/presenters/ci/pipeline_presenter.rb5
9 files changed, 38 insertions, 8 deletions
diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue
index 9560f0e5fef..2b9c5d52d5e 100644
--- a/app/assets/javascripts/boards/components/board_content.vue
+++ b/app/assets/javascripts/boards/components/board_content.vue
@@ -5,7 +5,7 @@ import produce from 'immer';
import Draggable from 'vuedraggable';
import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue';
import { s__ } from '~/locale';
-import { defaultSortableOptions } from '~/sortable/constants';
+import { defaultSortableOptions, DRAG_DELAY } from '~/sortable/constants';
import {
DraggableItemTypes,
flashAnimationDuration,
@@ -89,7 +89,7 @@ export default {
group: 'boards-list',
tag: 'div',
value: this.boardListsToUse,
- delay: 100,
+ delay: DRAG_DELAY,
delayOnTouchOnly: true,
filter: 'input',
preventOnFilter: false,
diff --git a/app/assets/javascripts/boards/components/board_list.vue b/app/assets/javascripts/boards/components/board_list.vue
index 4bbc360de72..8a5c6882e56 100644
--- a/app/assets/javascripts/boards/components/board_list.vue
+++ b/app/assets/javascripts/boards/components/board_list.vue
@@ -3,7 +3,7 @@ import { GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui';
import Draggable from 'vuedraggable';
import { STATUS_CLOSED } from '~/issues/constants';
import { sprintf, __, s__ } from '~/locale';
-import { defaultSortableOptions } from '~/sortable/constants';
+import { defaultSortableOptions, DRAG_DELAY } from '~/sortable/constants';
import { sortableStart, sortableEnd } from '~/sortable/utils';
import Tracking from '~/tracking';
import listQuery from 'ee_else_ce/boards/graphql/board_lists_deferred.query.graphql';
@@ -218,7 +218,7 @@ export default {
'ghost-class': 'board-card-drag-active',
'data-list-id': this.list.id,
value: this.boardListItems,
- delay: 100,
+ delay: DRAG_DELAY,
delayOnTouchOnly: true,
};
diff --git a/app/assets/javascripts/sortable/constants.js b/app/assets/javascripts/sortable/constants.js
index f5bb0a3b11f..eac8033448b 100644
--- a/app/assets/javascripts/sortable/constants.js
+++ b/app/assets/javascripts/sortable/constants.js
@@ -1,4 +1,5 @@
export const DRAG_CLASS = 'is-dragging';
+export const DRAG_DELAY = 100;
/**
* Default config options for sortablejs.
diff --git a/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue b/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue
index 0db7417cebc..ad908a674d3 100644
--- a/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue
+++ b/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue
@@ -6,6 +6,7 @@ import PageSizeSelector from '~/vue_shared/components/page_size_selector.vue';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import { updateHistory, setUrlParams } from '~/lib/utils/url_utility';
import { __ } from '~/locale';
+import { DRAG_DELAY } from '~/sortable/constants';
import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
@@ -24,6 +25,8 @@ export default {
forceFallback: true,
ghostClass: 'gl-visibility-hidden',
tag: 'ul',
+ delay: DRAG_DELAY,
+ delayOnTouchOnly: true,
},
components: {
GlAlert,
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue
index b6ea09edbd4..ca62f3c4693 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue
@@ -6,7 +6,7 @@ import * as Sentry from '~/sentry/sentry_browser_wrapper';
import { isLoggedIn } from '~/lib/utils/common_utils';
import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants';
import { s__ } from '~/locale';
-import { defaultSortableOptions } from '~/sortable/constants';
+import { defaultSortableOptions, DRAG_DELAY } from '~/sortable/constants';
import { WORK_ITEM_TYPE_VALUE_OBJECTIVE } from '../../constants';
import { findHierarchyWidgets } from '../../utils';
@@ -77,6 +77,8 @@ export default {
'ghost-class': 'tree-item-drag-active',
'data-parent-id': this.workItemId,
value: this.children,
+ delay: DRAG_DELAY,
+ delayOnTouchOnly: true,
};
return this.canReorder ? options : {};
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 14fd8db5dde..9d5b2e5a0b1 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -824,6 +824,13 @@ module Ci
add_message(:warning, content)
end
+ # Like #drop!, but does not persist the pipeline nor trigger any state
+ # machine callbacks.
+ def set_failed(drop_reason)
+ self.failure_reason = drop_reason.to_s
+ self.status = 'failed'
+ end
+
# We can't use `messages.error` scope here because messages should also be
# read when the pipeline is not persisted. Using the scope will return no
# results as it would query persisted data.
@@ -1073,6 +1080,10 @@ module Ci
persisted? && failure_reason.blank?
end
+ def filtered_as_empty?
+ filtered_by_rules? || filtered_by_workflow_rules?
+ end
+
def detailed_status(current_user)
Gitlab::Ci::Status::Pipeline::Factory
.new(self.present, current_user)
diff --git a/app/models/concerns/enums/ci/pipeline.rb b/app/models/concerns/enums/ci/pipeline.rb
index f5ffeb8c425..7dd9dece5e0 100644
--- a/app/models/concerns/enums/ci/pipeline.rb
+++ b/app/models/concerns/enums/ci/pipeline.rb
@@ -15,10 +15,20 @@ module Enums
job_activity_limit_exceeded: 22,
deployments_limit_exceeded: 23,
# 24 was previously used by the deprecated `user_blocked`
- project_deleted: 25
+ project_deleted: 25,
+ filtered_by_rules: 26,
+ filtered_by_workflow_rules: 27
}
end
+ def self.persistable_failure_reasons
+ failure_reasons.except(:filtered_by_rules, :filtered_by_workflow_rules)
+ end
+
+ def self.persistable_failure_reason?(reason)
+ persistable_failure_reasons.include?(reason)
+ end
+
# Returns the `Hash` to use for creating the `sources` enum for
# `Ci::Pipeline`.
def self.sources
diff --git a/app/models/service_desk/custom_email_credential.rb b/app/models/service_desk/custom_email_credential.rb
index 82bda673491..7ae44ac6aa1 100644
--- a/app/models/service_desk/custom_email_credential.rb
+++ b/app/models/service_desk/custom_email_credential.rb
@@ -66,7 +66,7 @@ module ServiceDesk
ascii_only: true,
enforce_sanitization: true,
allow_localhost: false,
- allow_local_network: false
+ allow_local_network: !::Gitlab.com? # rubocop:disable Gitlab/AvoidGitlabInstanceChecks -- self-managed may also use local network
)
rescue Gitlab::HTTP_V2::UrlBlocker::BlockedUrlError => e
errors.add(:smtp_address, e)
diff --git a/app/presenters/ci/pipeline_presenter.rb b/app/presenters/ci/pipeline_presenter.rb
index 0bf4a99dcba..37dbc2918ec 100644
--- a/app/presenters/ci/pipeline_presenter.rb
+++ b/app/presenters/ci/pipeline_presenter.rb
@@ -16,7 +16,10 @@ module Ci
size_limit_exceeded: 'The pipeline size limit was exceeded.',
job_activity_limit_exceeded: 'The pipeline job activity limit was exceeded.',
deployments_limit_exceeded: 'The pipeline deployments limit was exceeded.',
- project_deleted: 'The project associated with this pipeline was deleted.' }
+ project_deleted: 'The project associated with this pipeline was deleted.',
+ filtered_by_rules: 'Pipeline will not run for the selected trigger. ' \
+ 'The rules configuration prevented any jobs from being added to the pipeline.',
+ filtered_by_workflow_rules: 'Pipeline filtered out by workflow rules.' }
end
presents ::Ci::Pipeline, as: :pipeline