ufo 6.3.10 → 6.3.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d85a0063b688b43736f0b7e252e314d70d98d05871bd43238fb630b84336fea
4
- data.tar.gz: 99baad01439788788a8a0683c03fbbbaa2af925ffc8cc09026c8d57b61e0f1fd
3
+ metadata.gz: a050a10b8e58e8da5474a73de14b6fe3d69cd738603f8eb108c33649044af094
4
+ data.tar.gz: 8f728797c68172de2b0d9b80a6a7349f291bf3aab72f3ee6a977dcb6ab91d416
5
5
  SHA512:
6
- metadata.gz: b38a61b1adc53e520c526b0d8d72bae8812b0cb17cb58d77c17af1e6dc823a1f671b0725ef77ecb587a2f30aed6847e4f3a669d88a2f05489721b4651eae86d2
7
- data.tar.gz: 2958ec8b2aa3c5b69ac348fad209a5964528d4e8cb1101507e7bbddbf504c23f407181d9c9e394ec73b2f117758beb7ddba76e6953b8f48d2d08776615213279
6
+ metadata.gz: 41534c17798e484d6bb960035d9b67fa096a4c8790046b82c3a05fbff9593593b990d01fa05c8f69a56e7ae9fd4290b3aed63ed2349d934876c3d4f4295b80e4
7
+ data.tar.gz: b91bb642b006a6e3ccdc6dee58218bc0da82d67f3c0b48584e524bc4083c33c6acca6e6a5af2a9088981129b2daf239bd8aa6e71104b0ef3f775e3b43d2d677f
@@ -0,0 +1 @@
1
+ github: boltops-tools
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [6.3.13] - 2022-08-31
7
+ - [#180](https://github.com/tongueroo/ufo/pull/180) add ufo role and dev to image name tag
8
+
9
+ ## [6.3.12] - 2022-07-11
10
+ - [#179](https://github.com/tongueroo/ufo/pull/179) auto continue_update_rollback and retry once
11
+
12
+ ## [6.3.11] - 2022-07-09
13
+ - [#178](https://github.com/tongueroo/ufo/pull/178) use .ufo/tmp folder instead of /tmp/ufo
14
+
6
15
  ## [6.3.10] - 2022-06-23
7
16
  - [#177](https://github.com/tongueroo/ufo/pull/177) Enabled support for gRPC
8
17
 
data/lib/ufo/cfn/stack.rb CHANGED
@@ -55,9 +55,32 @@ module Ufo::Cfn
55
55
  logger.info "#{action[0..-2].capitalize}ing stack #{@stack_name.color(:green)}"
56
56
  cfn.send("#{action}_stack", stack_options) # Example: cfn.send("update_stack", stack_options)
57
57
  rescue Aws::CloudFormation::Errors::ValidationError => e
58
+ try_continue_update_rollback = continue_update_rollback(e)
59
+ try_continue_update_rollback && retry
58
60
  handle_stack_error(e)
59
61
  end
60
62
 
63
+ # Super edge case where stack is in UPDATE_ROLLBACK_FAILED. Can reproduce by:
64
+ #
65
+ # 1. spinning ECS cluster down to 0 and deploying with ufo ship
66
+ # 2. after 3h will timeout and fail and goes into UPDATE_ROLLBACK_FAILED
67
+ #
68
+ # Screenshot: https://capture.dropbox.com/Pdr8gijnaQvoMp2y
69
+ #
70
+ # Will auto-retry once
71
+ #
72
+ def continue_update_rollback(e)
73
+ if e.message.include?('UPDATE_ROLLBACK_FAILED') && !@continue_update_rollback_tried
74
+ logger.info "Stack in UPDATE_ROLLBACK_FAILED"
75
+ logger.info "Trying a continue_update_rollback and will retry again once"
76
+ cfn.continue_update_rollback(stack_name: @stack_name)
77
+ status.wait
78
+ @continue_update_rollback_tried ||= true
79
+ else
80
+ false
81
+ end
82
+ end
83
+
61
84
  def stack_options
62
85
  options = {
63
86
  capabilities: ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"],
@@ -141,7 +141,7 @@ module Ufo::Docker
141
141
  end
142
142
 
143
143
  def generate_name
144
- ["#{image_name}:#{@image_namespace}-#{timestamp}", git_sha].compact.join('-') # compact in case git_sha is unavailable
144
+ ["#{image_name}:#{@image_namespace}", Ufo.role, Ufo.env, timestamp, git_sha].compact.join('-') # compact in case git_sha is unavailable
145
145
  end
146
146
 
147
147
  def docker_name_path
@@ -41,7 +41,7 @@ class Ufo::TaskDefinition
41
41
  def evaluate_code
42
42
  path = @task_definition.path
43
43
  text = RenderMePretty.result(path, context: self)
44
- rendered_path = "/tmp/ufo/task_definition#{File.extname(path)}"
44
+ rendered_path = "#{Ufo.root}/.ufo/tmp/task_definition#{File.extname(path)}"
45
45
  FileUtils.mkdir_p(File.dirname(rendered_path))
46
46
  IO.write(rendered_path, text)
47
47
 
@@ -2,6 +2,7 @@ module Ufo::TaskDefinition::Helpers
2
2
  module StackOutput
3
3
  include Ufo::AwsServices
4
4
  include Ufo::Concerns::Names
5
+ include Ufo::Utils::Logging
5
6
 
6
7
  def stack_output(name)
7
8
  stack_name, output_key = name.split(".")
data/lib/ufo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "6.3.10"
2
+ VERSION = "6.3.13"
3
3
  end
data/lib/ufo/yaml.rb CHANGED
@@ -2,7 +2,7 @@ module Ufo
2
2
  class Yaml
3
3
  class << self
4
4
  def load(text)
5
- path = "/tmp/ufo/temp.yml"
5
+ path = "#{Ufo.root}/.ufo/tmp/temp.yml"
6
6
  FileUtils.mkdir_p(File.dirname(path))
7
7
  IO.write(path, text)
8
8
  Validator.new(path).validate!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.10
4
+ version: 6.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-23 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-logs
@@ -460,6 +460,7 @@ files:
460
460
  - ".cody/acceptance/project.rb"
461
461
  - ".cody/shared/script/install.sh"
462
462
  - ".cody/shared/script/install/ufo.sh"
463
+ - ".github/FUNDING.yml"
463
464
  - ".github/ISSUE_TEMPLATE.md"
464
465
  - ".github/ISSUE_TEMPLATE/bug_report.md"
465
466
  - ".github/ISSUE_TEMPLATE/documentation.md"
@@ -718,7 +719,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
718
719
  - !ruby/object:Gem::Version
719
720
  version: '0'
720
721
  requirements: []
721
- rubygems_version: 3.3.12
722
+ rubygems_version: 3.3.21
722
723
  signing_key:
723
724
  specification_version: 4
724
725
  summary: AWS ECS Deploy Tool