uffizzi_core 0.3.7 → 0.3.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc9d18f96d6809d2ff9ba942eb283d7b54e876e05bcb31cfc991ba3bbec9c241
|
4
|
+
data.tar.gz: 01601aec07efaf6fe0cd292968ce9480efed6b1d1f0aaaac8a50bc9cd4bb5792
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9cb8d9bc0d2ba8f6d759936a5a3137ba6a1db2ca87283e8ce35bc09bfd19204d477f054be4f0b695b4f877fb705af9b2377f04fd329f80bee97052c6559763b
|
7
|
+
data.tar.gz: bc0d50ccaf1b9c17ab607452152522924f0a32567952907d035ae3167680ca1e03784a96f7cb4cc43f93cb3c3ce47d8a282fbc19acdf9a9a0bde90b9b4ffff46
|
@@ -66,12 +66,28 @@ class UffizziCore::ComposeFileService
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def update_secret!(compose_file, secret)
|
69
|
-
compose_file.template.payload['containers_attributes'].
|
70
|
-
|
71
|
-
|
69
|
+
compose_file.template.payload['containers_attributes'].each do |container|
|
70
|
+
next unless UffizziCore::ComposeFile::ContainerService.has_secret?(container, secret)
|
71
|
+
|
72
|
+
UffizziCore::ComposeFile::ContainerService.update_secret(container, secret)
|
73
|
+
next if compose_file.payload['errors'].blank?
|
74
|
+
|
75
|
+
compose_file_errors = compose_file.payload['errors'].presence
|
76
|
+
secrets_errors = compose_file_errors[UffizziCore::ComposeFile::ErrorsService::SECRETS_ERROR_KEY].presence
|
77
|
+
new_secrets_errors = secrets_errors.reject { |secret_errors| secret_errors.include?(secret.name) }
|
78
|
+
|
79
|
+
if new_secrets_errors.present?
|
80
|
+
new_errors = { UffizziCore::ComposeFile::ErrorsService::SECRETS_ERROR_KEY => new_secrets_errors }
|
81
|
+
UffizziCore::ComposeFile::ErrorsService.update_compose_errors!(compose_file,
|
82
|
+
compose_file_errors.merge(new_errors),
|
83
|
+
compose_file.content)
|
84
|
+
next
|
72
85
|
end
|
73
86
|
|
74
|
-
|
87
|
+
compose_file_errors.delete(['secret_variables'])
|
88
|
+
next UffizziCore::ComposeFile::ErrorsService.reset_compose_errors!(compose_file) if compose_file_errors.empty?
|
89
|
+
|
90
|
+
UffizziCore::ComposeFile::ErrorsService.update_compose_errors!(compose_file, compose_file_errors, compose_file.content)
|
75
91
|
end
|
76
92
|
|
77
93
|
compose_file.template.save!
|
@@ -27,10 +27,11 @@ class UffizziCore::ProjectService
|
|
27
27
|
return unless UffizziCore::ComposeFileService.has_secret?(compose_file, secret)
|
28
28
|
|
29
29
|
error_message = I18n.t('compose.project_secret_not_found', secret: secret['name'])
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
compose_file_errors = compose_file.payload['errors'] || {}
|
31
|
+
secrets_errors = compose_file_errors[UffizziCore::ComposeFile::ErrorsService::SECRETS_ERROR_KEY].presence || []
|
32
|
+
new_secrets_errors = secrets_errors.append(error_message).uniq
|
33
|
+
error = { UffizziCore::ComposeFile::ErrorsService::SECRETS_ERROR_KEY => new_secrets_errors }
|
34
|
+
new_errors = compose_file_errors.merge(error)
|
34
35
|
|
35
36
|
UffizziCore::ComposeFile::ErrorsService.update_compose_errors!(compose_file, new_errors, compose_file.content)
|
36
37
|
end
|
data/lib/uffizzi_core/version.rb
CHANGED
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: 0.3.
|
4
|
+
version: 0.3.8
|
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: 2022-08-
|
12
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aasm
|