summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-17 12:07:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-17 12:07:26 +0000
commit77ee26b43bda4b092f356d5185f424bad232af36 (patch)
treeecc8b81493b927d9dc88d357d1328be58d5188dd
parent5498125b82c1bad4c613cc4b90c7920d47d949d4 (diff)
downloadgitlab-ce-77ee26b43bda4b092f356d5185f424bad232af36.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/pipelines_ci_templates.vue4
-rwxr-xr-xbin/metrics-server1
-rw-r--r--config/initializers/7_prometheus_metrics.rb4
-rw-r--r--doc/integration/external-issue-tracker.md20
-rw-r--r--doc/user/project/integrations/custom_issue_tracker.md2
-rw-r--r--metrics_server/metrics_server.rb2
-rw-r--r--sidekiq_cluster/cli.rb4
-rw-r--r--spec/frontend/pipelines/pipelines_ci_templates_spec.js31
8 files changed, 38 insertions, 30 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_ci_templates.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_ci_templates.vue
index 55cc8e8fed6..d50229e47c4 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_ci_templates.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_ci_templates.vue
@@ -13,7 +13,7 @@ import {
import { helpPagePath } from '~/helpers/help_page_helper';
import GitlabExperiment from '~/experimentation/components/gitlab_experiment.vue';
import ExperimentTracking from '~/experimentation/experiment_tracking';
-import { getExperimentData } from '~/experimentation/utils';
+import { isExperimentVariant } from '~/experimentation/utils';
import Tracking from '~/tracking';
export default {
@@ -70,7 +70,7 @@ export default {
return helpPagePath('ci/runners/runners_scope', { anchor: 'shared-runners' });
},
runnersAvailabilitySectionExperimentEnabled() {
- return Boolean(getExperimentData(RUNNERS_AVAILABILITY_SECTION_EXPERIMENT_NAME));
+ return isExperimentVariant(RUNNERS_AVAILABILITY_SECTION_EXPERIMENT_NAME);
},
},
created() {
diff --git a/bin/metrics-server b/bin/metrics-server
index f8eca93908e..d4c9779d1dd 100755
--- a/bin/metrics-server
+++ b/bin/metrics-server
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
+require_relative '../metrics_server/dependencies'
require_relative '../metrics_server/metrics_server'
target = ENV['METRICS_SERVER_TARGET']
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index 81e55a139c2..e4d47d53815 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
PUMA_EXTERNAL_METRICS_SERVER = Gitlab::Utils.to_boolean(ENV['PUMA_EXTERNAL_METRICS_SERVER'])
+require Rails.root.join('metrics_server', 'metrics_server') if PUMA_EXTERNAL_METRICS_SERVER
# Keep separate directories for separate processes
def prometheus_default_multiproc_dir
@@ -74,8 +75,7 @@ Gitlab::Cluster::LifecycleEvents.on_master_start do
if Gitlab::Runtime.puma?
Gitlab::Metrics::Samplers::PumaSampler.instance.start
- if Settings.monitoring.web_exporter.enabled && PUMA_EXTERNAL_METRICS_SERVER
- require_relative '../../metrics_server/metrics_server'
+ if PUMA_EXTERNAL_METRICS_SERVER && Settings.monitoring.web_exporter.enabled
MetricsServer.start_for_puma
else
Gitlab::Metrics::Exporter::WebExporter.instance.start
diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md
index 19f789832b9..ac470291c27 100644
--- a/doc/integration/external-issue-tracker.md
+++ b/doc/integration/external-issue-tracker.md
@@ -6,27 +6,26 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# External issue tracker **(FREE)**
-GitLab has a great [issue tracker](../user/project/issues/index.md) but you can also use an external
-one. External issue trackers are configurable per GitLab project.
+GitLab has an [issue tracker](../user/project/issues/index.md), but you can
+configure an external issue tracker per GitLab project.
-Once configured, you can reference external issues using the format `CODE-123`, where:
+After you configure the external tracker, you can reference external issues
+in GitLab merge requests, commits, and comments
+using the format `CODE-123`, where:
- `CODE` is a unique code for the tracker.
- `123` is the issue number in the tracker.
-These references in GitLab merge requests, commits, or comments are automatically converted to links to the issues.
+The references are automatically converted to links to the issues.
You can keep the GitLab issue tracker enabled in parallel or disable it. When enabled, the **Issues** link in the
GitLab menu always opens the internal issue tracker. When disabled, the link is not visible in the menu.
-## Configuration
+## Configure an external issue tracker
-The configuration is done via a project's **Settings > Integrations**.
+To enable an external issue tracker, you must configure the appropriate [integration](../user/project/integrations/index.md).
-### Integration
-
-To enable an external issue tracker you must configure the appropriate **Integration**.
-Visit the links below for details:
+The following external issue tracker integrations are available:
- [Bugzilla](../user/project/integrations/bugzilla.md)
- [Custom Issue Tracker](../user/project/integrations/custom_issue_tracker.md)
@@ -34,3 +33,4 @@ Visit the links below for details:
- [Jira](../integration/jira/index.md)
- [Redmine](../user/project/integrations/redmine.md)
- [YouTrack](../user/project/integrations/youtrack.md)
+- [ZenTao](../user/project/integrations/zentao.md)
diff --git a/doc/user/project/integrations/custom_issue_tracker.md b/doc/user/project/integrations/custom_issue_tracker.md
index d155f91e40b..71ca9f4f640 100644
--- a/doc/user/project/integrations/custom_issue_tracker.md
+++ b/doc/user/project/integrations/custom_issue_tracker.md
@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
You can integrate an [external issue tracker](../../../integration/external-issue-tracker.md)
with GitLab. If your preferred issue tracker is not listed in the
-[integrations list](../../../integration/external-issue-tracker.md#integration),
+[integrations list](../../../integration/external-issue-tracker.md#configure-an-external-issue-tracker),
you can enable a custom issue tracker.
After you enable the custom issue tracker, a link to the issue tracker displays
diff --git a/metrics_server/metrics_server.rb b/metrics_server/metrics_server.rb
index 5411aaa0b5f..2aadc63d65d 100644
--- a/metrics_server/metrics_server.rb
+++ b/metrics_server/metrics_server.rb
@@ -2,8 +2,6 @@
require_relative '../config/boot'
-require_relative 'dependencies'
-
class MetricsServer # rubocop:disable Gitlab/NamespacedClass
# The singleton instance used to supervise the Puma metrics server.
PumaProcessSupervisor = Class.new(Gitlab::ProcessSupervisor)
diff --git a/sidekiq_cluster/cli.rb b/sidekiq_cluster/cli.rb
index 737d31bbc88..e04f5ab1d42 100644
--- a/sidekiq_cluster/cli.rb
+++ b/sidekiq_cluster/cli.rb
@@ -10,12 +10,10 @@ require 'time'
# we may run into "already initialized" warnings, hence the check.
require_relative '../lib/gitlab' unless Object.const_defined?('Gitlab')
require_relative '../lib/gitlab/utils'
-require_relative '../lib/gitlab/daemon'
require_relative '../lib/gitlab/sidekiq_config/cli_methods'
require_relative '../lib/gitlab/sidekiq_config/worker_matcher'
require_relative '../lib/gitlab/sidekiq_logging/json_formatter'
-require_relative '../lib/gitlab/process_management'
-require_relative '../lib/gitlab/process_supervisor'
+require_relative '../metrics_server/dependencies'
require_relative '../metrics_server/metrics_server'
require_relative 'sidekiq_cluster'
diff --git a/spec/frontend/pipelines/pipelines_ci_templates_spec.js b/spec/frontend/pipelines/pipelines_ci_templates_spec.js
index ea64788ea47..7064f7448ec 100644
--- a/spec/frontend/pipelines/pipelines_ci_templates_spec.js
+++ b/spec/frontend/pipelines/pipelines_ci_templates_spec.js
@@ -134,11 +134,6 @@ describe('Pipelines CI Templates', () => {
wrapper = createWrapper({ anyRunnersAvailable: true }, { GitlabExperiment, GlSprintf });
});
- it('renders the templates', () => {
- expect(findTestTemplateLinks().exists()).toBe(true);
- expect(findTemplateLinks().exists()).toBe(true);
- });
-
it('show the runners available section', () => {
expect(wrapper.text()).toContain(I18N.runners.title);
});
@@ -171,11 +166,6 @@ describe('Pipelines CI Templates', () => {
wrapper = createWrapper({ anyRunnersAvailable: false }, { GitlabExperiment, GlButton });
});
- it('does not render the templates', () => {
- expect(findTestTemplateLinks().exists()).toBe(false);
- expect(findTemplateLinks().exists()).toBe(false);
- });
-
it('show the no runners available section', () => {
expect(wrapper.text()).toContain(I18N.noRunners.title);
});
@@ -192,4 +182,25 @@ describe('Pipelines CI Templates', () => {
});
});
});
+
+ describe.each`
+ experimentVariant | anyRunnersAvailable | templatesRendered
+ ${'control'} | ${true} | ${true}
+ ${'control'} | ${false} | ${true}
+ ${'candidate'} | ${true} | ${true}
+ ${'candidate'} | ${false} | ${false}
+ `(
+ 'when the runners_availability_section experiment variant is $experimentVariant and runners are available: $anyRunnersAvailable',
+ ({ experimentVariant, anyRunnersAvailable, templatesRendered }) => {
+ beforeEach(() => {
+ stubExperiments({ runners_availability_section: experimentVariant });
+ wrapper = createWrapper({ anyRunnersAvailable });
+ });
+
+ it(`renders the templates: ${templatesRendered}`, () => {
+ expect(findTestTemplateLinks().exists()).toBe(templatesRendered);
+ expect(findTemplateLinks().exists()).toBe(templatesRendered);
+ });
+ },
+ );
});