summaryrefslogtreecommitdiff
path: root/app/models/clusters
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/models/clusters
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
downloadgitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/agent_token.rb5
-rw-r--r--app/models/clusters/applications/runner.rb2
-rw-r--r--app/models/clusters/instance.rb4
3 files changed, 5 insertions, 6 deletions
diff --git a/app/models/clusters/agent_token.rb b/app/models/clusters/agent_token.rb
index b260822f784..9d79887b574 100644
--- a/app/models/clusters/agent_token.rb
+++ b/app/models/clusters/agent_token.rb
@@ -7,9 +7,12 @@ module Clusters
self.table_name = 'cluster_agent_tokens'
- belongs_to :agent, class_name: 'Clusters::Agent'
+ belongs_to :agent, class_name: 'Clusters::Agent', optional: false
belongs_to :created_by_user, class_name: 'User', optional: true
before_save :ensure_token
+
+ validates :description, length: { maximum: 1024 }
+ validates :name, presence: true, length: { maximum: 255 }, on: :create
end
end
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb
index f87eccecf9f..8a49d476ba7 100644
--- a/app/models/clusters/applications/runner.rb
+++ b/app/models/clusters/applications/runner.rb
@@ -3,7 +3,7 @@
module Clusters
module Applications
class Runner < ApplicationRecord
- VERSION = '0.25.0'
+ VERSION = '0.26.0'
self.table_name = 'clusters_applications_runners'
diff --git a/app/models/clusters/instance.rb b/app/models/clusters/instance.rb
index 94fadace01c..2a09ba11564 100644
--- a/app/models/clusters/instance.rb
+++ b/app/models/clusters/instance.rb
@@ -6,10 +6,6 @@ module Clusters
Clusters::Cluster.instance_type
end
- def feature_available?(feature)
- ::Feature.enabled?(feature, type: :licensed, default_enabled: true)
- end
-
def flipper_id
self.class.to_s
end