summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-12 06:09:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-12 06:09:37 +0000
commit143f7be045960f8d51dea738781535d614956f84 (patch)
tree9d0a79240567a6c94f64bc7bfcfa834fce9f2ac6
parent0e30d318bbe0e9e94885f865db3372e758c512bb (diff)
downloadgitlab-ce-143f7be045960f8d51dea738781535d614956f84.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/notes/components/comment_form.vue37
-rw-r--r--app/assets/javascripts/notes/components/note_header.vue25
-rw-r--r--app/assets/javascripts/notes/components/noteable_note.vue8
-rw-r--r--app/assets/javascripts/vue_shared/components/notes/system_note.vue2
-rw-r--r--app/assets/stylesheets/pages/notes.scss4
-rw-r--r--app/controllers/projects/issues_controller.rb1
-rw-r--r--changelogs/unreleased/207471-expose-note-confidential-attribute-in-apis-and-display-on-frontend.yml5
-rw-r--r--changelogs/unreleased/217310.yml5
-rw-r--r--doc/administration/geo/replication/geo_validation_tests.md85
-rw-r--r--locale/gitlab.pot6
-rw-r--r--spec/frontend/notes/components/comment_form_spec.js31
-rw-r--r--spec/frontend/notes/components/note_header_spec.js12
-rw-r--r--spec/frontend/vue_mr_widget/stores/artifacts_list/actions_spec.js (renamed from spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js)4
-rw-r--r--spec/frontend/vue_mr_widget/stores/mr_widget_store_spec.js (renamed from spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js)8
14 files changed, 102 insertions, 131 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue
index 2d7692fff7a..a070cf8866a 100644
--- a/app/assets/javascripts/notes/components/comment_form.vue
+++ b/app/assets/javascripts/notes/components/comment_form.vue
@@ -3,15 +3,7 @@ import $ from 'jquery';
import { mapActions, mapGetters, mapState } from 'vuex';
import { isEmpty } from 'lodash';
import Autosize from 'autosize';
-import {
- GlAlert,
- GlFormCheckbox,
- GlIcon,
- GlIntersperse,
- GlLink,
- GlSprintf,
- GlTooltipDirective,
-} from '@gitlab/ui';
+import { GlAlert, GlIntersperse, GlLink, GlSprintf } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import Flash from '../../flash';
@@ -32,7 +24,6 @@ import loadingButton from '../../vue_shared/components/loading_button.vue';
import noteSignedOutWidget from './note_signed_out_widget.vue';
import discussionLockedWidget from './discussion_locked_widget.vue';
import issuableStateMixin from '../mixins/issuable_state';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default {
name: 'CommentForm',
@@ -45,16 +36,11 @@ export default {
loadingButton,
TimelineEntryItem,
GlAlert,
- GlFormCheckbox,
- GlIcon,
GlIntersperse,
GlLink,
GlSprintf,
},
- directives: {
- GlTooltip: GlTooltipDirective,
- },
- mixins: [issuableStateMixin, glFeatureFlagsMixin()],
+ mixins: [issuableStateMixin],
props: {
noteableType: {
type: String,
@@ -65,7 +51,6 @@ export default {
return {
note: '',
noteType: constants.COMMENT,
- noteIsConfidential: false,
isSubmitting: false,
isSubmitButtonDisabled: true,
};
@@ -153,9 +138,6 @@ export default {
trackingLabel() {
return slugifyWithUnderscore(`${this.commentButtonTitle} button`);
},
- confidentialNotesEnabled() {
- return Boolean(this.glFeatures.confidentialNotes);
- },
},
watch: {
note(newNote) {
@@ -203,7 +185,6 @@ export default {
note: {
noteable_type: this.noteableType,
noteable_id: this.getNoteableData.id,
- confidential: this.noteIsConfidential,
note: this.note,
},
merge_request_diff_head_sha: this.getNoteableData.diff_head_sha,
@@ -304,7 +285,6 @@ export default {
if (shouldClear) {
this.note = '';
- this.noteIsConfidential = false;
this.resizeTextarea();
this.$refs.markdownField.previewMarkdown = false;
}
@@ -431,19 +411,6 @@ js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input"
</p>
</gl-alert>
<div class="note-form-actions">
- <div v-if="confidentialNotesEnabled" class="js-confidential-note-toggle mb-4">
- <gl-form-checkbox v-model="noteIsConfidential">
- <gl-icon name="eye-slash" :size="12" />
- {{ __('Mark this comment as private') }}
- <gl-icon
- v-gl-tooltip:tooltipcontainer.bottom
- name="question"
- :size="12"
- :title="__('Private comments are accessible by internal staff only')"
- class="gl-text-gray-800"
- />
- </gl-form-checkbox>
- </div>
<div
class="float-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue
index c6675bc0aef..74a0b69bc54 100644
--- a/app/assets/javascripts/notes/components/note_header.vue
+++ b/app/assets/javascripts/notes/components/note_header.vue
@@ -1,6 +1,5 @@
<script>
import { mapActions } from 'vuex';
-import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import timeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import GitlabTeamMemberBadge from '~/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
@@ -8,10 +7,6 @@ export default {
components: {
timeAgoTooltip,
GitlabTeamMemberBadge,
- GlIcon,
- },
- directives: {
- GlTooltip: GlTooltipDirective,
},
props: {
author: {
@@ -49,11 +44,6 @@ export default {
required: false,
default: true,
},
- isConfidential: {
- type: Boolean,
- required: false,
- default: false,
- },
},
data() {
return {
@@ -170,32 +160,23 @@ export default {
</span>
</template>
<span v-else>{{ __('A deleted user') }}</span>
- <span class="note-headline-light note-headline-meta d-sm-inline-flex align-items-center">
+ <span class="note-headline-light note-headline-meta">
<span class="system-note-message"> <slot></slot> </span>
<template v-if="createdAt">
- <span ref="actionText" class="system-note-separator ml-1">
+ <span ref="actionText" class="system-note-separator">
<template v-if="actionText">{{ actionText }}</template>
</span>
<a
v-if="noteTimestampLink"
ref="noteTimestampLink"
:href="noteTimestampLink"
- class="note-timestamp system-note-separator mr-1"
+ class="note-timestamp system-note-separator"
@click="updateTargetNoteHash"
>
<time-ago-tooltip :time="createdAt" tooltip-placement="bottom" />
</a>
<time-ago-tooltip v-else ref="noteTimestamp" :time="createdAt" tooltip-placement="bottom" />
</template>
- <gl-icon
- v-if="isConfidential"
- ref="confidentialIndicator"
- v-gl-tooltip:tooltipcontainer.bottom
- name="eye-slash"
- :size="14"
- :title="__('Private comments are accessible by internal staff only')"
- class="mx-1 gl-text-gray-800"
- />
<slot name="extra-controls"></slot>
<i
v-if="showSpinner"
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue
index 3b17ad2ada7..dea782683f2 100644
--- a/app/assets/javascripts/notes/components/noteable_note.vue
+++ b/app/assets/javascripts/notes/components/noteable_note.vue
@@ -255,13 +255,7 @@ export default {
</div>
<div class="timeline-content">
<div class="note-header">
- <note-header
- v-once
- :author="author"
- :created-at="note.created_at"
- :note-id="note.id"
- :is-confidential="note.confidential"
- >
+ <note-header v-once :author="author" :created-at="note.created_at" :note-id="note.id">
<slot slot="note-header-info" name="note-header-info"></slot>
<span v-if="commit" v-html="actionText"></span>
<span v-else class="d-none d-sm-inline">&middot;</span>
diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue
index 05e1293a80e..ec7d7e94e5c 100644
--- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue
+++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue
@@ -107,7 +107,7 @@ export default {
<span v-html="actionTextHtml"></span>
<template v-if="canSeeDescriptionVersion" slot="extra-controls">
&middot;
- <button type="button" class="btn-blank btn-link ml-1" @click="toggleDescriptionVersion">
+ <button type="button" class="btn-blank btn-link" @click="toggleDescriptionVersion">
{{ __('Compare with previous version') }}
<icon :name="descriptionVersionToggleIcon" :size="12" class="append-left-5" />
</button>
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index e79842b646f..bed147aa3a7 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -660,6 +660,10 @@ $note-form-margin-left: 72px;
padding-bottom: 0;
}
+.note-headline-light {
+ display: inline;
+}
+
.note-headline-light,
.discussion-headline-light {
color: $gl-text-color-secondary;
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index fa4b91c5e02..47dbb800047 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -51,7 +51,6 @@ class Projects::IssuesController < Projects::ApplicationController
before_action only: :show do
push_frontend_feature_flag(:real_time_issue_sidebar, @project)
- push_frontend_feature_flag(:confidential_notes, @project)
end
around_action :allow_gitaly_ref_name_caching, only: [:discussions]
diff --git a/changelogs/unreleased/207471-expose-note-confidential-attribute-in-apis-and-display-on-frontend.yml b/changelogs/unreleased/207471-expose-note-confidential-attribute-in-apis-and-display-on-frontend.yml
deleted file mode 100644
index ed347a93dbc..00000000000
--- a/changelogs/unreleased/207471-expose-note-confidential-attribute-in-apis-and-display-on-frontend.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add confidential status support for new comments
-merge_request: 30570
-author:
-type: added
diff --git a/changelogs/unreleased/217310.yml b/changelogs/unreleased/217310.yml
deleted file mode 100644
index bdae668659e..00000000000
--- a/changelogs/unreleased/217310.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Fix missing space on system notes
-merge_request: 31598
-author:
-type: fixed
diff --git a/doc/administration/geo/replication/geo_validation_tests.md b/doc/administration/geo/replication/geo_validation_tests.md
new file mode 100644
index 00000000000..0bfb8180cbb
--- /dev/null
+++ b/doc/administration/geo/replication/geo_validation_tests.md
@@ -0,0 +1,85 @@
+# Geo validation tests
+
+The Geo team performs manual testing and validation on common deployment configurations to ensure that Geo works when upgrading between minor GitLab versions and major PostgreSQL database versions. This section contains a journal of recent validation tests and links to the relevant issues.
+
+## GitLab Upgrades
+
+### February 2020
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/201837)
+
+- Description: Tested upgrading from GitLab 12.7.5 to the latest 12.8 package in a high availability configuration.
+- Outcome: Partial success because we did not run the looping pipeline during the demo to monitor downtime.
+
+### January 2020
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/200085)
+
+- Description: Tested upgrading from GitLab 12.6.x to the latest 12.7 package in a high availability configuration.
+- Outcome: Upgrade test was successful.
+- Follow up issues:
+ - [Investigate Geo End to End Test Failures](https://gitlab.com/gitlab-org/gitlab/issues/201823)
+ - [Add More Logging to Geo End to End Tests](https://gitlab.com/gitlab-org/gitlab/issues/201830)
+ - [Excess Service Restarts During Zero-Downtime Upgrade](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5047)
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/199836)
+
+- Description: Tested upgrading from GitLab 12.5.7 to 12.6.6 in a high availability configuration
+- Outcome: Upgrade test was successful.
+- Follow up issues:
+ - [Update docs for zero-downtime upgrades to ensure deploy node it not in-use](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5046)
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/37044)
+
+- Description: Tested upgrading from GitLab 12.4.x to the latest 12.5 package in a high availability configuration.
+- Outcome: Upgrade test was successful.
+- Follow up issues:
+ - [Investigate why http push spec failed on primary node](https://gitlab.com/gitlab-org/gitlab/issues/199825)
+ - [Investigate if docs should be modified to include refresh foreign tables task](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5041)
+
+### October 2019
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/35262)
+
+- Description: Tested uprgading from GitLab 12.3.5 to 12.4.1 in a high availability configuration.
+- Outcome: Upgrade test was successful.
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/32437)
+
+- Description: Tested upgrading from GitLab 12.2.8 to 12.3.5
+- Outcome: Upgrade test was successful.
+
+[Upgrade Geo HA installation](https://gitlab.com/gitlab-org/gitlab/-/issues/32435)
+
+- Description: Tested upgrading from GitLab 12.1.9 to 12.2.8
+- Outcome: Partial success due to possible misconfiguration issues.
+
+## PostgreSQL Upgrades
+
+### April 2020
+
+[PostgreSQL 11 upgrade procedure for GEO installations](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/4975)
+
+- Description: Prior to making PostgreSQL 11 the default version of PG in GitLab 12.10, we tested upgrading to PG 11 in Geo deployments on GitLab 12.9.
+- Outcome: Partially successful. Issues were discovered in HA configurations with a separate tracking database and concerns were raised about allowing automatic upgrades when Geo enabled.
+- Follow up issues:
+ - [replicate-geo-database incorrectly tries to backup repos](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5241)
+ - [pg-upgrade fails to upgrade a standalone Geo tracking DB](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5242)
+ - [revert-pg-upgrade fails to downgrade a Geo secondary’s standalone tracking DB’s PG data](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5243)
+ - [Timeout error on Geo secondary read-replica near the end of `gitlab-ctl pg-upgrade`](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5235)
+
+[Verify GEO installation with PostgreSQL 11](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/4971)
+
+- Description: Prior to making PostgreSQL 11 the default version of PG in GitLab 12.10, we tested fresh installations of GitLab 12.9 with Geo, installed with PG 11.
+- Outcome: Installation test was successful.
+
+### September 2019
+
+[Test and validate PostgreSQL 10.0 upgrade for Geo](https://gitlab.com/gitlab-org/gitlab/issues/12092)
+
+- Description: With the 12.0 release, GitLab required an upgrade to PostgreSQL 10.0. We tested various upgrade scenarios from GitLab 11.11.5 through to 12.1.8.
+- Outcome: Multiple issues were found when upgrading and addressed in follow-up issues.
+- Follow up issues:
+ - [`gitlab-ctl` reconfigure fails on Redis node in HA Geo setup](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/4706)
+ - [HA with Geo upgrade from 12.0.9 to 12.1.9 does not upgrade PostgreSQL](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/4705)
+ - [refresh foreign tables fails on app server in HA setup after upgrade to 12.1.9](https://gitlab.com/gitlab-org/gitlab/-/issues/32119)
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index d248941bd18..804f4e08f91 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -12788,9 +12788,6 @@ msgstr ""
msgid "Mark comment as resolved"
msgstr ""
-msgid "Mark this comment as private"
-msgstr ""
-
msgid "Mark this issue as a duplicate of another issue"
msgstr ""
@@ -15592,9 +15589,6 @@ msgstr ""
msgid "Private - The group and its projects can only be viewed by members."
msgstr ""
-msgid "Private comments are accessible by internal staff only"
-msgstr ""
-
msgid "Private group(s)"
msgstr ""
diff --git a/spec/frontend/notes/components/comment_form_spec.js b/spec/frontend/notes/components/comment_form_spec.js
index e695fd8238d..a2c7f0b3767 100644
--- a/spec/frontend/notes/components/comment_form_spec.js
+++ b/spec/frontend/notes/components/comment_form_spec.js
@@ -24,7 +24,6 @@ describe('issue_comment_form component', () => {
let store;
let wrapper;
let axiosMock;
- let features = {};
const setupStore = (userData, noteableData) => {
store.dispatch('setUserData', userData);
@@ -38,16 +37,12 @@ describe('issue_comment_form component', () => {
noteableType,
},
store,
- provide: {
- glFeatures: features,
- },
});
};
beforeEach(() => {
axiosMock = new MockAdapter(axios);
store = createStore();
- features = {};
});
afterEach(() => {
@@ -303,32 +298,6 @@ describe('issue_comment_form component', () => {
});
});
});
-
- describe('when note can be confidential', () => {
- it('appends confidential status to note payload when saving', () => {
- jest.spyOn(wrapper.vm, 'saveNote').mockReturnValue(new Promise(() => {}));
-
- wrapper.vm.note = 'confidential note';
-
- return wrapper.vm.$nextTick().then(() => {
- wrapper.find('.js-comment-submit-button').trigger('click');
-
- const [providedData] = wrapper.vm.saveNote.mock.calls[0];
-
- expect(providedData.data.note.confidential).toBe(false);
- });
- });
-
- it('should render confidential toggle as false', () => {
- features = { confidentialNotes: true };
- mountComponent();
-
- const input = wrapper.find('.js-confidential-note-toggle .form-check-input');
-
- expect(input.exists()).toBe(true);
- expect(input.attributes('checked')).toBeFalsy();
- });
- });
});
describe('issue is confidential', () => {
diff --git a/spec/frontend/notes/components/note_header_spec.js b/spec/frontend/notes/components/note_header_spec.js
index 19400e61b9c..8cb78720c7e 100644
--- a/spec/frontend/notes/components/note_header_spec.js
+++ b/spec/frontend/notes/components/note_header_spec.js
@@ -19,7 +19,6 @@ describe('NoteHeader component', () => {
const findActionText = () => wrapper.find({ ref: 'actionText' });
const findTimestampLink = () => wrapper.find({ ref: 'noteTimestampLink' });
const findTimestamp = () => wrapper.find({ ref: 'noteTimestamp' });
- const findConfidentialIndicator = () => wrapper.find({ ref: 'confidentialIndicator' });
const findSpinner = () => wrapper.find({ ref: 'spinner' });
const author = {
@@ -247,15 +246,4 @@ describe('NoteHeader component', () => {
});
});
});
-
- describe('with confidentiality indicator', () => {
- it.each`
- status | condition
- ${true} | ${'shows'}
- ${false} | ${'hides'}
- `('$condition icon indicator when isConfidential is $status', ({ status }) => {
- createComponent({ isConfidential: status });
- expect(findConfidentialIndicator().exists()).toBe(status);
- });
- });
});
diff --git a/spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js b/spec/frontend/vue_mr_widget/stores/artifacts_list/actions_spec.js
index 5070e74b5d2..026ea0e4d0a 100644
--- a/spec/javascripts/vue_mr_widget/stores/artifacts_list/actions_spec.js
+++ b/spec/frontend/vue_mr_widget/stores/artifacts_list/actions_spec.js
@@ -1,6 +1,6 @@
import MockAdapter from 'axios-mock-adapter';
-import testAction from 'spec/helpers/vuex_action_helper';
-import { TEST_HOST } from 'spec/test_constants';
+import testAction from 'helpers/vuex_action_helper';
+import { TEST_HOST } from 'helpers/test_constants';
import axios from '~/lib/utils/axios_utils';
import {
setEndpoint,
diff --git a/spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js b/spec/frontend/vue_mr_widget/stores/mr_widget_store_spec.js
index 1906585af7b..48326eda404 100644
--- a/spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js
+++ b/spec/frontend/vue_mr_widget/stores/mr_widget_store_spec.js
@@ -73,13 +73,13 @@ describe('MergeRequestStore', () => {
it('returns true when nothingToMerge', () => {
store.state = stateKey.nothingToMerge;
- expect(store.isNothingToMergeState).toEqual(true);
+ expect(store.isNothingToMergeState).toBe(true);
});
it('returns false when not nothingToMerge', () => {
store.state = 'state';
- expect(store.isNothingToMergeState).toEqual(false);
+ expect(store.isNothingToMergeState).toBe(false);
});
});
});
@@ -88,13 +88,13 @@ describe('MergeRequestStore', () => {
it('should set the add ci config path', () => {
store.setData({ ...mockData });
- expect(store.mergeRequestAddCiConfigPath).toEqual('/group2/project2/new/pipeline');
+ expect(store.mergeRequestAddCiConfigPath).toBe('/group2/project2/new/pipeline');
});
it('should set humanAccess=Maintainer when user has that role', () => {
store.setData({ ...mockData });
- expect(store.humanAccess).toEqual('Maintainer');
+ expect(store.humanAccess).toBe('Maintainer');
});
it('should set pipelinesEmptySvgPath', () => {