Skip to content
Snippets Groups Projects
Commit aabf412b authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 1cfd8874
No related branches found
No related tags found
No related merge requests found
Showing
with 96 additions and 17 deletions
Loading
Loading
@@ -218,6 +218,12 @@ ActiveRecordAssociationReload:
- 'spec/**/*'
- 'ee/spec/**/*'
 
Naming/PredicateName:
Enabled: true
Exclude:
- 'spec/**/*'
- 'ee/spec/**/*'
RSpec/FactoriesInMigrationSpecs:
Enabled: true
Include:
Loading
Loading
Loading
Loading
@@ -73,10 +73,6 @@
summary {
margin-bottom: $gl-padding;
}
*:first-child:not(summary) {
margin-top: $gl-padding;
}
}
 
// Single code lines should wrap
Loading
Loading
Loading
Loading
@@ -20,7 +20,6 @@ module NavHelper
 
def page_gutter_class
if page_has_markdown?
if cookies[:collapsed_gutter] == 'true'
%w[page-gutter right-sidebar-collapsed]
else
Loading
Loading
Loading
Loading
@@ -23,11 +23,12 @@ module Clusters
key: Settings.attr_encrypted_db_key_base_truncated,
algorithm: 'aes-256-cbc'
 
before_validation :nullify_blank_namespace
before_validation :enforce_namespace_to_lower_case
before_validation :enforce_ca_whitespace_trimming
 
validates :namespace,
allow_blank: true,
allow_nil: true,
length: 1..63,
format: {
with: Gitlab::Regex.kubernetes_namespace_regex,
Loading
Loading
@@ -190,6 +191,10 @@ module Clusters
 
true
end
def nullify_blank_namespace
self.namespace = nil if namespace.blank?
end
end
end
end
Loading
Loading
Loading
Loading
@@ -137,10 +137,9 @@ class JiraService < IssueTrackerService
 
return if issue.nil? || has_resolution?(issue) || !jira_issue_transition_id.present?
 
commit_id = if entity.is_a?(Commit)
entity.id
elsif entity.is_a?(MergeRequest)
entity.diff_head_sha
commit_id = case entity
when Commit then entity.id
when MergeRequest then entity.diff_head_sha
end
 
commit_url = build_entity_url(:commit, commit_id)
Loading
Loading
@@ -331,7 +330,6 @@ class JiraService < IssueTrackerService
# Handle errors when doing Jira API calls
def jira_request
yield
rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, Errno::ECONNREFUSED, URI::InvalidURIError, JIRA::HTTPError, OpenSSL::SSL::SSLError => e
@error = e.message
log_error("Error sending message", client_url: client_url, error: @error)
Loading
Loading
Loading
Loading
@@ -18,7 +18,7 @@ module Issues
# The code calling this method is responsible for ensuring that a user is
# allowed to close the given issue.
def close_issue(issue, closed_via: nil, notifications: true, system_note: true)
if project.jira_tracker? && project.jira_service.active && issue.is_a?(ExternalIssue)
if project.jira_tracker_active? && issue.is_a?(ExternalIssue)
project.jira_service.close_issue(closed_via, issue)
todo_service.close_issue(issue, current_user)
return issue
Loading
Loading
---
title: Nullify platform Kubernetes namespace if blank
merge_request: 17657
author:
type: fixed
---
title: Fix css selector for details in issue description
merge_request: 17557
author:
type: fixed
---
title: Add columns for per project/group max pages/artifacts sizes
merge_request: 17231
author:
type: added
# frozen_string_literal: true
class AddProjectsMaxPagesSize < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :projects, :max_pages_size, :integer
end
end
# frozen_string_literal: true
class AddNamespacesMaxPagesSize < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :namespaces, :max_pages_size, :integer
end
end
# frozen_string_literal: true
class AddProjectsMaxArtifactsSize < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :projects, :max_artifacts_size, :integer
end
end
# frozen_string_literal: true
class AddNamespacesMaxArtifactsSize < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :namespaces, :max_artifacts_size, :integer
end
end
Loading
Loading
@@ -2317,6 +2317,8 @@ ActiveRecord::Schema.define(version: 2019_09_19_162036) do
t.integer "last_ci_minutes_usage_notification_level"
t.integer "subgroup_creation_level", default: 1
t.boolean "emails_disabled"
t.integer "max_pages_size"
t.integer "max_artifacts_size"
t.index ["created_at"], name: "index_namespaces_on_created_at"
t.index ["custom_project_templates_group_id", "type"], name: "index_namespaces_on_custom_project_templates_group_id_and_type", where: "(custom_project_templates_group_id IS NOT NULL)"
t.index ["file_template_project_id"], name: "index_namespaces_on_file_template_project_id"
Loading
Loading
@@ -2909,6 +2911,8 @@ ActiveRecord::Schema.define(version: 2019_09_19_162036) do
t.boolean "merge_requests_disable_committers_approval"
t.boolean "require_password_to_approve"
t.boolean "emails_disabled"
t.integer "max_pages_size"
t.integer "max_artifacts_size"
t.index ["archived", "pending_delete", "merge_requests_require_code_owner_approval"], name: "projects_requiring_code_owner_approval", where: "((pending_delete = false) AND (archived = false) AND (merge_requests_require_code_owner_approval = true))"
t.index ["created_at"], name: "index_projects_on_created_at"
t.index ["creator_id"], name: "index_projects_on_creator_id"
Loading
Loading
Loading
Loading
@@ -155,6 +155,7 @@ module API
 
def self.services
{
'alerts' => [],
'asana' => [
{
required: true,
Loading
Loading
@@ -696,6 +697,7 @@ module API
 
def self.service_classes
[
::AlertsService,
::AsanaService,
::AssemblaService,
::BambooService,
Loading
Loading
Loading
Loading
@@ -143,6 +143,8 @@ excluded_attributes:
- :mirror_last_update_at
- :mirror_last_successful_update_at
- :emails_disabled
- :max_pages_size
- :max_artifacts_size
namespaces:
- :runners_token
- :runners_token_encrypted
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ module Gitlab
module Jira
# Gitlab JIRA HTTP client to be used with jira-ruby gem, this subclasses JIRA::HTTPClient.
# Uses Gitlab::HTTP to make requests to JIRA REST API.
# The parent class implementation can be found at: https://github.com/sumoheavy/jira-ruby/blob/v1.4.0/lib/jira/http_client.rb
# The parent class implementation can be found at: https://github.com/sumoheavy/jira-ruby/blob/v1.7.0/lib/jira/http_client.rb
class HttpClient < JIRA::HttpClient
extend ::Gitlab::Utils::Override
 
Loading
Loading
@@ -24,7 +24,7 @@ module Gitlab
password: @options.delete(:password)
}.to_json
 
make_request(:post, @options[:context_path] + '/rest/auth/1/session', body, { 'Content-Type' => 'application/json' })
make_request(:post, @options[:context_path] + '/rest/auth/1/session', body, 'Content-Type' => 'application/json')
end
 
override :make_request
Loading
Loading
Loading
Loading
@@ -1234,6 +1234,9 @@ msgstr ""
msgid "Alerts"
msgstr ""
 
msgid "Alerts endpoint"
msgstr ""
msgid "All"
msgstr ""
 
Loading
Loading
@@ -12760,6 +12763,9 @@ msgstr ""
msgid "Receive alerts from manually configured Prometheus servers."
msgstr ""
 
msgid "Receive alerts on GitLab from any source"
msgstr ""
msgid "Receive notifications about your own activity"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -411,6 +411,7 @@ project:
- project_aliases
- external_pull_requests
- pages_metadatum
- alerts_service
award_emoji:
- awardable
- user
Loading
Loading
Loading
Loading
@@ -19,14 +19,23 @@ describe Clusters::Platforms::Kubernetes do
it_behaves_like 'having unique enum values'
 
describe 'before_validation' do
let(:kubernetes) { create(:cluster_platform_kubernetes, :configured, namespace: namespace) }
context 'when namespace includes upper case' do
let(:kubernetes) { create(:cluster_platform_kubernetes, :configured, namespace: namespace) }
let(:namespace) { 'ABC' }
 
it 'converts to lower case' do
expect(kubernetes.namespace).to eq('abc')
end
end
context 'when namespace is blank' do
let(:namespace) { '' }
it 'nullifies the namespace' do
expect(kubernetes.namespace).to be_nil
end
end
end
 
describe 'validation' do
Loading
Loading
@@ -35,8 +44,8 @@ describe Clusters::Platforms::Kubernetes do
context 'when validates namespace' do
let(:kubernetes) { build(:cluster_platform_kubernetes, :configured, namespace: namespace) }
 
context 'when namespace is blank' do
let(:namespace) { '' }
context 'when namespace is nil' do
let(:namespace) { nil }
 
it { is_expected.to be_truthy }
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment