Commit e78462f1 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents b1ea3da3 189d4dba
......@@ -218,8 +218,6 @@ Rails/SaveBang:
- 'spec/models/application_record_spec.rb'
- 'spec/models/application_setting_spec.rb'
- 'spec/models/clusters/applications/helm_spec.rb'
- 'spec/models/commit_spec.rb'
- 'spec/models/commit_status_spec.rb'
- 'spec/models/container_repository_spec.rb'
- 'spec/models/design_management/version_spec.rb'
- 'spec/models/diff_discussion_spec.rb'
......
<script>
import { GlButton, GlIcon } from '@gitlab/ui';
import { once } from 'lodash';
import { mapActions, mapGetters, mapState } from 'vuex';
import api from '~/api';
import { sprintf, s__ } from '~/locale';
import Tracking from '~/tracking';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import GroupedIssuesList from '../components/grouped_issues_list.vue';
import { componentNames } from '../components/issue_body';
import ReportSection from '../components/report_section.vue';
......@@ -28,7 +28,7 @@ export default {
GlButton,
GlIcon,
},
mixins: [Tracking.mixin()],
mixins: [glFeatureFlagsMixin()],
props: {
endpoint: {
type: String,
......@@ -70,11 +70,6 @@ export default {
showViewFullReport() {
return this.pipelinePath.length;
},
handleToggleEvent() {
return once(() => {
this.track(this.$options.expandEvent);
});
},
},
created() {
this.setPaths({
......@@ -86,6 +81,11 @@ export default {
},
methods: {
...mapActions(['setPaths', 'fetchReports', 'closeModal']),
handleToggleEvent() {
if (this.glFeatures.usageDataITestingSummaryWidgetTotal) {
api.trackRedisHllUserEvent(this.$options.expandEvent);
}
},
reportText(report) {
const { name, summary } = report || {};
......@@ -130,7 +130,7 @@ export default {
return report.resolved_failures.concat(report.resolved_errors);
},
},
expandEvent: 'expand_test_report_widget',
expandEvent: 'i_testing_summary_widget_total',
};
</script>
<template>
......@@ -142,7 +142,7 @@ export default {
:has-issues="reports.length > 0"
:should-emit-toggle-event="true"
class="mr-widget-section grouped-security-reports mr-report"
@toggleEvent="handleToggleEvent"
@toggleEvent.once="handleToggleEvent"
>
<template v-if="showViewFullReport" #action-buttons>
<gl-button
......
......@@ -20,7 +20,7 @@
}
}
@mixin spinner($size: 16px, $border-width: 2px, $color: $orange-400) {
@mixin spinner($size: 16px, $border-width: 2px, $color: $gray-700) {
border-radius: 50%;
position: relative;
margin: 0 auto;
......@@ -46,7 +46,7 @@
}
&.spinner-dark {
@include spinner-color($gray-500);
@include spinner-color($gray-700);
}
&.spinner-light {
......
......@@ -42,6 +42,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
push_frontend_feature_flag(:confidential_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:usage_data_i_testing_summary_widget_total, @project, default_enabled: :yaml)
record_experiment_user(:invite_members_version_b)
......
......@@ -9,7 +9,7 @@ class AssemblaService < Service
end
def description
'Project Management Software (Source Commits Endpoint)'
_('Manage projects.')
end
def self.to_param
......
# frozen_string_literal: true
class JenkinsService < CiService
include ActionView::Helpers::UrlHelper
prop_accessor :jenkins_url, :project_name, :username, :password
before_update :reset_password
......@@ -58,15 +60,16 @@ class JenkinsService < CiService
end
def title
'Jenkins CI'
'Jenkins'
end
def description
'An extendable open source continuous integration server'
s_('An extendable open source CI/CD server.')
end
def help
"You must have installed the Git Plugin and GitLab Plugin in Jenkins. [More information](#{Gitlab::Routing.url_helpers.help_page_url('integration/jenkins')})"
docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('integration/jenkins'), target: '_blank', rel: 'noopener noreferrer'
s_('Trigger Jenkins builds when you push to a repository, or when a merge request is created, updated, or merged. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end
def self.to_param
......@@ -78,27 +81,30 @@ class JenkinsService < CiService
{
type: 'text',
name: 'jenkins_url',
title: s_('ProjectService|Jenkins URL'),
title: s_('ProjectService|Jenkins server URL'),
required: true,
placeholder: 'Jenkins URL like http://jenkins.example.com'
placeholder: 'http://jenkins.example.com',
help: s_('The URL of the Jenkins server.')
},
{
type: 'text',
name: 'project_name',
required: true,
placeholder: 'Project Name',
help: 'The URL-friendly project name. Example: my_project_name'
placeholder: 'my_project_name',
help: s_('The name of the Jenkins project. Copy the name from the end of the URL to the project.')
},
{
type: 'text',
name: 'username',
required: true
required: true,
help: s_('The username for the Jenkins server.')
},
{
type: 'password',
name: 'password',
non_empty_password_title: s_('ProjectService|Enter new password'),
non_empty_password_help: s_('ProjectService|Leave blank to use your current password')
help: s_('The password for the Jenkins server.'),
non_empty_password_title: s_('ProjectService|Enter new password.'),
non_empty_password_help: s_('ProjectService|Leave blank to use your current password.')
}
]
end
......
---
title: Capture test report summary widget views via usage ping
merge_request: 57543
author:
type: added
---
title: Add index on file_store for pages_deployments table
merge_request: 58355
author:
type: performance
---
title: Fix Rails/SaveBang Rubocop offenses for commit models
merge_request: 58069
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
---
title: Updated UI text for Assembla integration to match style guidelines
merge_request: 58400
author:
type: other
---
title: Update UI text of Jenkins integration
merge_request: 58623
author:
type: other
---
title: Update default spinner color to pajamas
merge_request: 58517
author:
type: changed
---
name: usage_data_i_testing_summary_widget_total
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57543
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326058
milestone: '13.11'
type: development
group: group::testing
default_enabled: true
# frozen_string_literal: true
class AddIndexToPagesDeployments < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
INDEX_NAME = 'index_pages_deployments_on_file_store_and_id'
def up
add_concurrent_index :pages_deployments, [:file_store, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :pages_deployments, INDEX_NAME
end
end
02f8ed673f87cb2528022d8352a1551b3c7250986d6dc387c1bbdfbc71123272
\ No newline at end of file
......@@ -23390,6 +23390,8 @@ CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags U
CREATE INDEX index_pages_deployments_on_ci_build_id ON pages_deployments USING btree (ci_build_id);
CREATE INDEX index_pages_deployments_on_file_store_and_id ON pages_deployments USING btree (file_store, id);
CREATE INDEX index_pages_deployments_on_project_id ON pages_deployments USING btree (project_id);
CREATE INDEX index_pages_domain_acme_orders_on_challenge_token ON pages_domain_acme_orders USING btree (challenge_token);
......@@ -945,8 +945,10 @@ They reflect configuration defined for this instance of Praefect.
> - Introduced in GitLab 13.1 in [alpha](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha-beta-ga), disabled by default.
> - Entered [beta](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha-beta-ga) in GitLab 13.2, disabled by default.
> - From GitLab 13.3, disabled unless primary-wins reference transactions strategy is disabled.
> - In GitLab 13.3, disabled unless primary-wins voting strategy is disabled.
> - From GitLab 13.4, enabled by default.
> - From GitLab 13.5, you must use Git v2.28.0 or higher on Gitaly nodes to enable strong consistency.
> - From GitLab 13.6, primary-wins voting strategy and `gitaly_reference_transactions_primary_wins` feature flag were removed from the source code.
Praefect guarantees eventual consistency by replicating all writes to secondary nodes
after the write to the primary Gitaly node has happened.
......@@ -958,18 +960,12 @@ information, see the [strong consistency epic](https://gitlab.com/groups/gitlab-
To enable strong consistency:
- In GitLab 13.5, you must use Git v2.28.0 or higher on Gitaly nodes to enable
strong consistency.
- In GitLab 13.4 and later, the strong consistency voting strategy has been
improved. Instead of requiring all nodes to agree, only the primary and half
of the secondaries need to agree. This strategy is enabled by default. To
disable it and continue using the primary-wins strategy, enable the
`:gitaly_reference_transactions_primary_wins` feature flag.
- In GitLab 13.3, reference transactions are enabled by default with a
primary-wins strategy. This strategy causes all transactions to succeed for
the primary and thus does not ensure strong consistency. To enable strong
consistency, disable the `:gitaly_reference_transactions_primary_wins`
feature flag.
- In GitLab 13.5, you must use Git v2.28.0 or higher on Gitaly nodes to enable strong consistency.
- In GitLab 13.4 and later, the strong consistency voting strategy has been improved and enabled by default.
Instead of requiring all nodes to agree, only the primary and half of the secondaries need to agree.
- In GitLab 13.3, reference transactions are enabled by default with a primary-wins strategy.
This strategy causes all transactions to succeed for the primary and thus does not ensure strong consistency.
To enable strong consistency, disable the `:gitaly_reference_transactions_primary_wins` feature flag.
- In GitLab 13.2, enable the `:gitaly_reference_transactions` feature flag.
- In GitLab 13.1, enable the `:gitaly_reference_transactions` and `:gitaly_hooks_rpc`
feature flags.
......@@ -982,6 +978,9 @@ Feature.enable(:gitaly_reference_transactions)
Feature.disable(:gitaly_reference_transactions_primary_wins)
```
NOTE:
If not set in GitLab, flags are read as false from the console and Praefect uses their default value, which depends on the GitLab version.
To monitor strong consistency, you can use the following Prometheus metrics:
- `gitaly_praefect_transactions_total`: Number of transactions created and
......
......@@ -288,6 +288,11 @@
redis_slot: testing
aggregation: weekly
feature_flag: usage_data_i_testing_metrics_report_artifact_uploaders
- name: i_testing_summary_widget_total
category: testing
redis_slot: testing
aggregation: weekly
feature_flag: usage_data_i_testing_summary_widget_total
# Project Management group
- name: g_project_management_issue_title_changed
category: issues_edit
......
......@@ -3680,6 +3680,9 @@ msgstr ""
msgid "An example showing how to use Jsonnet with GitLab dynamic child pipelines"
msgstr ""
msgid "An extendable open source CI/CD server."
msgstr ""
msgid "An instance-level serverless domain already exists."
msgstr ""
......@@ -18900,6 +18903,9 @@ msgstr ""
msgid "Manage project labels"
msgstr ""
msgid "Manage projects."
msgstr ""
msgid "Manage storage usage"
msgstr ""
......@@ -24203,10 +24209,13 @@ msgstr ""
msgid "ProjectService|Enter new password"
msgstr ""
msgid "ProjectService|Enter new password."
msgstr ""
msgid "ProjectService|Issue URL"
msgstr ""
msgid "ProjectService|Jenkins URL"
msgid "ProjectService|Jenkins server URL"
msgstr ""
msgid "ProjectService|Leave blank to use your current API key"
......@@ -24215,6 +24224,9 @@ msgstr ""
msgid "ProjectService|Leave blank to use your current password"
msgstr ""
msgid "ProjectService|Leave blank to use your current password."
msgstr ""
msgid "ProjectService|Mock service URL"
msgstr ""
......@@ -30382,6 +30394,9 @@ msgstr ""
msgid "The URL defined on the primary node that secondary nodes should use to contact it. %{linkStart}More information%{linkEnd}"
msgstr ""
msgid "The URL of the Jenkins server."
msgstr ""
msgid "The URL to use for connecting to Elasticsearch. Use a comma-separated list to support clustering (e.g., \"http://localhost:9200, http://localhost:9201\")."
msgstr ""
......@@ -30618,6 +30633,9 @@ msgstr ""
msgid "The name of the CI/CD configuration file. A path relative to the root directory is optional (for example %{code_open}my/path/.myfile.yml%{code_close})."
msgstr ""
msgid "The name of the Jenkins project. Copy the name from the end of the URL to the project."
msgstr ""
msgid "The number of changes to fetch from GitLab when cloning a repository. Lower values can speed up pipeline execution. Set to %{code_open}0%{code_close} or blank to fetch all branches and tags for each job"
msgstr ""
......@@ -30636,6 +30654,9 @@ msgstr ""
msgid "The passphrase required to decrypt the private key. This is optional and the value is encrypted at rest."
msgstr ""
msgid "The password for the Jenkins server."
msgstr ""
msgid "The phase of the development lifecycle."
msgstr ""
......@@ -30780,6 +30801,9 @@ msgstr ""
msgid "The user you are trying to deactivate has been active in the past %{minimum_inactive_days} days and cannot be deactivated"
msgstr ""
msgid "The username for the Jenkins server."
msgstr ""
msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
msgstr ""
......@@ -32481,6 +32505,9 @@ msgstr ""
msgid "Trigger"
msgstr ""
msgid "Trigger Jenkins builds when you push to a repository, or when a merge request is created, updated, or merged. %{docs_link}"
msgstr ""
msgid "Trigger a pipeline for a branch or tag by generating a trigger token and using it with an API call. The token impersonates a user's project access and permissions."
msgstr ""
......
......@@ -12,7 +12,7 @@ RSpec.describe 'Disable individual triggers', :js do
end
context 'service has multiple supported events' do
let(:service_name) { 'Jenkins CI' }
let(:service_name) { 'Jenkins' }
it 'shows trigger checkboxes' do
event_count = JenkinsService.supported_events.count
......
import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { mockTracking } from 'helpers/tracking_helper';
import Api from '~/api';
import GroupedTestReportsApp from '~/reports/grouped_test_report/grouped_test_reports_app.vue';
import { getStoreConfig } from '~/reports/grouped_test_report/store';
......@@ -12,6 +12,8 @@ import successTestReports from '../mock_data/no_failures_report.json';
import recentFailuresTestReports from '../mock_data/recent_failures_report.json';
import resolvedFailures from '../mock_data/resolved_failures.json';
jest.mock('~/api.js');
const localVue = createLocalVue();
localVue.use(Vuex);
......@@ -22,7 +24,7 @@ describe('Grouped test reports app', () => {
let wrapper;
let mockStore;
const mountComponent = ({ props = { pipelinePath } } = {}) => {
const mountComponent = ({ props = { pipelinePath }, glFeatures = {} } = {}) => {
wrapper = mount(GroupedTestReportsApp, {
store: mockStore,
localVue,
......@@ -32,6 +34,9 @@ describe('Grouped test reports app', () => {
pipelinePath,
...props,
},
provide: {
glFeatures,
},
});
};
......@@ -105,31 +110,33 @@ describe('Grouped test reports app', () => {
});
describe('`Expand` button', () => {
let trackingSpy;
beforeEach(() => {
setReports(newFailedTestReports);
mountComponent();
document.body.dataset.page = 'projects:merge_requests:show';
trackingSpy = mockTracking('_category_', wrapper.element, jest.spyOn);
});
it('tracks an event on click', () => {
it('tracks usage ping metric when enabled', () => {
mountComponent({ glFeatures: { usageDataITestingSummaryWidgetTotal: true } });
findExpandButton().trigger('click');
expect(trackingSpy).toHaveBeenCalledWith(undefined, 'expand_test_report_widget', {});
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledWith(wrapper.vm.$options.expandEvent);
});
it('only tracks the first expansion', () => {
expect(trackingSpy).not.toHaveBeenCalled();
mountComponent({ glFeatures: { usageDataITestingSummaryWidgetTotal: true } });
const expandButton = findExpandButton();
expandButton.trigger('click');
expandButton.trigger('click');
expandButton.trigger('click');
const button = findExpandButton();
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
});
button.trigger('click');
button.trigger('click');
button.trigger('click');
it('does not track usage ping metric when disabled', () => {
mountComponent({ glFeatures: { usageDataITestingSummaryWidgetTotal: false } });
findExpandButton().trigger('click');
expect(trackingSpy).toHaveBeenCalledTimes(1);
expect(Api.trackRedisHllUserEvent).not.toHaveBeenCalled();
});
});
......
......@@ -526,7 +526,7 @@ eos
context 'that is found' do
before do
# Artificially mark as completed.
merge_request.update(merge_commit_sha: merge_commit.id)
merge_request.update!(merge_commit_sha: merge_commit.id)
end
it do
......
......@@ -213,12 +213,12 @@ RSpec.describe CommitStatus do
context 'when it is canceled' do
before do
commit_status.update(status: 'canceled')
commit_status.update!(status: 'canceled')
end
context 'when there is auto_canceled_by' do
before do
commit_status.update(auto_canceled_by: create(:ci_empty_pipeline))
commit_status.update!(auto_canceled_by: create(:ci_empty_pipeline))
end
it 'is auto canceled' do
......@@ -610,7 +610,7 @@ RSpec.describe CommitStatus do
end
it "raise exception when trying to update" do
expect { commit_status.save }.to raise_error(ActiveRecord::StaleObjectError)
expect { commit_status.save! }.to raise_error(ActiveRecord::StaleObjectError)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment