From 84b851762aa3c1ebba62a346a43a591ea0cbada4 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Fri, 15 Feb 2019 12:00:43 +0000 Subject: [PATCH 1/6] Merge branch 'bump-gitaly-version-1.20.1' into 'master' Bump Gitaly to v1.20.0 Closes #53473 See merge request gitlab-org/gitlab-ce!25259 (cherry picked from commit d3882f4cb85b6acacfd8bdac83801c57aaed2cc7) 650481e3 Bump Gitaly to v1.20.0 --- GITALY_SERVER_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 66e2ae6c25c..39893559155 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -1.19.1 +1.20.0 -- GitLab From 7222f4e5c2d95d4b354053465d1d64eb035e88d3 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Fri, 15 Feb 2019 12:46:18 +0000 Subject: [PATCH 2/6] Merge branch '57650-remove-tld-validation-from-cluster' into 'master' Remove TLD validation from cluster domain Closes #57650 See merge request gitlab-org/gitlab-ce!25262 (cherry picked from commit d02ca097312245e13ba9e1301964342a4327859a) 3016a2a3 Remove TLD validation from Cluster#domain --- app/models/clusters/cluster.rb | 2 +- .../unreleased/57650-remove-tld-validation-from-cluster.yml | 5 +++++ spec/controllers/groups/clusters_controller_spec.rb | 2 +- spec/models/clusters/cluster_spec.rb | 6 +++--- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 changelogs/unreleased/57650-remove-tld-validation-from-cluster.yml diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index 7025fc2cc02..8b0dc084c9f 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -50,7 +50,7 @@ module Clusters validates :name, cluster_name: true validates :cluster_type, presence: true - validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true, require_valid_tld: true } + validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true } validate :restrict_modification, on: :update validate :no_groups, unless: :group_type? diff --git a/changelogs/unreleased/57650-remove-tld-validation-from-cluster.yml b/changelogs/unreleased/57650-remove-tld-validation-from-cluster.yml new file mode 100644 index 00000000000..683b007a8a1 --- /dev/null +++ b/changelogs/unreleased/57650-remove-tld-validation-from-cluster.yml @@ -0,0 +1,5 @@ +--- +title: Fixes incorrect TLD validation errors for Kubernetes cluster domain +merge_request: 25262 +author: +type: fixed diff --git a/spec/controllers/groups/clusters_controller_spec.rb b/spec/controllers/groups/clusters_controller_spec.rb index 360030102e0..ef23ffaa843 100644 --- a/spec/controllers/groups/clusters_controller_spec.rb +++ b/spec/controllers/groups/clusters_controller_spec.rb @@ -453,7 +453,7 @@ describe Groups::ClustersController do end context 'when domain is invalid' do - let(:domain) { 'not-a-valid-domain' } + let(:domain) { 'http://not-a-valid-domain' } it 'should not update cluster attributes' do go diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb index 92ce2b0999a..3feed4e9718 100644 --- a/spec/models/clusters/cluster_spec.rb +++ b/spec/models/clusters/cluster_spec.rb @@ -265,12 +265,12 @@ describe Clusters::Cluster do it { is_expected.to be_valid } end - context 'when cluster has an invalid domain' do - let(:cluster) { build(:cluster, domain: 'not-valid-domain') } + context 'when cluster is not a valid hostname' do + let(:cluster) { build(:cluster, domain: 'http://not.a.valid.hostname') } it 'should add an error on domain' do expect(subject).not_to be_valid - expect(subject.errors[:domain].first).to eq('is not a fully qualified domain name') + expect(subject.errors[:domain].first).to eq('contains invalid characters (valid characters: [a-z0-9\\-])') end end -- GitLab From 9cb4fc900657d423c0498cfb0a08d54b3838858a Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 15 Feb 2019 17:17:27 +0000 Subject: [PATCH 3/6] Merge branch 'sh-fix-issue-9787-ce' into 'master' Backport commit author changes from CE See merge request gitlab-org/gitlab-ce!25294 (cherry picked from commit 8f209ed5eac176fde0272ced69e36467e37fe79a) 886f00bc Backport commit author changes from CE --- app/models/commit_collection.rb | 4 ++-- app/models/merge_request.rb | 6 +++--- spec/models/commit_collection_spec.rb | 14 +++++++------- spec/models/merge_request_spec.rb | 17 +++++++++-------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/app/models/commit_collection.rb b/app/models/commit_collection.rb index 42ec5b5e664..a9a2e9c81eb 100644 --- a/app/models/commit_collection.rb +++ b/app/models/commit_collection.rb @@ -20,8 +20,8 @@ class CommitCollection commits.each(&block) end - def committers - emails = without_merge_commits.map(&:committer_email).uniq + def authors + emails = without_merge_commits.map(&:author_email).uniq User.by_any_email(emails) end diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 2035bffd829..52cf151b700 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -286,12 +286,12 @@ class MergeRequest < ActiveRecord::Base work_in_progress?(title) ? title : "WIP: #{title}" end - def committers - @committers ||= commits.committers + def commit_authors + @commit_authors ||= commits.authors end def authors - User.from_union([committers, User.where(id: self.author_id)]) + User.from_union([commit_authors, User.where(id: self.author_id)]) end # Verifies if title has changed not taking into account WIP prefix diff --git a/spec/models/commit_collection_spec.rb b/spec/models/commit_collection_spec.rb index 12e59b35428..0f5d03ff458 100644 --- a/spec/models/commit_collection_spec.rb +++ b/spec/models/commit_collection_spec.rb @@ -12,26 +12,26 @@ describe CommitCollection do end end - describe '.committers' do + describe '.authors' do it 'returns a relation of users when users are found' do - user = create(:user, email: commit.committer_email.upcase) + user = create(:user, email: commit.author_email.upcase) collection = described_class.new(project, [commit]) - expect(collection.committers).to contain_exactly(user) + expect(collection.authors).to contain_exactly(user) end - it 'returns empty array when committers cannot be found' do + it 'returns empty array when authors cannot be found' do collection = described_class.new(project, [commit]) - expect(collection.committers).to be_empty + expect(collection.authors).to be_empty end it 'excludes authors of merge commits' do commit = project.commit("60ecb67744cb56576c30214ff52294f8ce2def98") - create(:user, email: commit.committer_email.upcase) + create(:user, email: commit.author_email.upcase) collection = described_class.new(project, [commit]) - expect(collection.committers).to be_empty + expect(collection.authors).to be_empty end end diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index afa87b8a62d..39ffef5f051 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -435,6 +435,7 @@ describe MergeRequest do it 'does not cache issues from external trackers' do issue = ExternalIssue.new('JIRA-123', subject.project) commit = double('commit1', safe_message: "Fixes #{issue.to_reference}") + allow(subject).to receive(:commits).and_return([commit]) expect { subject.cache_merge_request_closes_issues!(subject.author) }.not_to raise_error @@ -1023,23 +1024,23 @@ describe MergeRequest do end end - describe '#committers' do - it 'returns all the committers of every commit in the merge request' do - users = subject.commits.map(&:committer_email).uniq.map do |email| + describe '#commit_authors' do + it 'returns all the authors of every commit in the merge request' do + users = subject.commits.map(&:author_email).uniq.map do |email| create(:user, email: email) end - expect(subject.committers).to match_array(users) + expect(subject.commit_authors).to match_array(users) end - it 'returns an empty array if no committer is associated with a user' do - expect(subject.committers).to be_empty + it 'returns an empty array if no author is associated with a user' do + expect(subject.commit_authors).to be_empty end end describe '#authors' do - it 'returns a list with all the committers in the merge request and author' do - users = subject.commits.map(&:committer_email).uniq.map do |email| + it 'returns a list with all the commit authors in the merge request and author' do + users = subject.commits.map(&:author_email).uniq.map do |email| create(:user, email: email) end -- GitLab From 87e312d5481661d2ebe023e2eaf32d4324525676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 18 Feb 2019 10:01:04 +0000 Subject: [PATCH 4/6] Merge branch 'qa-ml-add-label-selector' into 'master' Fix failing e2e test: qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb Closes gitlab-org/quality/staging#38 See merge request gitlab-org/gitlab-ce!25304 (cherry picked from commit 250bde53e22406ebd101a34bfc52dd8886dedba9) 18d5541c Fix failing e2e labels test --- app/views/shared/empty_states/_priority_labels.html.haml | 2 +- qa/qa/page/label/index.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/shared/empty_states/_priority_labels.html.haml b/app/views/shared/empty_states/_priority_labels.html.haml index 555cb4f4af9..bba3475d244 100644 --- a/app/views/shared/empty_states/_priority_labels.html.haml +++ b/app/views/shared/empty_states/_priority_labels.html.haml @@ -1,4 +1,4 @@ .text-center - .svg-content + .svg-content.qa-label-svg = image_tag 'illustrations/priority_labels.svg' %p Star labels to start sorting by priority diff --git a/qa/qa/page/label/index.rb b/qa/qa/page/label/index.rb index f0d323ca3b4..de0cfa9f293 100644 --- a/qa/qa/page/label/index.rb +++ b/qa/qa/page/label/index.rb @@ -14,6 +14,10 @@ module QA element :label_svg end + view 'app/views/shared/empty_states/_priority_labels.html.haml' do + element :label_svg + end + def go_to_new_label # The 'labels.svg' takes a fraction of a second to load after which the "New label" button shifts up a bit # This can cause webdriver to miss the hit so we wait for the svg to load (implicitly with has_element?) -- GitLab From 1e060e2ad3bf8dc1cbec3bba8ab310c9715b046a Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 19 Feb 2019 11:20:25 +0000 Subject: [PATCH 5/6] Merge branch 'docs/add-admin-area-localisation-note' into 'master' Add first-day-of-week admin area config note See merge request gitlab-org/gitlab-ce!25376 (cherry picked from commit 9b581d41663b4115f150263772bcbe1a3704d244) ac7fcf28 Add first-day-of-week admin area config note --- doc/user/admin_area/settings/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/user/admin_area/settings/index.md b/doc/user/admin_area/settings/index.md index 93767aefb51..8358fe64f18 100644 --- a/doc/user/admin_area/settings/index.md +++ b/doc/user/admin_area/settings/index.md @@ -14,6 +14,10 @@ include: - [Usage statistics](usage_statistics.md) - [Visibility and access controls](visibility_and_access_controls.md) +NOTE: **Note:** +You can change the [first day of the week](../../profile/preferences.md) for the entire GitLab instance +in the **Localization** section of **Admin area > Settings > Preferences**. + ## GitLab.com admin area settings Most of the settings under the admin area change the behavior of the whole -- GitLab From 7e2d47b2113b2431ef246be3799eb50685b207b3 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Tue, 19 Feb 2019 11:25:50 +0000 Subject: [PATCH 6/6] Merge branch 'fix-performance-bar-not-tracking-some-requests' into 'master' Fixes some requests not being tracked in performance bar Closes #57886 See merge request gitlab-org/gitlab-ce!25384 (cherry picked from commit 197641c7d7278a7a8c17e318b08dec876636110a) 0e07a5aa Fixes some requests not being tracked in performance bar --- app/assets/javascripts/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 63db4938cd7..1b722c0505a 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -78,7 +78,6 @@ function deferredInitialisation() { initUserPopovers(); if (document.querySelector('.search')) initSearchAutocomplete(); - if (document.querySelector('#js-peek')) initPerformanceBar({ container: '#js-peek' }); addSelectOnFocusBehaviour('.js-select-on-focus'); @@ -145,6 +144,8 @@ document.addEventListener('DOMContentLoaded', () => { const $sidebarGutterToggle = $('.js-sidebar-toggle'); let bootstrapBreakpoint = bp.getBreakpointSize(); + if (document.querySelector('#js-peek')) initPerformanceBar({ container: '#js-peek' }); + initLayoutNav(); // Set the default path for all cookies to GitLab's root directory -- GitLab