uffizzi_core 0.2.1 → 0.2.2

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: adfd2aad21040ef9ab01dbd4057d37185b70a57d7886fad0add89e64ae4a1c77
4
- data.tar.gz: d1b593337123b302cf5e5a4986be2806f806a8afd4a7f9292940222e1225c857
3
+ metadata.gz: 5085353e167434c11ae0155c5d55a4f3476124a2450b013de65361c303614090
4
+ data.tar.gz: 36d5fb3f8aa7d15a9f274cec8ccbe92fcbc4dca9c67a9573e7b05c9080db87f3
5
5
  SHA512:
6
- metadata.gz: b6d2ee7b78505a764da65fb0e100678b35b9f8e974105b8e1600ee61dd499b3546653a556fa1531bbd14c0a5043fbae85d2f23d3701f209802fdd3e6951d8e7c
7
- data.tar.gz: 7fae0d641e8c2ec495fb2250931245a16893a2b9e88564c2e52cba0f94fa1cf9b4da1800cdc3606de53fcb1ea750e5e18bce39af405b34d6ac5cb1b459389334
6
+ metadata.gz: 54aa46774504fb1059e2fd5175842e3ea2544f015d5f605a1a84ad3150087910048bdbd1d27bf5bfcb32af4d8b05db30076991a4c2f2827490c473c7f2e35e5e
7
+ data.tar.gz: '085bb9ce07490be191221d2d44b83c5bb6b0622d139ae90a62fca7da7d8e5dcac7ae2970167ca8c49df1d14d8e067eee396200573bf337aea6c4c618defcbda9'
@@ -112,8 +112,8 @@ module UffizziCore::DeploymentService
112
112
  project = deployment.project
113
113
  continuous_preview_payload = deployment.continuous_preview_payload
114
114
  docker_payload = continuous_preview_payload['docker']
115
- repo_name = docker_payload['image'].split('/').last.gsub('_', '-')
116
- image_tag = docker_payload['tag'].gsub('_', '-')
115
+ repo_name = docker_payload['image'].split('/').last
116
+ image_tag = docker_payload['tag']
117
117
  deployment_name = name(deployment)
118
118
  subdomain = "#{image_tag}-#{deployment_name}-#{repo_name}-#{project.slug}"
119
119
 
@@ -298,10 +298,13 @@ module UffizziCore::DeploymentService
298
298
  end
299
299
 
300
300
  def format_subdomain(full_subdomain_name)
301
+ # Replace _ to - because RFC 1123 subdomain must consist of lower case alphanumeric characters,
302
+ # '-' or '.', and must start and end with an alphanumeric character
303
+ rfc_subdomain = full_subdomain_name.gsub('_', '-')
301
304
  subdomain_length_limit = Settings.deployment.subdomain.length_limit
302
- return full_subdomain_name if full_subdomain_name.length <= subdomain_length_limit
305
+ return rfc_subdomain if rfc_subdomain.length <= subdomain_length_limit
303
306
 
304
- full_subdomain_name.slice(0, subdomain_length_limit)
307
+ rfc_subdomain.slice(0, subdomain_length_limit)
305
308
  end
306
309
  end
307
310
  end
@@ -119,11 +119,7 @@ class UffizziCore::ManageActivityItemsService
119
119
  case pod_container_status.to_sym
120
120
  when :running
121
121
  UffizziCore::Event.state.deployed
122
- when :terminated
123
- UffizziCore::Event.state.failed
124
122
  when :waiting
125
- return UffizziCore::Event.state.failed if ['CrashLoopBackOff'].include?(reason)
126
-
127
123
  raise UffizziCore::Deployment::ImagePullError, @deployment.id if ['ErrImagePull', 'ImagePullBackOff'].include?(reason)
128
124
 
129
125
  UffizziCore::Event.state.deploying
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
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: 0.2.1
4
+ version: 0.2.2
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-06-10 00:00:00.000000000 Z
12
+ date: 2022-06-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm