summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-18 03:10:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-18 03:10:18 +0000
commitb7a1160154d52bad5af11a8155369de827df2f74 (patch)
tree54283ee30127d2111a87d3130a13e8799b99890a
parent9f61aba53f7d9562b524496dd1686dc1591f0d7c (diff)
downloadgitlab-ce-b7a1160154d52bad5af11a8155369de827df2f74.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue9
-rw-r--r--app/assets/javascripts/nav/components/top_nav_menu_item.vue2
-rw-r--r--app/assets/javascripts/nav/components/top_nav_menu_sections.vue2
-rw-r--r--app/helpers/nav/top_nav_helper.rb2
-rw-r--r--app/models/ci/build.rb3
-rw-r--r--app/models/integration.rb1
-rw-r--r--app/models/project.rb8
-rw-r--r--config/feature_flags/development/ci_builds_tokens_required_encryption.yml8
-rw-r--r--doc/administration/operations/puma.md147
-rw-r--r--doc/install/requirements.md10
-rw-r--r--doc/user/application_security/sast/index.md2
-rw-r--r--lib/gitlab/ci/features.rb4
-rw-r--r--spec/factories/integrations.rb2
-rw-r--r--spec/frontend/frequent_items/components/frequent_items_list_item_spec.js16
-rw-r--r--spec/frontend/nav/components/top_nav_menu_item_spec.js2
-rw-r--r--spec/helpers/nav/top_nav_helper_spec.rb12
-rw-r--r--spec/lib/gitlab/import_export/all_models.yml8
-rw-r--r--spec/models/ci/pipeline_spec.rb2
-rw-r--r--spec/models/integrations/packagist_spec.rb4
-rw-r--r--spec/models/project_spec.rb8
-rw-r--r--spec/services/integrations/test/project_service_spec.rb4
21 files changed, 194 insertions, 62 deletions
diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue
index d6fcdeb9e13..7b169b68d20 100644
--- a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue
+++ b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue
@@ -1,5 +1,6 @@
<script>
/* eslint-disable vue/require-default-prop, vue/no-v-html */
+import { GlButton } from '@gitlab/ui';
import highlight from '~/lib/utils/highlight';
import { truncateNamespace } from '~/lib/utils/text_utility';
import { mapVuexModuleState } from '~/lib/utils/vuex_module_mappers';
@@ -11,6 +12,7 @@ const trackingMixin = Tracking.mixin();
export default {
components: {
Identicon,
+ GlButton,
},
mixins: [trackingMixin],
inject: ['vuexModule'],
@@ -56,9 +58,10 @@ export default {
<template>
<li class="frequent-items-list-item-container">
- <a
+ <gl-button
+ category="tertiary"
:href="webUrl"
- class="clearfix dropdown-item"
+ class="gl-text-left gl-justify-content-start!"
@click="track('click_link', { label: `${dropdownType}_dropdown_frequent_items_list_item` })"
>
<div
@@ -90,6 +93,6 @@ export default {
{{ truncatedNamespace }}
</div>
</div>
- </a>
+ </gl-button>
</li>
</template>
diff --git a/app/assets/javascripts/nav/components/top_nav_menu_item.vue b/app/assets/javascripts/nav/components/top_nav_menu_item.vue
index 08b2fbf2ed1..07c6fa7773a 100644
--- a/app/assets/javascripts/nav/components/top_nav_menu_item.vue
+++ b/app/assets/javascripts/nav/components/top_nav_menu_item.vue
@@ -42,7 +42,7 @@ export default {
v-on="$listeners"
>
<span class="gl-display-flex">
- <gl-icon v-if="menuItem.icon" :name="menuItem.icon" :class="{ 'gl-mr-2!': !iconOnly }" />
+ <gl-icon v-if="menuItem.icon" :name="menuItem.icon" :class="{ 'gl-mr-3!': !iconOnly }" />
<template v-if="!iconOnly">
{{ menuItem.title }}
<gl-icon v-if="menuItem.view" name="chevron-right" class="gl-ml-auto" />
diff --git a/app/assets/javascripts/nav/components/top_nav_menu_sections.vue b/app/assets/javascripts/nav/components/top_nav_menu_sections.vue
index 442af512350..b8555df53df 100644
--- a/app/assets/javascripts/nav/components/top_nav_menu_sections.vue
+++ b/app/assets/javascripts/nav/components/top_nav_menu_sections.vue
@@ -1,7 +1,7 @@
<script>
import TopNavMenuItem from './top_nav_menu_item.vue';
-const BORDER_CLASSES = 'gl-pt-3 gl-border-1 gl-border-t-solid gl-border-gray-100';
+const BORDER_CLASSES = 'gl-pt-3 gl-border-1 gl-border-t-solid gl-border-gray-50';
export default {
components: {
diff --git a/app/helpers/nav/top_nav_helper.rb b/app/helpers/nav/top_nav_helper.rb
index b8ddb932b73..0e326ca6b96 100644
--- a/app/helpers/nav/top_nav_helper.rb
+++ b/app/helpers/nav/top_nav_helper.rb
@@ -22,7 +22,7 @@ module Nav
new_view_model = new_dropdown_view_model(project: project, group: group)
- if new_view_model
+ if new_view_model && new_view_model.fetch(:menu_sections)&.any?
builder.add_view(NEW_VIEW, new_view_model)
end
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index fdfffd9b0cd..75557dad1ce 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -212,7 +212,8 @@ module Ci
acts_as_taggable
- add_authentication_token_field :token, encrypted: :optional
+ add_authentication_token_field :token,
+ encrypted: -> { Gitlab::Ci::Features.require_builds_token_encryption? ? :required : :optional }
before_save :ensure_token
before_destroy { unscoped_project }
diff --git a/app/models/integration.rb b/app/models/integration.rb
index 2fbcdc7f1cb..cad4d3d7483 100644
--- a/app/models/integration.rb
+++ b/app/models/integration.rb
@@ -48,6 +48,7 @@ class Integration < ApplicationRecord
flowdock
hangouts_chat
irker
+ packagist pipelines_email pivotaltracker pushover
].to_set.freeze
def self.renamed?(name)
diff --git a/app/models/project.rb b/app/models/project.rb
index 1f8e8b81015..d7c573149d1 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -178,10 +178,10 @@ class Project < ApplicationRecord
has_one :mattermost_slash_commands_service, class_name: 'Integrations::MattermostSlashCommands'
has_one :microsoft_teams_service, class_name: 'Integrations::MicrosoftTeams'
has_one :mock_ci_service, class_name: 'Integrations::MockCi'
- has_one :packagist_service, class_name: 'Integrations::Packagist'
- has_one :pipelines_email_service, class_name: 'Integrations::PipelinesEmail'
- has_one :pivotaltracker_service, class_name: 'Integrations::Pivotaltracker'
- has_one :pushover_service, class_name: 'Integrations::Pushover'
+ has_one :packagist_integration, class_name: 'Integrations::Packagist'
+ has_one :pipelines_email_integration, class_name: 'Integrations::PipelinesEmail'
+ has_one :pivotaltracker_integration, class_name: 'Integrations::Pivotaltracker'
+ has_one :pushover_integration, class_name: 'Integrations::Pushover'
has_one :redmine_service, class_name: 'Integrations::Redmine'
has_one :slack_service, class_name: 'Integrations::Slack'
has_one :slack_slash_commands_service, class_name: 'Integrations::SlackSlashCommands'
diff --git a/config/feature_flags/development/ci_builds_tokens_required_encryption.yml b/config/feature_flags/development/ci_builds_tokens_required_encryption.yml
new file mode 100644
index 00000000000..de5a9e54e6e
--- /dev/null
+++ b/config/feature_flags/development/ci_builds_tokens_required_encryption.yml
@@ -0,0 +1,8 @@
+---
+name: ci_builds_tokens_required_encryption
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63874
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/333566
+milestone: '14.0'
+type: development
+group: group::pipeline execution
+default_enabled: false
diff --git a/doc/administration/operations/puma.md b/doc/administration/operations/puma.md
index fffff78b9d6..120d864147a 100644
--- a/doc/administration/operations/puma.md
+++ b/doc/administration/operations/puma.md
@@ -4,35 +4,100 @@ group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
-# Switching to Puma **(FREE SELF)**
+# Puma **(FREE SELF)**
-As of GitLab 12.9, [Puma](https://github.com/puma/puma) has replaced [Unicorn](https://yhbt.net/unicorn/)
-as the default web server. From GitLab 14.0, the following run Puma:
+NOTE:
+Starting with GitLab 13.0, Puma
+is the default web server and Unicorn has been
+disabled by default. In GitLab 14.0, Unicorn was removed from the Linux package
+and only Puma is available.
-- All-in-one package-based installations.
-- Helm chart-based installations.
+Puma is a simple, fast, multi-threaded, and highly concurrent HTTP 1.1 server for
+Ruby applications. It's the default GitLab web server since GitLab 13.0
+and has replaced Unicorn. From GitLab 14.0, Unicorn is no longer supported.
-## Why switch to Puma?
+## Configure Puma
-Puma has a multi-thread architecture which uses less memory than a multi-process
-application server like Unicorn. On GitLab.com, we saw a 40% reduction in memory
-consumption.
+To configure Puma:
-Most Rails applications requests normally include a proportion of I/O wait time.
-During I/O wait time MRI Ruby will release the GVL (Global VM Lock) to other threads.
-Multi-threaded Puma can therefore still serve more requests than a single process.
+1. Determine suitable Puma worker and thread [settings](../../install/requirements.md#puma-settings).
+1. If you're swithcing from Unicorn, [convert any custom settings to Puma](#convert-unicorn-settings-to-puma).
+1. For multi-node deployments, configure the load balancer to use the
+ [readiness check](../load_balancer.md#readiness-check).
+1. Reconfigure GitLab so the above changes take effect:
+
+ ```shell
+ sudo gitlab-ctl reconfigure
+ ```
+
+For Helm based deployments, see the
+[`webservice` chart documentation](https://docs.gitlab.com/charts/charts/gitlab/webservice/index.html).
+
+For more details about the Puma configuration, see the
+[Puma documentation](https://github.com/puma/puma#configuration).
+
+## Puma Worker Killer
+
+By default, the [Puma Worker Killer](https://github.com/schneems/puma_worker_killer) will restart
+a worker if it exceeds a [memory limit](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/cluster/puma_worker_killer_initializer.rb). Additionally, rolling restarts of
+Puma workers are performed every 12 hours.
+
+To change the memory limit setting:
+
+1. Edit `/etc/gitlab/gitlab.rb`:
+
+ ```ruby
+ puma['per_worker_max_memory_mb'] = 1024
+ ```
+
+1. Reconfigure GitLab for the changes to take effect:
+
+ ```shell
+ sudo gitlab-ctl reconfigure
+ ```
+
+## Worker timeout
+
+A [timeout of 60 seconds](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/initializers/rack_timeout.rb)
+is used when Puma is enabled.
+
+NOTE:
+Unlike Unicorn, the `puma['worker_timeout']` setting does not set the maximum request duration.
-## Configuring Puma to replace Unicorn
+To change the worker timeout:
-Beginning with GitLab 13.0, Puma is the default application server. We removed support for
-Unicorn in GitLab 14.0.
+1. Edit `/etc/gitlab/gitlab.rb`:
-When switching to Puma, Unicorn server configuration
-will _not_ carry over automatically, due to differences between the two application servers. For Omnibus-based
-deployments, see [Configuring Puma Settings](https://docs.gitlab.com/omnibus/settings/puma.html#configuring-puma-settings).
-For Helm based deployments, see the [`webservice` chart documentation](https://docs.gitlab.com/charts/charts/gitlab/webservice/index.html).
+ ```ruby
+ gitlab_rails['env'] = {
+ 'GITLAB_RAILS_RACK_TIMEOUT' => 600
+ }
+ ```
-Additionally we strongly recommend that multi-node deployments [configure their load balancers to use the readiness check](../load_balancer.md#readiness-check) due to a difference between Unicorn and Puma in how they handle connections during a restart of the service.
+1. Reconfigure GitLab for the changes to take effect:
+
+ ```shell
+ sudo gitlab-ctl reconfigure
+ ```
+
+## Running in memory-constrained environments
+
+In a memory-constrained environment with less than 4GB of RAM available, consider disabling Puma [Clustered mode](https://github.com/puma/puma#clustered-mode).
+
+Configuring Puma by setting the amount of `workers` to `0` could reduce memory usage by hundreds of MB.
+For details on Puma worker and thread settings, see the [Puma requirements](../../install/requirements.md#puma-settings).
+
+Unlike in a Clustered mode, which is set up by default, only a single Puma process would serve the application.
+
+The downside of running Puma with such configuration is the reduced throughput, and it could be considered as a fair tradeoff in a memory-constraint environment.
+
+When running Puma in Single mode, some features are not supported:
+
+- Phased restart will not work: [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/300665)
+- [Phased restart](https://gitlab.com/gitlab-org/gitlab/-/issues/300665)
+- [Puma Worker Killer](https://gitlab.com/gitlab-org/gitlab/-/issues/300664)
+
+To learn more, visit [epic 5303](https://gitlab.com/groups/gitlab-org/-/epics/5303).
## Performance caveat when using Puma with Rugged
@@ -66,3 +131,45 @@ optimal configuration:
Rugged, single-threaded Puma works the same as Unicorn.
- To force Rugged to be used with multi-threaded Puma, you can use
[feature flags](../../development/gitaly.md#legacy-rugged-code).
+
+## Convert Unicorn settings to Puma
+
+NOTE:
+Starting with GitLab 13.0, Puma is the default web server and Unicorn has been
+disabled by default. In GitLab 14.0, Unicorn was removed from the Linux package
+and only Puma is available.
+
+Puma has a multi-thread architecture which uses less memory than a multi-process
+application server like Unicorn. On GitLab.com, we saw a 40% reduction in memory
+consumption. Most Rails applications requests normally include a proportion of I/O wait time.
+During I/O wait time MRI Ruby will release the GVL (Global VM Lock) to other threads.
+Multi-threaded Puma can therefore still serve more requests than a single process.
+
+When switching to Puma, any Unicorn server configuration will _not_ carry over
+automatically, due to differences between the two application servers.
+
+The table below summarizes which Unicorn configuration keys correspond to those
+in Puma when using the Linux package, and which ones have no corresponding counterpart.
+
+| Unicorn | Puma |
+| ------------------------------------ | ---------------------------------- |
+| `unicorn['enable']` | `puma['enable']` |
+| `unicorn['worker_timeout']` | `puma['worker_timeout']` |
+| `unicorn['worker_processes']` | `puma['worker_processes']` |
+| n/a | `puma['ha']` |
+| n/a | `puma['min_threads']` |
+| n/a | `puma['max_threads']` |
+| `unicorn['listen']` | `puma['listen']` |
+| `unicorn['port']` | `puma['port']` |
+| `unicorn['socket']` | `puma['socket']` |
+| `unicorn['pidfile']` | `puma['pidfile']` |
+| `unicorn['tcp_nopush']` | n/a |
+| `unicorn['backlog_socket']` | n/a |
+| `unicorn['somaxconn']` | `puma['somaxconn']` |
+| n/a | `puma['state_path']` |
+| `unicorn['log_directory']` | `puma['log_directory']` |
+| `unicorn['worker_memory_limit_min']` | n/a |
+| `unicorn['worker_memory_limit_max']` | `puma['per_worker_max_memory_mb']` |
+| `unicorn['exporter_enabled']` | `puma['exporter_enabled']` |
+| `unicorn['exporter_address']` | `puma['exporter_address']` |
+| `unicorn['exporter_port']` | `puma['exporter_port']` |
diff --git a/doc/install/requirements.md b/doc/install/requirements.md
index 3a8b7bf1004..a84cd179b30 100644
--- a/doc/install/requirements.md
+++ b/doc/install/requirements.md
@@ -170,11 +170,13 @@ of GitLab Support or other GitLab engineers.
## Puma settings
The recommended settings for Puma are determined by the infrastructure on which it's running.
-Omnibus GitLab defaults to the recommended Puma settings. Regardless of installation method, you can
-tune the Puma settings.
+The GitLab Linux package defaults to the recommended Puma settings. Regardless of installation method, you can
+tune the Puma settings:
-If you're using Omnibus GitLab, see [Puma settings](https://docs.gitlab.com/omnibus/settings/puma.html)
-for instructions on changing the Puma settings. If you're using the GitLab Helm chart, see the [`webservice` chart](https://docs.gitlab.com/charts/charts/gitlab/webservice/index.html).
+- If you're using the GitLab Linux package, see [Puma settings](../administration/operations/puma.md)
+ for instructions on changing the Puma settings.
+- If you're using the GitLab Helm chart, see the
+ [`webservice` chart](https://docs.gitlab.com/charts/charts/gitlab/webservice/index.html).
### Puma workers
diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md
index e80807b31bf..f440c479873 100644
--- a/doc/user/application_security/sast/index.md
+++ b/doc/user/application_security/sast/index.md
@@ -497,7 +497,7 @@ Some analyzers can be customized with CI/CD variables.
| `SCAN_KUBERNETES_MANIFESTS` | Kubesec | Set to `"true"` to scan Kubernetes manifests. |
| `KUBESEC_HELM_CHARTS_PATH` | Kubesec | Optional path to Helm charts that `helm` uses to generate a Kubernetes manifest that `kubesec` scans. If dependencies are defined, `helm dependency build` should be ran in a `before_script` to fetch the necessary dependencies. |
| `KUBESEC_HELM_OPTIONS` | Kubesec | Additional arguments for the `helm` executable. |
-| `COMPILE` | SpotBugs | Set to `false` to disable project compilation and dependency fetching. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/195252) in GitLab 13.1. |
+| `COMPILE` | Gosec, SpotBugs | Set to `false` to disable project compilation and dependency fetching. [Introduced for `SpotBugs`](https://gitlab.com/gitlab-org/gitlab/-/issues/195252) analyzer in GitLab 13.1 and [`Gosec`](https://gitlab.com/gitlab-org/gitlab/-/issues/330678) analyzer in GitLab 14.0. |
| `ANT_HOME` | SpotBugs | The `ANT_HOME` variable. |
| `ANT_PATH` | SpotBugs | Path to the `ant` executable. |
| `GRADLE_PATH` | SpotBugs | Path to the `gradle` executable. |
diff --git a/lib/gitlab/ci/features.rb b/lib/gitlab/ci/features.rb
index fe69a170404..9ed37f306af 100644
--- a/lib/gitlab/ci/features.rb
+++ b/lib/gitlab/ci/features.rb
@@ -41,6 +41,10 @@ module Gitlab
def self.gldropdown_tags_enabled?
::Feature.enabled?(:gldropdown_tags, default_enabled: :yaml)
end
+
+ def self.require_builds_token_encryption?
+ Feature.enabled?(:ci_builds_tokens_required_encryption, default_enabled: :yaml)
+ end
end
end
end
diff --git a/spec/factories/integrations.rb b/spec/factories/integrations.rb
index 1dd2839aa46..a64d047c89b 100644
--- a/spec/factories/integrations.rb
+++ b/spec/factories/integrations.rb
@@ -173,7 +173,7 @@ FactoryBot.define do
type { 'SlackSlashCommandsService' }
end
- factory :pipelines_email_service, class: 'Integrations::PipelinesEmail' do
+ factory :pipelines_email_integration, class: 'Integrations::PipelinesEmail' do
project
active { true }
type { 'PipelinesEmailService' }
diff --git a/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js b/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js
index 9a68115e4f6..a6aa1ece032 100644
--- a/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js
+++ b/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js
@@ -1,3 +1,4 @@
+import { GlButton } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { trimText } from 'helpers/text_helper';
@@ -18,7 +19,7 @@ describe('FrequentItemsListItemComponent', () => {
const findAvatar = () => wrapper.find({ ref: 'frequentItemsItemAvatar' });
const findAllTitles = () => wrapper.findAll({ ref: 'frequentItemsItemTitle' });
const findNamespace = () => wrapper.find({ ref: 'frequentItemsItemNamespace' });
- const findAllAnchors = () => wrapper.findAll('a');
+ const findAllButtons = () => wrapper.findAllComponents(GlButton);
const findAllNamespace = () => wrapper.findAll({ ref: 'frequentItemsItemNamespace' });
const findAvatarContainer = () => wrapper.findAll({ ref: 'frequentItemsItemAvatarContainer' });
const findAllMetadataContainers = () =>
@@ -109,7 +110,7 @@ describe('FrequentItemsListItemComponent', () => {
it.each`
name | selector | expected
- ${'anchor'} | ${findAllAnchors} | ${1}
+ ${'button'} | ${findAllButtons} | ${1}
${'avatar container'} | ${findAvatarContainer} | ${1}
${'metadata container'} | ${findAllMetadataContainers} | ${1}
${'title'} | ${findAllTitles} | ${1}
@@ -119,13 +120,10 @@ describe('FrequentItemsListItemComponent', () => {
});
it('tracks when item link is clicked', () => {
- const link = wrapper.find('a');
- // NOTE: this listener is required to prevent the click from going through and causing:
- // `Error: Not implemented: navigation ...`
- link.element.addEventListener('click', (e) => {
- e.preventDefault();
- });
- link.trigger('click');
+ const link = wrapper.findComponent(GlButton);
+
+ link.vm.$emit('click');
+
expect(trackingSpy).toHaveBeenCalledWith(undefined, 'click_link', {
label: 'projects_dropdown_frequent_items_list_item',
});
diff --git a/spec/frontend/nav/components/top_nav_menu_item_spec.js b/spec/frontend/nav/components/top_nav_menu_item_spec.js
index fd2b4d3b056..71154e18915 100644
--- a/spec/frontend/nav/components/top_nav_menu_item_spec.js
+++ b/spec/frontend/nav/components/top_nav_menu_item_spec.js
@@ -73,7 +73,7 @@ describe('~/nav/components/top_nav_menu_item.vue', () => {
expect(findButtonIcons()).toEqual([
{
name: TEST_MENU_ITEM.icon,
- classes: ['gl-mr-2!'],
+ classes: ['gl-mr-3!'],
},
{
name: 'chevron-right',
diff --git a/spec/helpers/nav/top_nav_helper_spec.rb b/spec/helpers/nav/top_nav_helper_spec.rb
index d87c751c62f..466068b7b41 100644
--- a/spec/helpers/nav/top_nav_helper_spec.rb
+++ b/spec/helpers/nav/top_nav_helper_spec.rb
@@ -539,10 +539,18 @@ RSpec.describe Nav::TopNavHelper do
end
context 'with new' do
- let(:with_new_view_model) { { id: 'test-new-view-model' } }
+ let(:with_new_view_model) { { menu_sections: [{ id: 'test-new-view-model' }] } }
it 'has new subview' do
- expect(subject[:views][:new]).to eq({ id: 'test-new-view-model' })
+ expect(subject[:views][:new]).to eq(with_new_view_model)
+ end
+ end
+
+ context 'with new and no menu_sections' do
+ let(:with_new_view_model) { { menu_sections: [] } }
+
+ it 'has new subview' do
+ expect(subject[:views][:new]).to be_nil
end
end
end
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml
index 87a10b52b22..63bd024d741 100644
--- a/spec/lib/gitlab/import_export/all_models.yml
+++ b/spec/lib/gitlab/import_export/all_models.yml
@@ -367,12 +367,12 @@ project:
- discord_integration
- drone_ci_integration
- emails_on_push_integration
-- pipelines_email_service
+- pipelines_email_integration
- mattermost_slash_commands_service
- slack_slash_commands_service
- irker_integration
-- packagist_service
-- pivotaltracker_service
+- packagist_integration
+- pivotaltracker_integration
- prometheus_service
- flowdock_integration
- assembla_integration
@@ -385,7 +385,7 @@ project:
- buildkite_integration
- bamboo_integration
- teamcity_service
-- pushover_service
+- pushover_integration
- jira_service
- redmine_service
- youtrack_service
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 26fc4b140c1..9105a89b859 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -2854,7 +2854,7 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
end
it 'builds hook data once' do
- create(:pipelines_email_service)
+ create(:pipelines_email_integration)
expect(Gitlab::DataBuilder::Pipeline).to receive(:build).once.and_call_original
diff --git a/spec/models/integrations/packagist_spec.rb b/spec/models/integrations/packagist_spec.rb
index 48f7e81adca..868ad4f9747 100644
--- a/spec/models/integrations/packagist_spec.rb
+++ b/spec/models/integrations/packagist_spec.rb
@@ -33,14 +33,14 @@ RSpec.describe Integrations::Packagist do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:push_sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) }
- let(:packagist_service) { described_class.create!(packagist_params) }
+ let(:packagist_integration) { described_class.create!(packagist_params) }
before do
stub_request(:post, packagist_hook_url)
end
it 'calls Packagist API' do
- packagist_service.execute(push_sample_data)
+ packagist_integration.execute(push_sample_data)
expect(a_request(:post, packagist_hook_url)).to have_been_made.once
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 7eb02749f72..43e470f189d 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -41,8 +41,8 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:hangouts_chat_integration) }
it { is_expected.to have_one(:unify_circuit_service) }
it { is_expected.to have_one(:webex_teams_service) }
- it { is_expected.to have_one(:packagist_service) }
- it { is_expected.to have_one(:pushover_service) }
+ it { is_expected.to have_one(:packagist_integration) }
+ it { is_expected.to have_one(:pushover_integration) }
it { is_expected.to have_one(:asana_integration) }
it { is_expected.to have_many(:boards) }
it { is_expected.to have_one(:campfire_integration) }
@@ -50,9 +50,9 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:discord_integration) }
it { is_expected.to have_one(:drone_ci_integration) }
it { is_expected.to have_one(:emails_on_push_integration) }
- it { is_expected.to have_one(:pipelines_email_service) }
+ it { is_expected.to have_one(:pipelines_email_integration) }
it { is_expected.to have_one(:irker_integration) }
- it { is_expected.to have_one(:pivotaltracker_service) }
+ it { is_expected.to have_one(:pivotaltracker_integration) }
it { is_expected.to have_one(:flowdock_integration) }
it { is_expected.to have_one(:assembla_integration) }
it { is_expected.to have_one(:slack_slash_commands_service) }
diff --git a/spec/services/integrations/test/project_service_spec.rb b/spec/services/integrations/test/project_service_spec.rb
index 052b25b0f10..8417f8c4c8a 100644
--- a/spec/services/integrations/test/project_service_spec.rb
+++ b/spec/services/integrations/test/project_service_spec.rb
@@ -23,8 +23,8 @@ RSpec.describe Integrations::Test::ProjectService do
expect(subject).to eq(success_result)
end
- context 'PipelinesEmailService' do
- let(:integration) { create(:pipelines_email_service, project: project) }
+ context 'with Integrations::PipelinesEmail' do
+ let(:integration) { create(:pipelines_email_integration, project: project) }
it_behaves_like 'tests for integration with pipeline data'
end