Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5ee78a3e
Commit
5ee78a3e
authored
Feb 15, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
0c4d4988
ab06c9b6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
22 deletions
+10
-22
app/models/clusters/cluster.rb
app/models/clusters/cluster.rb
+1
-1
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+0
-3
changelogs/unreleased/57650-remove-tld-validation-from-cluster.yml
...s/unreleased/57650-remove-tld-validation-from-cluster.yml
+5
-0
db/migrate/limits_to_mysql.rb
db/migrate/limits_to_mysql.rb
+0
-13
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+0
-1
spec/controllers/groups/clusters_controller_spec.rb
spec/controllers/groups/clusters_controller_spec.rb
+1
-1
spec/models/clusters/cluster_spec.rb
spec/models/clusters/cluster_spec.rb
+3
-3
No files found.
app/models/clusters/cluster.rb
View file @
5ee78a3e
...
...
@@ -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?
...
...
app/models/merge_request_diff.rb
View file @
5ee78a3e
...
...
@@ -12,9 +12,6 @@ class MergeRequestDiff < ActiveRecord::Base
# Don't display more than 100 commits at once
COMMITS_SAFE_SIZE
=
100
ignore_column
:st_commits
,
:st_diffs
belongs_to
:merge_request
manual_inverse_association
:merge_request
,
:merge_request_diff
...
...
changelogs/unreleased/57650-remove-tld-validation-from-cluster.yml
0 → 100644
View file @
5ee78a3e
---
title
:
Fixes incorrect TLD validation errors for Kubernetes cluster domain
merge_request
:
25262
author
:
type
:
fixed
db/migrate/limits_to_mysql.rb
View file @
5ee78a3e
...
...
@@ -2,19 +2,6 @@ class LimitsToMysql < ActiveRecord::Migration[4.2]
def
up
return
unless
ActiveRecord
::
Base
.
configurations
[
Rails
.
env
][
'adapter'
]
=~
/^mysql/
# These columns were removed in 10.3, but this is called from two places:
# 1. A migration run after they were added, but before they were removed.
# 2. A rake task which can be run at any time.
#
# Because of item 2, we need these checks.
if
column_exists?
(
:merge_request_diffs
,
:st_commits
)
change_column
:merge_request_diffs
,
:st_commits
,
:text
,
limit:
2147483647
end
if
column_exists?
(
:merge_request_diffs
,
:st_diffs
)
change_column
:merge_request_diffs
,
:st_diffs
,
:text
,
limit:
2147483647
end
change_column
:snippets
,
:content
,
:text
,
limit:
2147483647
change_column
:notes
,
:st_diff
,
:text
,
limit:
2147483647
end
...
...
lib/gitlab/import_export/import_export.yml
View file @
5ee78a3e
...
...
@@ -146,7 +146,6 @@ excluded_attributes:
-
:external_diff
-
:stored_externally
-
:external_diff_store
-
:st_diffs
merge_request_diff_files
:
-
:diff
-
:external_diff_offset
...
...
spec/controllers/groups/clusters_controller_spec.rb
View file @
5ee78a3e
...
...
@@ -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
...
...
spec/models/clusters/cluster_spec.rb
View file @
5ee78a3e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment