uffizzi_core 2.2.5 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a34bc3da603108f8c6b1638f14d4e5025f3cc255062fff2f32fb849a6eb7206
4
- data.tar.gz: 510bc658ead7b29c8bfe04e980fd47f6b4a5c5121d33048d7042a49a41d9d70f
3
+ metadata.gz: f5cf38b67e1c6b3c1ff736ca636bb7531a0ade58ce49fc1a095e40126de2a38b
4
+ data.tar.gz: f29c035652219cafd55240323739583b5c1874b0f51907eebca2cb5e5164ef8d
5
5
  SHA512:
6
- metadata.gz: 5a17109e4ace94f959f562d6b60be739faf9b07ef9b7712ac6f09bb005f060b0a1fc9e9acc37dec369540ae394c2aa53a934ab6084fcf1474349cc0ab02226d3
7
- data.tar.gz: 83882b00eadefad47f00ef89aab8e07be1e15e8e4193b06b1608c0b92c7e0562677c0b2ca7ef8c5fb5fee76bd770465f7353fed35bb044cdb5f2e7620fbd5a4f
6
+ metadata.gz: 6da5ffb38991e3f48e61c551553c91d45a73025da899f48066172c1c97d7adce09563c33d9aa111acda63ab2e370db900e2cb9cefea767bc24b8dbc2c29151b8
7
+ data.tar.gz: 9590a6ea106ddb19bf4c7abb29f349db1cd7f463df809e01f2a014e7128901351e7c8dd82ff91d6aca653bc1a0aa2b8b4b43e1de96932f7089e62b48fec282e4
@@ -2,6 +2,7 @@
2
2
 
3
3
  class UffizziCore::Api::Cli::V1::Deployment::CreateForm < UffizziCore::Deployment
4
4
  include UffizziCore::ApplicationForm
5
+ include UffizziCore::DependencyInjectionConcern
5
6
 
6
7
  permit :creation_source,
7
8
  :metadata,
@@ -56,6 +57,7 @@ class UffizziCore::Api::Cli::V1::Deployment::CreateForm < UffizziCore::Deploymen
56
57
  validate :check_all_containers_have_unique_ports
57
58
  validate :check_exists_ingress_container
58
59
  validate :check_secrets_exist_in_database
60
+ validate :check_max_memory_limit
59
61
 
60
62
  def assign_dependences!(project, user)
61
63
  self.project = project
@@ -97,4 +99,11 @@ class UffizziCore::Api::Cli::V1::Deployment::CreateForm < UffizziCore::Deploymen
97
99
  errors.add(:secret_variables, error_message)
98
100
  end
99
101
  end
102
+
103
+ def check_max_memory_limit
104
+ return if deployment_memory_module.valid_memory_limit?(self)
105
+
106
+ deployment_memory_module.memory_limit_error_message(self)
107
+ errors.add(:containers, message)
108
+ end
100
109
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  class UffizziCore::Api::Cli::V1::Deployment::UpdateForm < UffizziCore::Deployment
4
4
  include UffizziCore::ApplicationForm
5
+ include UffizziCore::DependencyInjectionConcern
5
6
 
6
7
  permit :metadata,
7
8
  containers_attributes: [
@@ -54,6 +55,7 @@ class UffizziCore::Api::Cli::V1::Deployment::UpdateForm < UffizziCore::Deploymen
54
55
 
55
56
  validate :check_all_containers_have_unique_ports
56
57
  validate :check_exists_ingress_container
58
+ validate :check_max_memory_limit
57
59
 
58
60
  def assign_dependences!(project, user)
59
61
  self.project = project
@@ -82,4 +84,11 @@ class UffizziCore::Api::Cli::V1::Deployment::UpdateForm < UffizziCore::Deploymen
82
84
 
83
85
  errors.add(:containers, :incorrect_ingress_container) unless UffizziCore::DeploymentService.ingress_container?(active_containers)
84
86
  end
87
+
88
+ def check_max_memory_limit
89
+ return if deployment_memory_module.valid_memory_limit?(self)
90
+
91
+ deployment_memory_module.memory_limit_error_message(self)
92
+ errors.add(:containers, message)
93
+ end
85
94
  end
@@ -1,4 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class UffizziCore::Api::Cli::V1::Template::CreateForm < UffizziCore::Template
4
+ include UffizziCore::DependencyInjectionConcern
5
+
6
+ validate :check_max_memory_limit
7
+
8
+ def check_max_memory_limit
9
+ return if template_memory_module.valid_memory_limit?(self)
10
+
11
+ message = template_memory_module.memory_limit_error_message(self)
12
+ errors.add(:payload, message)
13
+ end
4
14
  end
@@ -21,14 +21,4 @@
21
21
 
22
22
  class UffizziCore::Deployment < UffizziCore::ApplicationRecord
23
23
  include UffizziCore::Concerns::Models::Deployment
24
- include UffizziCore::DependencyInjectionConcern
25
-
26
- validate :check_max_memory_limit
27
-
28
- def check_max_memory_limit
29
- return if deployment_memory_module.valid_memory_limit?(self)
30
-
31
- deployment_memory_module.memory_limit_error_message(self)
32
- errors.add(:containers, message)
33
- end
34
24
  end
@@ -2,14 +2,4 @@
2
2
 
3
3
  class UffizziCore::Template < UffizziCore::ApplicationRecord
4
4
  include UffizziCore::Concerns::Models::Template
5
- include UffizziCore::DependencyInjectionConcern
6
-
7
- validate :check_max_memory_limit
8
-
9
- def check_max_memory_limit
10
- return if template_memory_module.valid_memory_limit?(self)
11
-
12
- message = template_memory_module.memory_limit_error_message(self)
13
- errors.add(:payload, message)
14
- end
15
5
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.2.5'
4
+ VERSION = '2.2.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uffizzi_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Thurman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-07-24 00:00:00.000000000 Z
12
+ date: 2023-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm